Bug 851791 - Kill some script type id stuff; r=bz
authorMs2ger <ms2ger@gmail.com>
Thu, 04 Apr 2013 09:04:50 +0200
changeset 127577 069d1883bbd58a2b0b5c225fe38348da3dd3a8d7
parent 127576 0066b2fcecc135e90c0e449b467e343ee58cb855
child 127578 677e358170320be6f7330b0f731fd55b3070935e
push id24508
push userMs2ger@gmail.com
push dateThu, 04 Apr 2013 07:06:55 +0000
treeherdermozilla-central@c232bec6974d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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 851791 - Kill some script type id stuff; r=bz
--- a/dom/base/nsDOMScriptObjectFactory.h
+++ b/dom/base/nsDOMScriptObjectFactory.h
@@ -17,17 +17,16 @@
  * 03/27/2000   IBM Corp.       Added PR_CALLBACK for Optlink
  *                               use in OS2
 #include "nsIDOMScriptObjectFactory.h"
 #include "nsIObserver.h"
 #include "nsIExceptionService.h"
 #include "nsIScriptRuntime.h"
-#include "nsIScriptGlobalObject.h" // for misplaced NS_STID_ macros.
 #include "mozilla/Attributes.h"
 class nsDOMScriptObjectFactory MOZ_FINAL : public nsIDOMScriptObjectFactory,
                                            public nsIObserver
--- a/dom/base/nsIScriptGlobalObject.h
+++ b/dom/base/nsIScriptGlobalObject.h
@@ -4,54 +4,21 @@
  * 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/. */
 #ifndef nsIScriptGlobalObject_h__
 #define nsIScriptGlobalObject_h__
 #include "nsISupports.h"
 #include "nsEvent.h"
-#include "nsIProgrammingLanguage.h"
 class nsIScriptContext;
-class nsIDOMEvent;
-class nsIScriptGlobalObjectOwner;
-class nsIArray;
 class nsScriptErrorEvent;
 class nsIScriptGlobalObject;
-class JSObject; // until we finally remove GetGlobalJSObject...
-// XXXbz can we just remove all this script type id stuff?
-// Some helpers for working with integer "script type IDs", and specifically
-// for working with arrays of such objects. For example, it is common for
-// implementations supporting multiple script languages to keep each
-// language's nsIScriptContext in an array indexed by the language ID.
-#define NS_STID_FIRST nsIProgrammingLanguage::JAVASCRIPT
-// only 4 bits worth is valid...
-#define NS_STID_LAST (nsIProgrammingLanguage::MAX > 0x000FU ? \
-                      0x000FU : nsIProgrammingLanguage::MAX)
-// Use to declare the array size
-// Is a language ID valid?
-#define NS_STID_VALID(langID) (langID >= NS_STID_FIRST && langID <= NS_STID_LAST)
-// Return an index for a given ID.
-#define NS_STID_INDEX(langID) (langID-NS_STID_FIRST)
-// Create a 'for' loop iterating over all possible language IDs (*not* indexes)
-#define NS_STID_FOR_ID(varName) \
-          for (varName=NS_STID_FIRST;varName<=NS_STID_LAST;varName++)
-// Create a 'for' loop iterating over all indexes (when you don't need to know
-// what language it is)
-#define NS_STID_FOR_INDEX(varName) \
-          for (varName=0;varName<=NS_STID_INDEX(NS_STID_LAST);varName++)
+class JSObject;
 // A helper function for nsIScriptGlobalObject implementations to use
 // when handling a script error.  Generally called by the global when a context
 // notifies it of an error via nsIScriptGlobalObject::HandleScriptError.
 // Returns true if HandleDOMEvent was actually called, in which case
 // aStatus will be filled in with the status.
 NS_HandleScriptError(nsIScriptGlobalObject *aScriptGlobal,