Backed out 6 changesets (bug 868996, bug 867903, bug 869014, bug 870219, bug 861587) for PGO bustage.
authorRyan VanderMeulen <ryanvm@gmail.com>
Thu, 09 May 2013 17:11:59 -0400
changeset 138223 0871f59b1ad5cca23562a3316c6eb53b910301df
parent 138222 7c6a585b31802ae33f104438072a2668d1a9dc7d
child 138224 59347767166eff194c52b76e8231c6c4e343d8c9
push id3752
push userlsblakk@mozilla.com
push dateMon, 13 May 2013 17:21:10 +0000
treeherdermozilla-aurora@1580544aef0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs868996, 867903, 869014, 870219, 861587
milestone23.0a1
Backed out 6 changesets (bug 868996, bug 867903, bug 869014, bug 870219, bug 861587) for PGO bustage. CLOSED TREE
config/rules.mk
dom/base/nsGlobalWindow.cpp
dom/base/test/Makefile.in
dom/base/test/test_setting_opener.html
dom/bindings/BindingGen.py
dom/bindings/Codegen.py
dom/bindings/Configuration.py
dom/bindings/ExampleGen.py
dom/bindings/GlobalGen.py
dom/bindings/Makefile.in
dom/bindings/parser/WebIDL.py
dom/bindings/parser/tests/test_interface.py
dom/bindings/test/Makefile.in
dom/webidl/ClientRectList.webidl
dom/webidl/Document.webidl
dom/webidl/FileHandle.webidl
dom/webidl/HTMLCollection.webidl
dom/webidl/HTMLElement.webidl
dom/webidl/HTMLOptionsCollection.webidl
dom/webidl/MozNamedAttrMap.webidl
dom/webidl/PaintRequest.webidl
dom/webidl/Range.webidl
dom/webidl/SVGMaskElement.webidl
dom/webidl/SVGSVGElement.webidl
dom/webidl/WebComponents.webidl
dom/webidl/WebGLRenderingContext.webidl
dom/webidl/XMLStylesheetProcessingInstruction.webidl
js/src/config/rules.mk
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -1614,31 +1614,16 @@ ifneq (,$(MDDEPEND_FILES))
 ifdef .PYMAKE
 includedeps $(MDDEPEND_FILES)
 else
 include $(MDDEPEND_FILES)
 endif
 endif
 
 endif
-
-
-ifneq (,$(filter export,$(MAKECMDGOALS)))
-MDDEPEND_FILES		:= $(strip $(wildcard $(addprefix $(MDDEPDIR)/,$(EXTRA_EXPORT_MDDEPEND_FILES))))
-
-ifneq (,$(MDDEPEND_FILES))
-ifdef .PYMAKE
-includedeps $(MDDEPEND_FILES)
-else
-include $(MDDEPEND_FILES)
-endif
-endif
-
-endif
-
 #############################################################################
 
 -include $(topsrcdir)/$(MOZ_BUILD_APP)/app-rules.mk
 -include $(MY_RULES)
 
 #
 # Generate Emacs tags in a file named TAGS if ETAGS was set in $(MY_CONFIG)
 # or in $(MY_RULES)
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -3880,47 +3880,19 @@ nsGlobalWindow::GetOpener(nsIDOMWindow**
 
   NS_IF_ADDREF(*aOpener);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsGlobalWindow::SetOpener(nsIDOMWindow* aOpener)
 {
-  // Check if we were called from a privileged chrome script.  If not, and if
-  // aOpener is not null, just define aOpener on our inner window's JS object,
-  // wapped into the current compartment so that for Xrays we define on the Xray
-  // expando object, but don't set it on the outer window, so that it'll get
-  // reset on navigation.  This is just like replaceable properties, but we're
-  // not quite readonly.
+  // check if we were called from a privileged chrome script.
+  // If not, opener is settable only to null.
   if (aOpener && !nsContentUtils::IsCallerChrome()) {
-    // JS_WrapObject will outerize, so we don't care if aOpener is an inner.
-    nsCOMPtr<nsIGlobalObject> glob = do_QueryInterface(aOpener);
-    NS_ENSURE_STATE(glob);
-
-    AutoJSContext cx;
-    JSAutoRequest ar(cx);
-    // Note we explicitly do NOT enter any particular compartment here; we want
-    // the caller compartment in cases when we have a caller, so that we define
-    // expandos on Xrays as needed.
-
-    JS::Rooted<JSObject*> otherObj(cx, glob->GetGlobalJSObject());
-    NS_ENSURE_STATE(otherObj);
-
-    JS::Rooted<JSObject*> thisObj(cx, mJSObject);
-    NS_ENSURE_STATE(mJSObject);
-
-    if (!JS_WrapObject(cx, otherObj.address()) ||
-        !JS_WrapObject(cx, thisObj.address()) ||
-        !JS_DefineProperty(cx, thisObj, "opener", JS::ObjectValue(*otherObj),
-                           JS_PropertyStub, JS_StrictPropertyStub,
-                           JSPROP_ENUMERATE)) {
-      return NS_ERROR_FAILURE;
-    }
-
     return NS_OK;
   }
 
   SetOpenerWindow(aOpener, false);
 
   return NS_OK;
 }
 
--- a/dom/base/test/Makefile.in
+++ b/dom/base/test/Makefile.in
@@ -24,17 +24,16 @@ MOCHITEST_FILES = \
   test_window_constructor.html \
   test_window_enumeration.html \
   test_window_extensible.html \
   test_window_indexing.html \
   test_writable-replaceable.html \
   test_domcursor.html \
   test_named_frames.html \
   test_Image_constructor.html \
-  test_setting_opener.html \
   $(NULL)
 
 MOCHITEST_CHROME_FILES = \
    test_bug715041.xul \
    test_bug715041_removal.xul \
    $(NULL)
 
 include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/dom/base/test/test_setting_opener.html
+++ /dev/null
@@ -1,106 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=868996
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 868996</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-  <script type="application/javascript">
-
-  /** Test for Bug 868996 **/
-  SimpleTest.waitForExplicitFinish();
-
-  var sb1, sb2;
-  var Cu = SpecialPowers.Cu;
-  
-  function testOpenerSet() {
-    // Use setTimeout to make the relevant onerror run in this window
-    var win = window.open("data:text/html,<script>opener.setTimeout(opener.basicOpenerTest, 0, this)</" + "script>");
-    // A sandbox for the window
-    sb1 = new Cu.Sandbox(win, {wantXrays: true })
-    sb1.win = win
-    // And a sandbox using the expanded principal.
-    sb2 = new Cu.Sandbox([win], {wantXrays: true })
-    sb2.win = win
-  }
-
-  function evalsb(str, sb) {
-    // Have to unwrap() to get objects we care about
-    return SpecialPowers.unwrap(Cu.evalInSandbox(str, sb));
-  }
-
-  function basicOpenerTest(win) {
-    is(win.opener, window, "Opening a window should give it the right opener");
-    is(evalsb("win.opener", sb1), window,
-       "Reading opener in sandbox 1 should work");
-    is(evalsb("win.opener", sb2), window,
-       "Reading opener in sandbox 2 should work");
-
-    win.opener = $("x").contentWindow;
-    evalsb("win.opener = win.opener.document.getElementById('y').contentWindow", sb1);
-    evalsb("win.opener = win.opener.document.getElementById('z').contentWindow", sb2);
-
-    is(win.opener, $("x").contentWindow, "Should be able to set an opener to a different window");
-    is(evalsb("win.opener", sb1), $("y").contentWindow,
-       "Should be able to set the opener to a different window in a sandbox one");
-    is(evalsb("win.opener", sb2), $("z").contentWindow,
-       "Should be able to set the opener to a different window in a sandbox two");
-
-    win.location = "data:text/html,<script>opener.setTimeout(opener.continueOpenerTest, 0, this);</" + "script>";
-  }
-
-  function continueOpenerTest(win) {
-    is(win.opener, window, "Navigating a window should have reset the opener we stashed on it temporarily");
-    is(evalsb("win.opener", sb1), window,
-       "Navigating a window should have reset the opener in sb1");
-    is(evalsb("win.opener", sb2), window,
-       "Navigating a window should have reset the opener in sb2");
-
-    win.opener = null;
-    is(win.opener, null, "Should be able to set the opener to null");
-    is(evalsb("win.opener", sb1), null,
-       "Setting the opener to null should be visible in sb1");
-    is(evalsb("win.opener", sb2), null,
-       "Setting the opener to null should be visible in sb2");
-
-    win.location = "data:text/html,Loaded";
-    // Now poll for that load, since we have no way for the window to
-    // communicate with us now
-    setTimeout(checkForLoad, 0, win);
-  }
-
-  function checkForLoad(win) {
-    if (!win.document.documentElement ||
-        win.document.documentElement.textContent != "Loaded") {
-      setTimeout(checkForLoad, 0, win);
-      return;
-    }
-
-    is(win.opener, null, "Null opener should persist across navigations");
-    is(evalsb("win.opener", sb1), null,
-       "Null opener should persist across navigations in sb1");
-    is(evalsb("win.opener", sb2), null,
-       "Null opener should persist across navigations in sb2");
-
-    win.close();
-    SimpleTest.finish();
-  }
-
-  addLoadEvent(testOpenerSet);
-  </script>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=868996">Mozilla Bug 868996</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-<iframe id="x"></iframe>
-<iframe id="y"></iframe>
-<iframe id="z"></iframe>
-</div>
-<pre id="test">
-</pre>
-</body>
-</html>
--- a/dom/bindings/BindingGen.py
+++ b/dom/bindings/BindingGen.py
@@ -1,65 +1,76 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 import os
 import cPickle
 from Configuration import Configuration
-from Codegen import CGBindingRoot, replaceFileIfChanged
+from Codegen import CGBindingRoot
 
-def generate_binding_files(config, outputprefix, srcprefix, webidlfile):
+def generate_binding_header(config, outputprefix, srcprefix, webidlfile):
     """
     |config| Is the configuration object.
     |outputprefix| is a prefix to use for the header guards and filename.
     """
 
-    depsname = ".deps/" + outputprefix + ".pp"
+    filename = outputprefix + ".h"
+    depsname = ".deps/" + filename + ".pp"
     root = CGBindingRoot(config, outputprefix, webidlfile)
-    replaceFileIfChanged(outputprefix + ".h", root.declare())
-    replaceFileIfChanged(outputprefix + ".cpp", root.define())
-
+    with open(filename, 'wb') as f:
+        f.write(root.declare())
     with open(depsname, 'wb') as f:
         # Sort so that our output is stable
-        f.write("\n".join(outputprefix + ": " + os.path.join(srcprefix, x) for
+        f.write("\n".join(filename + ": " + os.path.join(srcprefix, x) for
+                          x in sorted(root.deps())))
+
+def generate_binding_cpp(config, outputprefix, srcprefix, webidlfile):
+    """
+    |config| Is the configuration object.
+    |outputprefix| is a prefix to use for the header guards and filename.
+    """
+
+    filename = outputprefix + ".cpp"
+    depsname = ".deps/" + filename + ".pp"
+    root = CGBindingRoot(config, outputprefix, webidlfile)
+    with open(filename, 'wb') as f:
+        f.write(root.define())
+    with open(depsname, 'wb') as f:
+        f.write("\n".join(filename + ": " + os.path.join(srcprefix, x) for
                           x in sorted(root.deps())))
 
 def main():
+
     # Parse arguments.
     from optparse import OptionParser
     usagestring = "usage: %prog [header|cpp] configFile outputPrefix srcPrefix webIDLFile"
     o = OptionParser(usage=usagestring)
     o.add_option("--verbose-errors", action='store_true', default=False,
                  help="When an error happens, display the Python traceback.")
     (options, args) = o.parse_args()
 
-    configFile = os.path.normpath(args[0])
-    srcPrefix = os.path.normpath(args[1])
+    if len(args) != 5 or (args[0] != "header" and args[0] != "cpp"):
+        o.error(usagestring)
+    buildTarget = args[0]
+    configFile = os.path.normpath(args[1])
+    outputPrefix = args[2]
+    srcPrefix = os.path.normpath(args[3])
+    webIDLFile = os.path.normpath(args[4])
 
-    # Load the configuration
+    # Load the parsing results
     f = open('ParserResults.pkl', 'rb')
-    config = cPickle.load(f)
+    parserData = cPickle.load(f)
     f.close()
 
-    def readFile(f):
-        file = open(f, 'rb')
-        try:
-            contents = file.read()
-        finally:
-            file.close()
-        return contents
-    allWebIDLFiles = readFile(args[2]).split()
-    changedDeps = readFile(args[3]).split()
+    # Create the configuration data.
+    config = Configuration(configFile, parserData)
 
-    if all(f.endswith("Binding") or f == "ParserResults.pkl" for f in changedDeps):
-        toRegenerate = filter(lambda f: f.endswith("Binding"), changedDeps)
-        toRegenerate = map(lambda f: f[:-len("Binding")] + ".webidl", toRegenerate)
+    # Generate the prototype classes.
+    if buildTarget == "header":
+        generate_binding_header(config, outputPrefix, srcPrefix, webIDLFile);
+    elif buildTarget == "cpp":
+        generate_binding_cpp(config, outputPrefix, srcPrefix, webIDLFile);
     else:
-        toRegenerate = allWebIDLFiles
-
-    for webIDLFile in toRegenerate:
-        assert webIDLFile.endswith(".webidl")
-        outputPrefix = webIDLFile[:-len(".webidl")] + "Binding"
-        generate_binding_files(config, outputPrefix, srcPrefix, webIDLFile);
+        assert False # not reached
 
 if __name__ == '__main__':
     main()
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -352,20 +352,17 @@ static DOMIfaceAndProtoJSClass Interface
 
 class CGList(CGThing):
     """
     Generate code for a list of GCThings.  Just concatenates them together, with
     an optional joiner string.  "\n" is a common joiner.
     """
     def __init__(self, children, joiner=""):
         CGThing.__init__(self)
-        # Make a copy of the kids into a list, because if someone passes in a
-        # generator we won't be able to both declare and define ourselves, or
-        # define ourselves more than once!
-        self.children = list(children)
+        self.children = children
         self.joiner = joiner
     def append(self, child):
         self.children.append(child)
     def prepend(self, child):
         self.children.insert(0, child)
     def join(self, generator):
         return self.joiner.join(filter(lambda s: len(s) > 0, (child for child in generator)))
     def declare(self):
--- a/dom/bindings/Configuration.py
+++ b/dom/bindings/Configuration.py
@@ -55,29 +55,16 @@ class Configuration:
 
         # Mark the descriptors for which the nativeType corresponds to exactly
         # one interface.
         for descriptor in self.descriptors:
             descriptor.unsharedImplementation = all(
                 d.nativeType != descriptor.nativeType or d == descriptor
                 for d in self.descriptors)
 
-        # Keep the descriptor list sorted for determinism.
-        self.descriptors.sort(lambda x,y: cmp(x.name, y.name))
-
-        self.descriptorsByName = {}
-        for d in self.descriptors:
-            self.descriptorsByName.setdefault(d.interface.identifier.name,
-                                              []).append(d)
-
-        self.descriptorsByFile = {}
-        for d in self.descriptors:
-            self.descriptorsByFile.setdefault(d.interface.filename(),
-                                              []).append(d)
-
         self.enums = [e for e in parseData if e.isEnum()]
 
         # Figure out what our main-thread and worker dictionaries and callbacks
         # are.
         mainTypes = set()
         for descriptor in ([self.getDescriptor("DummyInterface", workers=False)] +
                            self.getDescriptors(workers=False, isExternal=False, skipGen=False)):
             mainTypes |= set(getFlatTypes(getTypesFromDescriptor(descriptor)))
@@ -98,32 +85,27 @@ class Configuration:
                 if item in main:
                     item.setUserData("mainThread", True)
                 if item in worker:
                     item.setUserData("workers", True)
         flagWorkerOrMainThread(self.dictionaries, mainDictionaries,
                                workerDictionaries);
         flagWorkerOrMainThread(self.callbacks, mainCallbacks, workerCallbacks)
 
+        # Keep the descriptor list sorted for determinism.
+        self.descriptors.sort(lambda x,y: cmp(x.name, y.name))
+
     def getInterface(self, ifname):
         return self.interfaces[ifname]
     def getDescriptors(self, **filters):
         """Gets the descriptors that match the given filters."""
         curr = self.descriptors
-        # Collect up our filters, because we may have a webIDLFile filter that
-        # we always want to apply first.
-        tofilter = []
         for key, val in filters.iteritems():
             if key == 'webIDLFile':
-                # Special-case this part to make it fast, since most of our
-                # getDescriptors calls are conditioned on a webIDLFile.  We may
-                # not have this key, in which case we have no descriptors
-                # either.
-                curr = self.descriptorsByFile.get(val, [])
-                continue
+                getter = lambda x: x.interface.filename()
             elif key == 'hasInterfaceObject':
                 getter = lambda x: (not x.interface.isExternal() and
                                     x.interface.hasInterfaceObject())
             elif key == 'hasInterfacePrototypeObject':
                 getter = lambda x: (not x.interface.isExternal() and
                                     x.interface.hasInterfacePrototypeObject())
             elif key == 'hasInterfaceOrInterfacePrototypeObject':
                 getter = lambda x: x.hasInterfaceOrInterfacePrototypeObject()
@@ -131,22 +113,18 @@ class Configuration:
                 getter = lambda x: x.interface.isCallback()
             elif key == 'isExternal':
                 getter = lambda x: x.interface.isExternal()
             elif key == 'isJSImplemented':
                 getter = lambda x: x.interface.isJSImplemented()
             elif key == 'isNavigatorProperty':
                 getter = lambda x: x.interface.getNavigatorProperty() != None
             else:
-                # Have to watch out: just closing over "key" is not enough,
-                # since we're about to mutate its value
-                getter = (lambda attrName: lambda x: getattr(x, attrName))(key)
-            tofilter.append((getter, val))
-        for f in tofilter:
-            curr = filter(lambda x: f[0](x) == f[1], curr)
+                getter = lambda x: getattr(x, key)
+            curr = filter(lambda x: getter(x) == val, curr)
         return curr
     def getEnums(self, webIDLFile):
         return filter(lambda e: e.filename() == webIDLFile, self.enums)
 
     @staticmethod
     def _filterForFileAndWorkers(items, filters):
         """Gets the items that match the given filters."""
         for key, val in filters.iteritems():
@@ -165,21 +143,27 @@ class Configuration:
     def getCallbacks(self, **filters):
         return self._filterForFileAndWorkers(self.callbacks, filters)
 
     def getDescriptor(self, interfaceName, workers):
         """
         Gets the appropriate descriptor for the given interface name
         and the given workers boolean.
         """
-        for d in self.descriptorsByName[interfaceName]:
-            if d.workers == workers:
-                return d
+        iface = self.getInterface(interfaceName)
+        descriptors = self.getDescriptors(interface=iface)
+
+        # The only filter we currently have is workers vs non-workers.
+        matches = filter(lambda x: x.workers is workers, descriptors)
 
-        raise NoSuchDescriptorError("For " + interfaceName + " found no matches");
+        # After filtering, we should have exactly one result.
+        if len(matches) is not 1:
+            raise NoSuchDescriptorError("For " + interfaceName + " found " +
+                                        str(len(matches)) + " matches");
+        return matches[0]
     def getDescriptorProvider(self, workers):
         """
         Gets a descriptor provider that can provide descriptors as needed,
         for the given workers boolean
         """
         return DescriptorProvider(self, workers)
 
 class NoSuchDescriptorError(TypeError):
--- a/dom/bindings/ExampleGen.py
+++ b/dom/bindings/ExampleGen.py
@@ -29,18 +29,21 @@ def main():
                  help="When an error happens, display the Python traceback.")
     (options, args) = o.parse_args()
 
     if len(args) != 2:
         o.error(usagestring)
     configFile = os.path.normpath(args[0])
     interfaceName = args[1]
 
-    # Load the configuration
+    # Load the parsing results
     f = open('ParserResults.pkl', 'rb')
-    config = cPickle.load(f)
+    parserData = cPickle.load(f)
     f.close()
 
+    # Create the configuration data.
+    config = Configuration(configFile, parserData)
+
     # Generate the example class.
     generate_interface_example(config, interfaceName)
 
 if __name__ == '__main__':
     main()
--- a/dom/bindings/GlobalGen.py
+++ b/dom/bindings/GlobalGen.py
@@ -50,24 +50,24 @@ def main():
     for filename in fileList:
         fullPath = os.path.normpath(os.path.join(baseDir, filename))
         f = open(fullPath, 'rb')
         lines = f.readlines()
         f.close()
         parser.parse(''.join(lines), fullPath)
     parserResults = parser.finish()
 
+    # Write the parser results out to a pickle.
+    resultsFile = open('ParserResults.pkl', 'wb')
+    cPickle.dump(parserResults, resultsFile, -1)
+    resultsFile.close()
+
     # Load the configuration.
     config = Configuration(configFile, parserResults)
 
-    # Write the configuration out to a pickle.
-    resultsFile = open('ParserResults.pkl', 'wb')
-    cPickle.dump(config, resultsFile, -1)
-    resultsFile.close()
-
     # Generate the prototype list.
     generate_file(config, 'PrototypeList', 'declare')
 
     # Generate the common code.
     generate_file(config, 'RegisterBindings', 'declare')
     generate_file(config, 'RegisterBindings', 'define')
 
     generate_file(config, 'UnionTypes', 'declare')
--- a/dom/bindings/Makefile.in
+++ b/dom/bindings/Makefile.in
@@ -28,55 +28,33 @@ exported_binding_headers := $(subst .web
 # Set linked_binding_cpp_files before adding the test IDL to the mix
 linked_binding_cpp_files := $(subst .webidl,Binding.cpp,$(all_webidl_files))
 
 all_webidl_files += $(test_webidl_files)
 
 binding_header_files := $(subst .webidl,Binding.h,$(all_webidl_files))
 binding_cpp_files := $(subst .webidl,Binding.cpp,$(all_webidl_files))
 
-# We want to be able to only regenerate the .cpp and .h files that really need
-# to change when a .webidl file changes.  We do this by making the
-# binding_dependency_trackers targets have dependencies on the right .webidl
-# files via generated .pp files, having a .BindingGen target that depends on the
-# binding_dependency_trackers and which has all the generated binding .h/.cpp
-# depending on it, and then in the make commands for that target being able to
-# check which exact binding_dependency_trackers changed.
-binding_dependency_trackers := $(subst .webidl,Binding,$(all_webidl_files))
-
 globalgen_targets := \
   PrototypeList.h \
   RegisterBindings.h \
   RegisterBindings.cpp \
   UnionTypes.h \
   UnionTypes.cpp \
   UnionConversions.h \
   $(NULL)
 
-# Nasty hack: when the test/Makefile.in invokes us to do codegen, it
-# uses a target of
-# "export TestExampleInterface-example TestExampleProxyInterface-example".
-# We don't actually need to load our .o.pp files in that case, so just
-# pretend like we have no CPPSRCS if that's the target.  It makes the
-# test cycle much faster, which is why we're doing it.
-#
-# XXXbz We could try to cheat even more and only include our CPPSRCS
-# when $(MAKECMDGOALS) contains libs, so that we can skip loading all
-# those .o.pp when trying to make a single .cpp file too, but that
-# would break |make FooBinding.o(bj)|.  Ah, well.
-ifneq (export TestExampleInterface-example TestExampleProxyInterface-example,$(MAKECMDGOALS))
 CPPSRCS = \
   $(linked_binding_cpp_files) \
   $(filter %.cpp, $(globalgen_targets)) \
   BindingUtils.cpp \
   CallbackInterface.cpp \
   CallbackObject.cpp \
   DOMJSProxyHandler.cpp \
   $(NULL)
-endif
 
 LOCAL_INCLUDES += -I$(topsrcdir)/js/xpconnect/src \
   -I$(topsrcdir)/js/xpconnect/wrappers \
   -I$(topsrcdir)/content/canvas/src \
   -I$(topsrcdir)/content/html/content/src \
   -I$(topsrcdir)/media/webrtc/signaling/src/peerconnection \
   -I$(topsrcdir)/dom/base \
   -I$(topsrcdir)/dom/battery \
@@ -96,37 +74,44 @@ LOCAL_INCLUDES += \
 endif
 
 ifdef MOZ_B2G_RIL
 LOCAL_INCLUDES += \
   -I$(topsrcdir)/dom/icc/src \
   $(NULL)
 endif
 
-EXTRA_EXPORT_MDDEPEND_FILES := $(addsuffix .pp,$(binding_dependency_trackers))
+EXTRA_MDDEPEND_FILES := $(addsuffix .pp,$(binding_cpp_files) $(binding_header_files))
 
 EXPORTS_GENERATED_FILES := $(exported_binding_headers)
 EXPORTS_GENERATED_DEST := $(DIST)/include/$(binding_include_path)
-EXPORTS_GENERATED_TARGET := export
+EXPORTS_GENERATED_TARGET := webidl-export
 INSTALL_TARGETS += EXPORTS_GENERATED
 
 ifdef GNU_CC
 CXXFLAGS += -Wno-uninitialized
 endif
 
 include $(topsrcdir)/config/rules.mk
 
+# edmorley is sick of clobbering everytime someone adds an interface
+$(CPPOBJS): PrototypeList.h
+
+# We need to create a separate target so we can ensure that the pickle is
+# done before generating headers.
+export:: ParserResults.pkl
+	$(MAKE) webidl-export
+
 # If you change bindinggen_dependencies here, change it in
 # dom/bindings/test/Makefile.in too.
 bindinggen_dependencies := \
   BindingGen.py \
   Bindings.conf \
   Configuration.py \
   Codegen.py \
-  ParserResults.pkl \
   parser/WebIDL.py \
   $(GLOBAL_DEPS) \
   $(NULL)
 
 CSS2Properties.webidl: $(topsrcdir)/layout/style/nsCSSPropList.h \
                        $(topsrcdir)/layout/style/nsCSSPropAliasList.h \
                        $(webidl_base)/CSS2Properties.webidl.in \
                        $(webidl_base)/CSS2PropertiesProps.h \
@@ -137,30 +122,45 @@ CSS2Properties.webidl: $(topsrcdir)/layo
 	  $(srcdir)/GenerateCSS2PropertiesWebIDL.py $(webidl_base)/CSS2Properties.webidl.in > CSS2Properties.webidl
 
 $(webidl_files): %: $(webidl_base)/%
 	$(INSTALL) $(IFLAGS1) $(webidl_base)/$* .
 
 $(test_webidl_files): %: $(srcdir)/test/%
 	$(INSTALL) $(IFLAGS1) $(srcdir)/test/$* .
 
-$(binding_header_files): .BindingGen
-
-$(binding_cpp_files): .BindingGen
+$(binding_header_files): %Binding.h: $(bindinggen_dependencies) \
+                                     %.webidl \
+                                     $(call mkdir_deps,$(MDDEPDIR)) \
+                                     $(NULL)
+	PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
+	  $(PLY_INCLUDE) -I$(srcdir)/parser \
+	  $(srcdir)/BindingGen.py header \
+	  $(srcdir)/Bindings.conf \
+	  $*Binding \
+	  $(CURDIR)/ \
+	  $*.webidl
 
-# $(binding_dependency_trackers) pick up additional dependencies via .pp files
-$(binding_dependency_trackers):
-	# Just bring it up to date, if it's out of date, so that we'll know that
-	# we have to redo binding generation and flag this prerequisite there as
-	# being newer than the bindinggen target.
-	@$(TOUCH) $@
+$(binding_cpp_files): %Binding.cpp: $(bindinggen_dependencies) \
+                                    $(CURDIR)/%.webidl \
+                                    $(call mkdir_deps,$(MDDEPDIR)) \
+                                    $(NULL)
+	PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
+	  $(PLY_INCLUDE) -I$(srcdir)/parser \
+	  $(srcdir)/BindingGen.py cpp \
+	  $(srcdir)/Bindings.conf \
+	  $*Binding \
+	  $(CURDIR) \
+	  $*.webidl
 
 $(globalgen_targets): ParserResults.pkl
 
-%-example: .BindingGen
+%-example: $(bindinggen_dependencies) \
+           ParserResults.pkl \
+           $(NULL)
 	PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
 	  $(PLY_INCLUDE) -I$(srcdir)/parser \
 	  $(srcdir)/ExampleGen.py \
 	  $(srcdir)/Bindings.conf $*
 
 CACHE_DIR = _cache
 
 globalgen_dependencies := \
@@ -175,63 +175,36 @@ globalgen_dependencies := \
   $(GLOBAL_DEPS) \
   $(NULL)
 
 $(CACHE_DIR)/.done:
 	$(MKDIR) -p $(CACHE_DIR)
 	@$(TOUCH) $@
 
 ParserResults.pkl: $(globalgen_dependencies)
-	# Running GlobalGen.py updates ParserResults.pkl as a side-effect
 	PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
     $(PLY_INCLUDE) -I$(srcdir)/parser \
     $(srcdir)/GlobalGen.py $(srcdir)/Bindings.conf . \
     --cachedir=$(CACHE_DIR) \
     $(all_webidl_files)
 
-.BindingGen: $(bindinggen_dependencies) $(binding_dependency_trackers)
-	# Make sure .deps actually exists, since we'll try to write to it from
-	# BindingGen.py but we're typically running in the export phase, which
-	# is before anyone has bothered creating .deps.
-	$(MKDIR) -p .deps
-        # Pass our long lists through files to try to avoid blowing
-        # out the command line
-	echo $(all_webidl_files) > .all-webidl-file-list
-	echo $? > .changed-dependency-list
-	# BindingGen.py will examine the changed dependency list to figure out
-	# what it really needs to regenerate.
-	$PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
-    $(PLY_INCLUDE) -I$(srcdir)/parser \
-    $(srcdir)/BindingGen.py \
-    $(srcdir)/Bindings.conf \
-    $(CURDIR) \
-    .all-webidl-file-list \
-    .changed-dependency-list
-	# Now touch the .BindingGen file so that we don't have to keep redoing
-	# all that until something else actually changes.
-	@$(TOUCH) $@
-
 GARBAGE += \
   webidlyacc.py \
   parser.out \
   $(wildcard *-example.h) \
   $(wildcard *-example.cpp) \
-  .BindingGen \
-  .all-webidl-file-list \
-  .changed-dependency-list \
-  $(binding_dependency_trackers) \
   $(NULL)
 
 # Make sure all binding header files are created during the export stage, so we
 # don't have issues with .cpp files being compiled before we've generated the
 # headers they depend on.  This is really only needed for the test files, since
-# the non-test headers are all exported above anyway.  Note that this means that
-# we do all of our codegen during export.
-export:: $(binding_header_files)
+# the non-test headers are all exported above anyway.
+webidl-export:: $(binding_header_files)
 
 distclean::
 	-$(RM) \
         $(binding_header_files) \
         $(binding_cpp_files) \
         $(all_webidl_files) \
         $(globalgen_targets) \
-        ParserResults.pkl \
-        $(NULL)
+        ParserResults.pkl
+
+.PHONY: webidl-export
--- a/dom/bindings/parser/WebIDL.py
+++ b/dom/bindings/parser/WebIDL.py
@@ -3391,25 +3391,18 @@ class Parser(Tokenizer):
             Interface : INTERFACE IDENTIFIER SEMICOLON
         """
         location = self.getLocation(p, 1)
         identifier = IDLUnresolvedIdentifier(self.getLocation(p, 2), p[2])
 
         try:
             if self.globalScope()._lookupIdentifier(identifier):
                 p[0] = self.globalScope()._lookupIdentifier(identifier)
-                if not isinstance(p[0], IDLExternalInterface):
-                    raise WebIDLError("Name collision between external "
-                                      "interface declaration for identifier "
-                                      "%s and %s" % (identifier.name, p[0]),
-                                      [location, p[0].location])
                 return
-        except Exception, ex:
-            if isinstance(ex, WebIDLError):
-                raise ex
+        except:
             pass
 
         p[0] = IDLExternalInterface(location, self.globalScope(), identifier)
 
     def p_PartialInterface(self, p):
         """
             PartialInterface : PARTIAL INTERFACE IDENTIFIER LBRACE InterfaceMembers RBRACE SEMICOLON
         """
--- a/dom/bindings/parser/tests/test_interface.py
+++ b/dom/bindings/parser/tests/test_interface.py
@@ -316,59 +316,16 @@ def WebIDLTest(parser, harness):
     harness.ok(threw,
                "Should not allow a name collision between interface "
                "and other object")
 
     parser = parser.reset()
     threw = False
     try:
         parser.parse("""
-            dictionary A {
-                boolean x;
-            };
-            interface A;
-        """)
-        results = parser.finish()
-    except:
-        threw = True
-    harness.ok(threw,
-               "Should not allow a name collision between external interface "
-               "and other object")
-
-    parser = parser.reset()
-    threw = False
-    try:
-        parser.parse("""
-            interface A {
-                readonly attribute boolean x;
-            };
-            interface A;
-        """)
-        results = parser.finish()
-    except:
-        threw = True
-    harness.ok(threw,
-               "Should not allow a name collision between external interface "
-               "and interface")
-
-    parser = parser.reset()
-    parser.parse("""
-        interface A;
-        interface A;
-    """)
-    results = parser.finish()
-    harness.ok(len(results) == 1 and
-               isinstance(results[0], WebIDL.IDLExternalInterface),
-               "Should allow name collisions between external interface "
-               "declarations")
-
-    parser = parser.reset()
-    threw = False
-    try:
-        parser.parse("""
             [SomeRandomAnnotation]
             interface A {
                 readonly attribute boolean y;
             };
         """)
         results = parser.finish()
     except:
         threw = True
--- a/dom/bindings/test/Makefile.in
+++ b/dom/bindings/test/Makefile.in
@@ -42,17 +42,16 @@ LOCAL_INCLUDES += \
 # If you change bindinggen_dependencies here, change it in
 # dom/bindings/Makefile.in too.  But note that we include ../Makefile
 # here manually, since $(GLOBAL_DEPS) won't cover it.
 bindinggen_dependencies := \
   ../BindingGen.py \
   ../Bindings.conf \
   ../Configuration.py \
   ../Codegen.py \
-  ../ParserResults.pkl \
   ../parser/WebIDL.py \
   ../Makefile \
   $(GLOBAL_DEPS) \
   $(NULL)
 
 MOCHITEST_FILES := \
   test_bug773326.html \
   test_enums.html \
@@ -85,45 +84,29 @@ MOCHITEST_CHROME_FILES = \
 ifdef GNU_CC
 CXXFLAGS += -Wno-uninitialized
 endif
 
 # Include rules.mk before any of our targets so our first target is coming from
 # rules.mk and running make with no target in this dir does the right thing.
 include $(topsrcdir)/config/rules.mk
 
-$(CPPSRCS): .BindingGen
+$(CPPSRCS): ../%Binding.cpp: $(bindinggen_dependencies) \
+                             ../%.webidl \
+                             TestExampleInterface-example \
+                             TestExampleProxyInterface-example \
+                             $(NULL)
+	$(MAKE) -C .. $*Binding.h
+	$(MAKE) -C .. $*Binding.cpp
 
-.BindingGen: $(bindinggen_dependencies) \
-             $(test_webidl_files) \
-             $(NULL)
-	# The export phase in dom/bindings is what actually looks at
-	# dependencies and regenerates things as needed, so just go ahead and
-	# make that phase here.  Also make our example interface files.  If the
-	# target used here ever changes, change the conditional around
-	# $(CPPSRCS) in dom/bindings/Makefile.in.
-	$(MAKE) -C .. export TestExampleInterface-example TestExampleProxyInterface-example
-	@$(TOUCH) $@
+TestExampleInterface-example:
+	$(MAKE) -C .. TestExampleInterface-example
+
+TestExampleProxyInterface-example:
+	$(MAKE) -C .. TestExampleProxyInterface-example
 
 check::
 	PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
 	  $(PLY_INCLUDE) $(srcdir)/../parser/runtests.py
 
 check-interactive:
 	PYTHONDONTWRITEBYTECODE=1 $(PYTHON) $(topsrcdir)/config/pythonpath.py \
 	  $(PLY_INCLUDE) $(srcdir)/../parser/runtests.py -q
-
-# Since we define MOCHITEST_FILES, config/makefiles/mochitest.mk goes ahead and
-# sets up a rule with libs:: in itm which makes our .DEFAULT_TARGET be "libs".
-# Then ruls.mk does |.DEFAULT_TARGET ?= default| which leaves it as "libs".  So
-# if we make without an explicit target in this directory, we try to make
-# "libs", but with a $(MAKECMDGOALS) of empty string.  And then rules.mk
-# helpfully does not include our *.o.pp files, since it includes them only if
-# filtering some stuff out from $(MAKECMDGOALS) leaves it nonempty.  The upshot
-# is that if some headers change and we run make in this dir without an explicit
-# target things don't get rebuilt.
-#
-# On the other hand, if we set .DEFAULT_TARGET to "default" explicitly here,
-# then rules.mk will reinvoke make with "export" and "libs" but this time hey
-# will be passed as explicit targets, show up in $(MAKECMDGOALS), and things
-# will work.  Do this at the end of our Makefile so the rest of the build system
-# does not get a chance to muck with it after we set it.
-.DEFAULT_GOAL := default
--- a/dom/webidl/ClientRectList.webidl
+++ b/dom/webidl/ClientRectList.webidl
@@ -1,10 +1,12 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+interface ClientRect;
+
 interface ClientRectList {
   readonly attribute unsigned long length;
   getter ClientRect? item(unsigned long index);
 };
--- a/dom/webidl/Document.webidl
+++ b/dom/webidl/Document.webidl
@@ -10,16 +10,17 @@
  * http://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#extensions-to-the-document-interface
  * http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/PageVisibility/Overview.html#sec-document-interface
  * http://dev.w3.org/csswg/cssom/#extensions-to-the-document-interface
  * http://dev.w3.org/csswg/cssom-view/#extensions-to-the-document-interface
  *
  * http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/core/nsIDOMDocument.idl
  */
 
+interface Comment;
 interface StyleSheetList;
 interface TouchList;
 interface WindowProxy;
 interface nsISupports;
 
 enum VisibilityState { "hidden", "visible" };
 
 /* http://dom.spec.whatwg.org/#interface-document */
--- a/dom/webidl/FileHandle.webidl
+++ b/dom/webidl/FileHandle.webidl
@@ -1,13 +1,13 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+interface DOMRequest;
 interface LockedFile;
 
 enum FileMode { "readonly", "readwrite" };
 
 interface FileHandle : EventTarget {
   readonly attribute DOMString name;
   readonly attribute DOMString type;
 
--- a/dom/webidl/HTMLCollection.webidl
+++ b/dom/webidl/HTMLCollection.webidl
@@ -5,14 +5,16 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/2012/WD-dom-20120105/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+interface Element;
+
 interface HTMLCollection {
   readonly attribute unsigned long length;
   getter Element? item(unsigned long index);
   [Throws]
   getter object? namedItem(DOMString name); // only returns Element
 };
--- a/dom/webidl/HTMLElement.webidl
+++ b/dom/webidl/HTMLElement.webidl
@@ -7,16 +7,18 @@
  * http://www.whatwg.org/specs/web-apps/current-work/ and
  * http://dev.w3.org/csswg/cssom-view/
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
+interface DOMStringMap;
+
 interface HTMLElement : Element {
   // metadata attributes
            attribute DOMString title;
            attribute DOMString lang;
   //         attribute boolean translate;
   [SetterThrows, Pure]
            attribute DOMString dir;
   [Constant]
--- a/dom/webidl/HTMLOptionsCollection.webidl
+++ b/dom/webidl/HTMLOptionsCollection.webidl
@@ -5,16 +5,18 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/2012/WD-html5-20120329/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+interface HTMLOptionElement;
+
 interface HTMLOptionsCollection : HTMLCollection {
            attribute unsigned long length;
   [Throws]
   getter object? namedItem(DOMString name);
   [Throws]
   setter creator void (unsigned long index, HTMLOptionElement? option);
   [Throws]
   void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
--- a/dom/webidl/MozNamedAttrMap.webidl
+++ b/dom/webidl/MozNamedAttrMap.webidl
@@ -1,13 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+interface Attr;
+
 /**
  * This is a temporary, non-standard interface, to ease the transition to a
  * world where Attr no longer inherits from Node.
  */
 interface MozNamedAttrMap {
   getter Attr? getNamedItem(DOMString name);
   [Throws]
   Attr? setNamedItem(Attr arg);
--- a/dom/webidl/PaintRequest.webidl
+++ b/dom/webidl/PaintRequest.webidl
@@ -1,13 +1,15 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+interface ClientRect;
+
 /**
  * These objects are exposed by the MozDOMAfterPaint event. Each one represents
  * a request to repaint a rectangle that was generated by the browser.
  */
 interface PaintRequest {
   /**
    * The client rect where invalidation was triggered.
    */
--- a/dom/webidl/Range.webidl
+++ b/dom/webidl/Range.webidl
@@ -7,16 +7,18 @@
  * http://dom.spec.whatwg.org/#range
  * http://domparsing.spec.whatwg.org/#dom-range-createcontextualfragment
  * http://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html#extensions-to-the-range-interface
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+interface ClientRect;
+
 interface Range {
   [Throws]
   readonly attribute Node startContainer;
   [Throws]
   readonly attribute unsigned long startOffset;
   [Throws]
   readonly attribute Node endContainer;
   [Throws]
--- a/dom/webidl/SVGMaskElement.webidl
+++ b/dom/webidl/SVGMaskElement.webidl
@@ -6,16 +6,17 @@
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 interface SVGAnimatedEnumeration;
+interface SVGAnimatedLength;
 
 interface SVGMaskElement : SVGElement {
 
   // Mask Types
   const unsigned short SVG_MASKTYPE_LUMINANCE = 0;
   const unsigned short SVG_MASKTYPE_ALPHA = 1;
 
   readonly attribute SVGAnimatedEnumeration maskUnits;
--- a/dom/webidl/SVGSVGElement.webidl
+++ b/dom/webidl/SVGSVGElement.webidl
@@ -7,16 +7,17 @@
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 interface SVGAnimatedString;
 interface SVGViewSpec;
+interface SVGPoint;
 
 interface SVGSVGElement : SVGGraphicsElement {
 
   readonly attribute SVGAnimatedLength x;
   readonly attribute SVGAnimatedLength y;
   readonly attribute SVGAnimatedLength width;
   readonly attribute SVGAnimatedLength height;
   // readonly attribute SVGRect viewport;
--- a/dom/webidl/WebComponents.webidl
+++ b/dom/webidl/WebComponents.webidl
@@ -1,20 +1,21 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is
  * http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
+interface DocumentFragment;
+
 callback LifecycleCreatedCallback = void();
 
 dictionary LifecycleCallbacks {
   LifecycleCreatedCallback? created = null;
 };
 
 dictionary ElementRegistrationOptions {
   object? prototype = null;
--- a/dom/webidl/WebGLRenderingContext.webidl
+++ b/dom/webidl/WebGLRenderingContext.webidl
@@ -10,16 +10,23 @@
  */
 
 // WebGL IDL definitions scraped from the Khronos specification:
 // https://www.khronos.org/registry/webgl/specs/latest/
 //
 // This IDL depends on the typed array specification defined at:
 // https://www.khronos.org/registry/typedarray/specs/latest/typedarrays.idl
 
+// XXXbz all sorts of forward declarations for things that are not new
+// bindings yet.
+interface Event;
+interface HTMLCanvasElement;
+interface HTMLVideoElement;
+interface ImageData;
+
 typedef unsigned long  GLenum;
 typedef boolean        GLboolean;
 typedef unsigned long  GLbitfield;
 typedef byte           GLbyte;         /* 'byte' should be a signed 8 bit type. */
 typedef short          GLshort;
 typedef long           GLint;
 typedef long           GLsizei;
 typedef long long      GLintptr;
--- a/dom/webidl/XMLStylesheetProcessingInstruction.webidl
+++ b/dom/webidl/XMLStylesheetProcessingInstruction.webidl
@@ -1,9 +1,11 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+interface StyleSheet;
+
 interface XMLStylesheetProcessingInstruction : ProcessingInstruction {
   readonly attribute StyleSheet? sheet;
 };
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -1614,31 +1614,16 @@ ifneq (,$(MDDEPEND_FILES))
 ifdef .PYMAKE
 includedeps $(MDDEPEND_FILES)
 else
 include $(MDDEPEND_FILES)
 endif
 endif
 
 endif
-
-
-ifneq (,$(filter export,$(MAKECMDGOALS)))
-MDDEPEND_FILES		:= $(strip $(wildcard $(addprefix $(MDDEPDIR)/,$(EXTRA_EXPORT_MDDEPEND_FILES))))
-
-ifneq (,$(MDDEPEND_FILES))
-ifdef .PYMAKE
-includedeps $(MDDEPEND_FILES)
-else
-include $(MDDEPEND_FILES)
-endif
-endif
-
-endif
-
 #############################################################################
 
 -include $(topsrcdir)/$(MOZ_BUILD_APP)/app-rules.mk
 -include $(MY_RULES)
 
 #
 # Generate Emacs tags in a file named TAGS if ETAGS was set in $(MY_CONFIG)
 # or in $(MY_RULES)