Bug 1326105 part 4. Remove the now-unused JSContext argument of the protected CallbackObject constructor. r=smaug
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 29 Dec 2016 13:19:26 -0800
changeset 327618 413acc1afbd6495c07003b364f70ef978a232c1d
parent 327617 56abaeb568041617481b82dffaa4d6a82a5d2def
child 327619 9fdb9ee08a3071c42c30e239cb4b2b6cfba2833c
push id31139
push userryanvm@gmail.com
push dateFri, 30 Dec 2016 15:04:57 +0000
treeherdermozilla-central@9104708cc3ac [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1326105
milestone53.0a1
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
Bug 1326105 part 4. Remove the now-unused JSContext argument of the protected CallbackObject constructor. r=smaug
dom/bindings/CallbackFunction.h
dom/bindings/CallbackInterface.h
dom/bindings/CallbackObject.h
dom/bindings/Codegen.py
--- a/dom/bindings/CallbackFunction.h
+++ b/dom/bindings/CallbackFunction.h
@@ -58,20 +58,20 @@ public:
 
 protected:
   explicit CallbackFunction(CallbackFunction* aCallbackFunction)
     : CallbackObject(aCallbackFunction)
   {
   }
 
   // See CallbackObject for an explanation of the arguments.
-  CallbackFunction(JSContext* aCx, JS::Handle<JSObject*> aCallable,
+  CallbackFunction(JS::Handle<JSObject*> aCallable,
                    nsIGlobalObject* aIncumbentGlobal,
                    const FastCallbackConstructor&)
-    : CallbackObject(aCx, aCallable, aIncumbentGlobal,
+    : CallbackObject(aCallable, aIncumbentGlobal,
                      FastCallbackConstructor())
   {
   }
 };
 
 } // namespace dom
 } // namespace mozilla
 
--- a/dom/bindings/CallbackInterface.h
+++ b/dom/bindings/CallbackInterface.h
@@ -39,20 +39,20 @@ public:
   {
   }
 
 protected:
   bool GetCallableProperty(JSContext* cx, JS::Handle<jsid> aPropId,
                            JS::MutableHandle<JS::Value> aCallable);
 
   // See CallbackObject for an explanation of the arguments.
-  CallbackInterface(JSContext* aCx, JS::Handle<JSObject*> aCallable,
+  CallbackInterface(JS::Handle<JSObject*> aCallable,
                     nsIGlobalObject* aIncumbentGlobal,
                     const FastCallbackConstructor&)
-    : CallbackObject(aCx, aCallable, aIncumbentGlobal,
+    : CallbackObject(aCallable, aIncumbentGlobal,
                      FastCallbackConstructor())
   {
   }
 };
 
 } // namespace dom
 } // namespace mozilla
 
--- a/dom/bindings/CallbackObject.h
+++ b/dom/bindings/CallbackObject.h
@@ -227,17 +227,17 @@ protected:
   struct FastCallbackConstructor {
   };
 
   // Just like the public version without the FastCallbackConstructor argument,
   // except for not calling HoldJSObjects and not capturing async stacks (on the
   // assumption that we will do that last whenever we decide to actually
   // HoldJSObjects; see FinishSlowJSInitIfMoreThanOneOwner).  If you use this,
   // you MUST ensure that the object is traced until the HoldJSObjects happens!
-  CallbackObject(JSContext* aCx, JS::Handle<JSObject*> aCallback,
+  CallbackObject(JS::Handle<JSObject*> aCallback,
                  nsIGlobalObject* aIncumbentGlobal,
                  const FastCallbackConstructor&)
   {
     InitNoHold(aCallback, nullptr, aIncumbentGlobal);
   }
 
   // mCallback is not unwrapped, so it can be a cross-compartment-wrapper.
   // This is done to ensure that, if JS code can't call a callback f(), or get
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -15171,25 +15171,24 @@ class CGCallback(CGClass):
                 bodyInHeader=True,
                 visibility="public",
                 explicit=True,
                 baseConstructors=[
                     "%s(aCx, aCallback, aIncumbentGlobal)" % self.baseName,
                 ],
                 body=body),
             ClassConstructor(
-                [Argument("JSContext*", "aCx"),
-                 Argument("JS::Handle<JSObject*>", "aCallback"),
+                [Argument("JS::Handle<JSObject*>", "aCallback"),
                  Argument("nsIGlobalObject*", "aIncumbentGlobal"),
                  Argument("const FastCallbackConstructor&", "")],
                 bodyInHeader=True,
                 visibility="public",
                 explicit=True,
                 baseConstructors=[
-                    "%s(aCx, aCallback, aIncumbentGlobal, FastCallbackConstructor())" % self.baseName,
+                    "%s(aCallback, aIncumbentGlobal, FastCallbackConstructor())" % self.baseName,
                 ],
                 body=body),
             ClassConstructor(
                 [Argument("JS::Handle<JSObject*>", "aCallback"),
                  Argument("JS::Handle<JSObject*>", "aAsyncStack"),
                  Argument("nsIGlobalObject*", "aIncumbentGlobal")],
                 bodyInHeader=True,
                 visibility="public",
@@ -15359,17 +15358,17 @@ class CGFastCallback(CGClass):
         constructor = ClassConstructor(
             [Argument("JSContext*", "aCx"),
              Argument("JS::Handle<JSObject*>", "aCallback"),
              Argument("nsIGlobalObject*", "aIncumbentGlobal")],
             bodyInHeader=True,
             visibility="public",
             explicit=True,
             baseConstructors=[
-                "%s(aCx, aCallback, aIncumbentGlobal, FastCallbackConstructor())" %
+                "%s(aCallback, aIncumbentGlobal, FastCallbackConstructor())" %
                 baseName,
             ],
             body="")
 
         traceMethod = ClassMethod("Trace", "void",
                                   [Argument("JSTracer*", "aTracer")],
                                   inline=True,
                                   bodyInHeader=True,