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 366827 246124863988
parent 366826 c2b306e94329
child 366828 bcfb78bcc781
push id32108
push usercbook@mozilla.com
push dateFri, 30 Jun 2017 10:57:12 +0000
treeherdermozilla-central@a578ce873d80 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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",