Bug 1073124 part 1. Hack the "System" global name into the Web IDL parser, since we have no actual Web IDL interface for system globals. r=khuey
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 17 Oct 2014 11:30:18 -0400
changeset 211054 288827a46e4def427c5e17317928d7d5ba5629d9
parent 211053 5bbe8b64b4b7acca37f269d19c5d1d238fa87586
child 211055 06450cede5ecdf9c2a238ab71755c52301bc66fe
push id27667
push usercbook@mozilla.com
push dateMon, 20 Oct 2014 12:40:56 +0000
treeherdermozilla-central@cc2d8bdbccb8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs1073124
milestone36.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 1073124 part 1. Hack the "System" global name into the Web IDL parser, since we have no actual Web IDL interface for system globals. r=khuey
dom/bindings/parser/WebIDL.py
--- a/dom/bindings/parser/WebIDL.py
+++ b/dom/bindings/parser/WebIDL.py
@@ -1064,16 +1064,19 @@ class IDLInterface(IDLObjectWithScope):
                     m.isMethod() and not m.isStatic())) == 1)
 
     def isExposedInWindow(self):
         return 'Window' in self.exposureSet
 
     def isExposedInAnyWorker(self):
         return len(self.getWorkerExposureSet()) > 0
 
+    def isExposedInSystemGlobals(self):
+        return 'BackstagePass' in self.exposureSet
+
     def isExposedOnlyInSomeWorkers(self):
         assert self.isExposedInAnyWorker()
         workerScopes = self.parentScope.globalNameMapping["Worker"]
         return len(workerScopes.difference(self.exposureSet)) > 0
 
     def getWorkerExposureSet(self):
         workerScopes = self.parentScope.globalNameMapping["Worker"]
         return workerScopes.intersection(self.exposureSet)
@@ -5604,16 +5607,20 @@ class Parser(Tokenizer):
                             )
         logger.reportGrammarErrors()
 
         self._globalScope = IDLScope(BuiltinLocation("<Global Scope>"), None, None)
         # To make our test harness work, pretend like we have a primary global already.  Note that we _don't_ set _globalScope.primaryGlobalAttr, so we'll still be able to detect multiple PrimaryGlobal extended attributes.
         self._globalScope.primaryGlobalName = "FakeTestPrimaryGlobal"
         self._globalScope.globalNames.add("FakeTestPrimaryGlobal")
         self._globalScope.globalNameMapping["FakeTestPrimaryGlobal"].add("FakeTestPrimaryGlobal")
+        # And we add the special-cased "System" global name, which
+        # doesn't have any corresponding interfaces.
+        self._globalScope.globalNames.add("System")
+        self._globalScope.globalNameMapping["System"].add("BackstagePass")
         self._installBuiltins(self._globalScope)
         self._productions = []
 
         self._filename = "<builtin>"
         self.lexer.input(Parser._builtins)
         self._filename = None
 
         self.parser.parse(lexer=self.lexer,tracking=True)