Bug 1535135. Annotate static binding methods/getters/setters as MOZ_CAN_RUN_SCRIPT. r=qdot
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 13 Mar 2019 20:50:36 +0000
changeset 521825 63b6e32fe386db2fe5772b2b3627669cdf8be30a
parent 521824 64f68305520218d7655672aceebbae9122d38729
child 521826 88ea72c345aba0ede0433cc0db9e86bff5525bc1
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqdot
bugs1535135
milestone67.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 1535135. Annotate static binding methods/getters/setters as MOZ_CAN_RUN_SCRIPT. r=qdot We do this for non-static ones already; we should do it for static ones too. Differential Revision: https://phabricator.services.mozilla.com/D23390
dom/bindings/Codegen.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -8719,17 +8719,18 @@ class CGAbstractStaticBindingMethod(CGAb
     Common class to generate the JSNatives for all our static methods, getters
     and setters.  This will generate the function declaration and unwrap the
     global object.  Subclasses are expected to override the generate_code
     function to do the rest of the work.  This function should return a
     CGThing which is already properly indented.
     """
     def __init__(self, descriptor, name):
         CGAbstractStaticMethod.__init__(self, descriptor, name, "bool",
-                                        JSNativeArguments())
+                                        JSNativeArguments(),
+                                        canRunScript=True)
 
     def definition_body(self):
         # Make sure that "obj" is in the same compartment as "cx", since we'll
         # later use it to wrap return values.
         unwrap = dedent("""
             JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
             JS::Rooted<JSObject*> obj(cx, &args.callee());