From 249298d20ca3fce762171a367e5277d4dbbbef14 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 29 Dec 2016 13:19:26 -0800 Subject: [PATCH] Bug 1326105 part 4. Remove the now-unused JSContext argument of the protected CallbackObject constructor. r=smaug --- dom/bindings/CallbackFunction.h | 4 ++-- dom/bindings/CallbackInterface.h | 4 ++-- dom/bindings/CallbackObject.h | 2 +- dom/bindings/Codegen.py | 7 +++---- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/dom/bindings/CallbackFunction.h b/dom/bindings/CallbackFunction.h index ac2b3e8b3531..648c7dde2207 100644 --- a/dom/bindings/CallbackFunction.h +++ b/dom/bindings/CallbackFunction.h @@ -63,10 +63,10 @@ protected: } // See CallbackObject for an explanation of the arguments. - CallbackFunction(JSContext* aCx, JS::Handle aCallable, + CallbackFunction(JS::Handle aCallable, nsIGlobalObject* aIncumbentGlobal, const FastCallbackConstructor&) - : CallbackObject(aCx, aCallable, aIncumbentGlobal, + : CallbackObject(aCallable, aIncumbentGlobal, FastCallbackConstructor()) { } diff --git a/dom/bindings/CallbackInterface.h b/dom/bindings/CallbackInterface.h index 3ba5182e7e9a..4c64e3605423 100644 --- a/dom/bindings/CallbackInterface.h +++ b/dom/bindings/CallbackInterface.h @@ -44,10 +44,10 @@ protected: JS::MutableHandle aCallable); // See CallbackObject for an explanation of the arguments. - CallbackInterface(JSContext* aCx, JS::Handle aCallable, + CallbackInterface(JS::Handle aCallable, nsIGlobalObject* aIncumbentGlobal, const FastCallbackConstructor&) - : CallbackObject(aCx, aCallable, aIncumbentGlobal, + : CallbackObject(aCallable, aIncumbentGlobal, FastCallbackConstructor()) { } diff --git a/dom/bindings/CallbackObject.h b/dom/bindings/CallbackObject.h index aa194df3e32c..82af426af88d 100644 --- a/dom/bindings/CallbackObject.h +++ b/dom/bindings/CallbackObject.h @@ -232,7 +232,7 @@ protected: // 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 aCallback, + CallbackObject(JS::Handle aCallback, nsIGlobalObject* aIncumbentGlobal, const FastCallbackConstructor&) { diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py index 6467f5c65cba..f296e76f8663 100644 --- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -15176,15 +15176,14 @@ class CGCallback(CGClass): ], body=body), ClassConstructor( - [Argument("JSContext*", "aCx"), - Argument("JS::Handle", "aCallback"), + [Argument("JS::Handle", "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( @@ -15364,7 +15363,7 @@ class CGFastCallback(CGClass): visibility="public", explicit=True, baseConstructors=[ - "%s(aCx, aCallback, aIncumbentGlobal, FastCallbackConstructor())" % + "%s(aCallback, aIncumbentGlobal, FastCallbackConstructor())" % baseName, ], body="")