Bug 1348099 part 3 - Fix the codegen so the methods for clearing cached attribute values are not unforgeable. r=bz
authorTing-Yu Chou <janus926@gmail.com>
Thu, 29 Jun 2017 17:54:20 +0800
changeset 366826 246124863988
parent 366825 c2b306e94329
child 366827 bcfb78bcc781
push id45755
push usertchou@mozilla.com
push dateFri, 30 Jun 2017 05:37:58 +0000
treeherderautoland@246124863988 [default view] [failures only]
reviewersbz
bugs1348099
milestone56.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 1348099 part 3 - Fix the codegen so the methods for clearing cached attribute values are not unforgeable. r=bz Current codegen list the methods for clearing cached attribute values in both chrome only unforgeable methods and chrome only normal methods, but they should exist only in the normal ones. MozReview-Commit-ID: Il2JvCLZ2v3
dom/bindings/Codegen.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -2564,17 +2564,17 @@ class MethodDefiner(PropertyDefiner):
                     self.chrome.append({
                         "name": '_create',
                         "nativeName": ("%s::_Create" % descriptor.name),
                         "methodInfo": False,
                         "length": 2,
                         "flags": "0",
                         "condition": MemberCondition()
                     })
-            else:
+            elif not unforgeable:
                 for m in clearableCachedAttrs(descriptor):
                     attrName = MakeNativeName(m.identifier.name)
                     self.chrome.append({
                         "name": "_clearCached%sValue" % attrName,
                         "nativeName": MakeJSImplClearCachedValueNativeName(m),
                         "methodInfo": False,
                         "length": "0",
                         "flags": "0",