author | Ed Morley <emorley@mozilla.com> |
Fri, 14 Dec 2012 16:58:51 +0000 | |
changeset 116057 | 15e83fa7017265eadfce80b140385436df5f11e8 |
parent 116056 | e4da3fe4a9da44011eeb29895457f28de4571e80 |
child 116058 | 3173175efff1a391e065f81ed4de36f896bca592 |
push id | 19705 |
push user | emorley@mozilla.com |
push date | Fri, 14 Dec 2012 16:59:14 +0000 |
treeherder | mozilla-inbound@15e83fa70172 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 820544 |
milestone | 20.0a1 |
backs out | 67d84be0cc83fd23075465eca4d131436e10a132 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/content/base/src/nsDOMBlobBuilder.cpp +++ b/content/base/src/nsDOMBlobBuilder.cpp @@ -186,25 +186,25 @@ nsDOMMultipartFile::InitBlob(JSContext* { bool nativeEOL = false; if (aArgc > 1) { if (NS_IsMainThread()) { BlobPropertyBag d; if (!d.Init(aCx, nullptr, aArgv[1])) { return NS_ERROR_TYPE_ERR; } - mContentType = d.mType; - nativeEOL = d.mEndings == EndingTypesValues::Native; + mContentType = d.type; + nativeEOL = d.endings == EndingTypesValues::Native; } else { BlobPropertyBagWorkers d; if (!d.Init(aCx, nullptr, aArgv[1])) { return NS_ERROR_TYPE_ERR; } - mContentType = d.mType; - nativeEOL = d.mEndings == EndingTypesValues::Native; + mContentType = d.type; + nativeEOL = d.endings == EndingTypesValues::Native; } } if (aArgc > 0) { if (!aArgv[0].isObject()) { return NS_ERROR_TYPE_ERR; // We're not interested }
--- a/content/base/src/nsXMLHttpRequest.h +++ b/content/base/src/nsXMLHttpRequest.h @@ -154,17 +154,17 @@ public: nsCOMPtr<nsIScriptObjectPrincipal> principal = do_QueryInterface(aGlobal); if (!window || ! principal) { aRv.Throw(NS_ERROR_FAILURE); return NULL; } nsRefPtr<nsXMLHttpRequest> req = new nsXMLHttpRequest(); req->Construct(principal->GetPrincipal(), window); - req->InitParameters(aParams.mMozAnon, aParams.mMozSystem); + req->InitParameters(aParams.mozAnon, aParams.mozSystem); return req.forget(); } static already_AddRefed<nsXMLHttpRequest> Constructor(JSContext* aCx, nsISupports* aGlobal, const nsAString& ignored, ErrorResult& aRv)
--- a/content/canvas/src/WebGLContext.cpp +++ b/content/canvas/src/WebGLContext.cpp @@ -891,22 +891,22 @@ WebGLContext::GetContextAttributes(Nulla { retval.SetNull(); if (!IsContextStable()) return; dom::WebGLContextAttributes& result = retval.SetValue(); gl::ContextFormat cf = gl->ActualFormat(); - result.mAlpha = cf.alpha > 0; - result.mDepth = cf.depth > 0; - result.mStencil = cf.stencil > 0; - result.mAntialias = cf.samples > 1; - result.mPremultipliedAlpha = mOptions.premultipliedAlpha; - result.mPreserveDrawingBuffer = mOptions.preserveDrawingBuffer; + result.alpha = cf.alpha > 0; + result.depth = cf.depth > 0; + result.stencil = cf.stencil > 0; + result.antialias = cf.samples > 1; + result.premultipliedAlpha = mOptions.premultipliedAlpha; + result.preserveDrawingBuffer = mOptions.preserveDrawingBuffer; } bool WebGLContext::IsExtensionEnabled(WebGLExtensionID ext) const { return mExtensions.SafeElementAt(ext); } /* [noscript] DOMString mozGetUnderlyingParamString(in WebGLenum pname); */
--- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -6380,18 +6380,17 @@ class CGDictionary(CGThing): d = self.dictionary if d.parent: inheritance = ": public %s " % self.makeClassName(d.parent) elif not self.workers: inheritance = ": public MainThreadDictionaryBase " else: inheritance = "" memberDecls = [" %s %s;" % - (self.getMemberType(m), - self.makeMemberName(m[0].identifier.name)) + (self.getMemberType(m), m[0].identifier.name) for m in self.memberInfo] return (string.Template( "struct ${selfName} ${inheritance}{\n" " ${selfName}() {}\n" " bool Init(JSContext* cx, JSObject* scopeObj, const JS::Value& val);\n" " bool ToObject(JSContext* cx, JSObject* parentObject, JS::Value *vp);\n" "\n" + @@ -6526,35 +6525,38 @@ class CGDictionary(CGThing): @staticmethod def makeDictionaryName(dictionary, workers): suffix = "Workers" if workers else "" return dictionary.identifier.name + suffix def makeClassName(self, dictionary): return self.makeDictionaryName(dictionary, self.workers) - @staticmethod - def makeMemberName(name): - return "m" + name[0].upper() + name[1:] - def getMemberType(self, memberInfo): (member, (templateBody, declType, holderType, dealWithOptional)) = memberInfo # We can't handle having a holderType here assert holderType is None if dealWithOptional: declType = CGWrapper(declType, pre="Optional< ", post=" >") return declType.define() def getMemberConversion(self, memberInfo): (member, (templateBody, declType, holderType, dealWithOptional)) = memberInfo replacements = { "val": "temp", "valPtr": "&temp", - "declName": self.makeMemberName(member.identifier.name), + # Use this->%s to refer to members, because we don't + # control the member names and want to make sure we're + # talking about the member, not some local that + # shadows the member. Another option would be to move + # the guts of init to a static method which is passed + # an explicit reference to our dictionary object, so + # we couldn't screw this up even if we wanted to.... + "declName": ("(this->%s)" % member.identifier.name), # We need a holder name for external interfaces, but # it's scoped down to the conversion so we can just use # anything we want. "holderName": "holder", "obj": "scopeObj" } # We can't handle having a holderType here assert holderType is None if dealWithOptional: @@ -6572,17 +6574,17 @@ class CGDictionary(CGThing): else: propId = self.makeIdName(member.identifier.name); propCheck = ("JS_HasPropertyById(cx, &val.toObject(), %s, &found)" % propId) propGet = ("JS_GetPropertyById(cx, &val.toObject(), %s, &temp)" % propId) conversionReplacements = { - "prop": self.makeMemberName(member.identifier.name), + "prop": "(this->%s)" % member.identifier.name, "convert": string.Template(templateBody).substitute(replacements), "propCheck": propCheck, "propGet": propGet } conversion = ("if (isNull) {\n" " found = false;\n" "} else if (!${propCheck}) {\n" " return false;\n" @@ -6609,17 +6611,24 @@ class CGDictionary(CGThing): return CGGeneric( string.Template(conversion).substitute(conversionReplacements) ) def getMemberDefinition(self, memberInfo): member = memberInfo[0] declType = memberInfo[1][1] - memberLoc = self.makeMemberName(member.identifier.name) + # Use this->%s to refer to members, because we don't control + # the member names and want to make sure we're talking about + # the member, not some local that shadows the member. Another + # option would be to move the guts of init to a static method + # which is passed an explicit reference to our dictionary + # object, so we couldn't screw this up even if we wanted + # to.... + memberLoc = "(this->%s)" % member.identifier.name if member.defaultValue: memberData = memberLoc else: # The data is inside the Optional<> memberData = "%s.Value()" % memberLoc if self.workers: propDef = (
--- a/dom/bindings/test/TestCodeGen.webidl +++ b/dom/bindings/test/TestCodeGen.webidl @@ -502,17 +502,16 @@ dictionary Dict : ParentDict { long a; long b = 8; long z = 9; DOMString str; DOMString empty = ""; TestEnum otherEnum = "b"; DOMString otherStr = "def"; DOMString? yetAnotherStr = null; - DOMString template; }; dictionary ParentDict : GrandparentDict { long c = 5; TestInterface someInterface; TestExternalInterface someExternalInterface; };
--- a/dom/encoding/TextDecoder.cpp +++ b/dom/encoding/TextDecoder.cpp @@ -26,17 +26,17 @@ TextDecoder::Init(const nsAString& aEnco if (!EncodingUtils::FindEncodingForLabel(label, mEncoding)) { aRv.ThrowTypeError(MSG_ENCODING_NOT_SUPPORTED, &label); return; } // If the constructor is called with an options argument, // and the fatal property of the dictionary is set, // set the internal fatal flag of the decoder object. - mFatal = aFatal.mFatal; + mFatal = aFatal.fatal; // Create a decoder object for mEncoding. nsCOMPtr<nsICharsetConverterManager> ccm = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID); if (!ccm) { aRv.Throw(NS_ERROR_UNEXPECTED); return; } @@ -89,17 +89,17 @@ TextDecoder::Decode(const ArrayBufferVie rv = mDecoder->Convert(data, &length, buf, &outLen); MOZ_ASSERT(mFatal || rv != NS_ERROR_ILLEGAL_INPUT); buf[outLen] = 0; aOutDecodedString.Append(buf, outLen); // If the internal streaming flag of the decoder object is not set, // then reset the encoding algorithm state to the default values - if (!aOptions.mStream) { + if (!aOptions.stream) { mDecoder->Reset(); if (rv == NS_OK_UDEC_MOREINPUT) { if (mFatal) { aRv.Throw(NS_ERROR_DOM_ENCODING_DECODE_ERR); } else { // Need to emit a decode error manually // to simulate the EOF handling of the Encoding spec. aOutDecodedString.Append(kReplacementChar);
--- a/dom/encoding/TextEncoder.cpp +++ b/dom/encoding/TextEncoder.cpp @@ -72,17 +72,17 @@ TextEncoder::Encode(JSContext* aCx, return nullptr; } int32_t dstLen = maxLen; rv = mEncoder->Convert(data, &srcLen, buf, &dstLen); // If the internal streaming flag is not set, then reset // the encoding algorithm state to the default values for encoding. - if (!aOptions.mStream) { + if (!aOptions.stream) { int32_t finishLen = maxLen - dstLen; rv = mEncoder->Finish(buf + dstLen, &finishLen); if (NS_SUCCEEDED(rv)) { dstLen += finishLen; } } JSObject* outView = nullptr;
--- a/dom/network/src/MobileConnection.cpp +++ b/dom/network/src/MobileConnection.cpp @@ -162,17 +162,17 @@ MobileConnection::Observe(nsISupports* a } if (!strcmp(aTopic, kUssdReceivedTopic)) { mozilla::dom::USSDReceivedEventDict dict; bool ok = dict.Init(nsDependentString(aData)); NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE); nsRefPtr<USSDReceivedEvent> event = - USSDReceivedEvent::Create(dict.mMessage, dict.mSessionEnded); + USSDReceivedEvent::Create(dict.message, dict.sessionEnded); NS_ASSERTION(event, "This should never fail!"); nsresult rv = event->Dispatch(ToIDOMEventTarget(), USSDRECEIVED_EVENTNAME); NS_ENSURE_SUCCESS(rv, rv); return NS_OK; } if (!strcmp(aTopic, kDataErrorTopic)) {
--- a/dom/workers/XMLHttpRequest.cpp +++ b/dom/workers/XMLHttpRequest.cpp @@ -1498,18 +1498,18 @@ XMLHttpRequest::Constructor(JSContext* a nsRefPtr<XMLHttpRequest> xhr = new XMLHttpRequest(aCx, workerPrivate); if (!Wrap(aCx, aGlobal, xhr)) { aRv.Throw(NS_ERROR_FAILURE); return NULL; } if (workerPrivate->XHRParamsAllowed()) { - xhr->mMozAnon = aParams.mMozAnon; - xhr->mMozSystem = aParams.mMozSystem; + xhr->mMozAnon = aParams.mozAnon; + xhr->mMozSystem = aParams.mozSystem; } xhr->mJSObject = xhr->GetJSObject(); return xhr; } void XMLHttpRequest::ReleaseProxy(ReleaseType aType)