Bug 994964 - Make DOM XPIDL interfaces non-scriptable, and add shim Components.interfaces entries for them; r=bzbarsky,bholley
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 08 May 2014 16:45:36 -0400
changeset 202569 c590fcb23c3c1c1bb3a41979b04fdc3031953130
parent 202550 c761bfc0fd2c9373bfd7f31b018f30e71834aa47
child 202570 1073160bd1e442733f26f9ccb3bc3285a1de7ec6
push idunknown
push userunknown
push dateunknown
reviewersbzbarsky, bholley
bugs994964
milestone32.0a1
Bug 994964 - Make DOM XPIDL interfaces non-scriptable, and add shim Components.interfaces entries for them; r=bzbarsky,bholley
browser/components/sessionstore/src/SessionStore.jsm
browser/components/sessionstore/test/browser_345898.js
content/base/public/nsIDOMDataChannel.idl
content/base/public/nsIDOMFileList.idl
content/base/public/nsIDOMFileReader.idl
content/base/public/nsIDOMFormData.idl
content/base/public/nsIDOMParser.idl
content/base/public/nsIDOMSerializer.idl
content/base/public/nsISelection.idl
content/base/public/nsIXMLHttpRequest.idl
content/media/webspeech/recognition/nsIDOMSpeechRecognitionEvent.idl
content/media/webspeech/synth/nsIDOMSpeechSynthesisEvent.idl
dom/base/nsDOMClassInfo.cpp
dom/base/nsIDOMDOMCursor.idl
dom/base/nsIDOMDOMRequest.idl
dom/interfaces/apps/nsIDOMMozApplicationEvent.idl
dom/interfaces/base/nsIDOMClientRect.idl
dom/interfaces/base/nsIDOMClientRectList.idl
dom/interfaces/base/nsIDOMHistory.idl
dom/interfaces/base/nsIDOMScreen.idl
dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl
dom/interfaces/core/nsIDOMAttr.idl
dom/interfaces/core/nsIDOMCDATASection.idl
dom/interfaces/core/nsIDOMCharacterData.idl
dom/interfaces/core/nsIDOMComment.idl
dom/interfaces/core/nsIDOMDOMException.idl
dom/interfaces/core/nsIDOMDocument.idl
dom/interfaces/core/nsIDOMDocumentFragment.idl
dom/interfaces/core/nsIDOMDocumentType.idl
dom/interfaces/core/nsIDOMElement.idl
dom/interfaces/core/nsIDOMMozNamedAttrMap.idl
dom/interfaces/core/nsIDOMNode.idl
dom/interfaces/core/nsIDOMNodeList.idl
dom/interfaces/core/nsIDOMProcessingInstruction.idl
dom/interfaces/core/nsIDOMText.idl
dom/interfaces/core/nsIDOMXMLDocument.idl
dom/interfaces/css/nsIDOMCSSPrimitiveValue.idl
dom/interfaces/css/nsIDOMCSSStyleDeclaration.idl
dom/interfaces/css/nsIDOMCSSStyleSheet.idl
dom/interfaces/css/nsIDOMCSSValue.idl
dom/interfaces/css/nsIDOMCSSValueList.idl
dom/interfaces/css/nsIDOMRect.idl
dom/interfaces/devicestorage/nsIDOMDeviceStorage.idl
dom/interfaces/devicestorage/nsIDOMDeviceStorageChangeEvent.idl
dom/interfaces/events/nsIDOMAnimationEvent.idl
dom/interfaces/events/nsIDOMBeforeUnloadEvent.idl
dom/interfaces/events/nsIDOMClipboardEvent.idl
dom/interfaces/events/nsIDOMCloseEvent.idl
dom/interfaces/events/nsIDOMCommandEvent.idl
dom/interfaces/events/nsIDOMCompositionEvent.idl
dom/interfaces/events/nsIDOMCustomEvent.idl
dom/interfaces/events/nsIDOMDOMTransactionEvent.idl
dom/interfaces/events/nsIDOMDataContainerEvent.idl
dom/interfaces/events/nsIDOMDataTransfer.idl
dom/interfaces/events/nsIDOMDeviceOrientationEvent.idl
dom/interfaces/events/nsIDOMDragEvent.idl
dom/interfaces/events/nsIDOMElementReplaceEvent.idl
dom/interfaces/events/nsIDOMEvent.idl
dom/interfaces/events/nsIDOMFocusEvent.idl
dom/interfaces/events/nsIDOMHashChangeEvent.idl
dom/interfaces/events/nsIDOMKeyEvent.idl
dom/interfaces/events/nsIDOMMessageEvent.idl
dom/interfaces/events/nsIDOMMouseEvent.idl
dom/interfaces/events/nsIDOMMouseScrollEvent.idl
dom/interfaces/events/nsIDOMMutationEvent.idl
dom/interfaces/events/nsIDOMNSEvent.idl
dom/interfaces/events/nsIDOMNotifyPaintEvent.idl
dom/interfaces/events/nsIDOMPageTransitionEvent.idl
dom/interfaces/events/nsIDOMPaintRequest.idl
dom/interfaces/events/nsIDOMPopStateEvent.idl
dom/interfaces/events/nsIDOMPopupBlockedEvent.idl
dom/interfaces/events/nsIDOMProgressEvent.idl
dom/interfaces/events/nsIDOMRecordErrorEvent.idl
dom/interfaces/events/nsIDOMScrollAreaEvent.idl
dom/interfaces/events/nsIDOMSimpleGestureEvent.idl
dom/interfaces/events/nsIDOMSmartCardEvent.idl
dom/interfaces/events/nsIDOMStyleRuleChangeEvent.idl
dom/interfaces/events/nsIDOMStyleSheetApplicableStateChangeEvent.idl
dom/interfaces/events/nsIDOMStyleSheetChangeEvent.idl
dom/interfaces/events/nsIDOMTransitionEvent.idl
dom/interfaces/events/nsIDOMUIEvent.idl
dom/interfaces/events/nsIDOMWheelEvent.idl
dom/interfaces/geolocation/nsIDOMGeoPositionError.idl
dom/interfaces/html/nsIDOMHTMLAnchorElement.idl
dom/interfaces/html/nsIDOMHTMLAppletElement.idl
dom/interfaces/html/nsIDOMHTMLAreaElement.idl
dom/interfaces/html/nsIDOMHTMLAudioElement.idl
dom/interfaces/html/nsIDOMHTMLBRElement.idl
dom/interfaces/html/nsIDOMHTMLBaseElement.idl
dom/interfaces/html/nsIDOMHTMLBodyElement.idl
dom/interfaces/html/nsIDOMHTMLButtonElement.idl
dom/interfaces/html/nsIDOMHTMLCanvasElement.idl
dom/interfaces/html/nsIDOMHTMLCollection.idl
dom/interfaces/html/nsIDOMHTMLDirectoryElement.idl
dom/interfaces/html/nsIDOMHTMLDivElement.idl
dom/interfaces/html/nsIDOMHTMLDocument.idl
dom/interfaces/html/nsIDOMHTMLElement.idl
dom/interfaces/html/nsIDOMHTMLEmbedElement.idl
dom/interfaces/html/nsIDOMHTMLFieldSetElement.idl
dom/interfaces/html/nsIDOMHTMLFormElement.idl
dom/interfaces/html/nsIDOMHTMLFrameElement.idl
dom/interfaces/html/nsIDOMHTMLFrameSetElement.idl
dom/interfaces/html/nsIDOMHTMLHRElement.idl
dom/interfaces/html/nsIDOMHTMLHeadElement.idl
dom/interfaces/html/nsIDOMHTMLHeadingElement.idl
dom/interfaces/html/nsIDOMHTMLHtmlElement.idl
dom/interfaces/html/nsIDOMHTMLIFrameElement.idl
dom/interfaces/html/nsIDOMHTMLImageElement.idl
dom/interfaces/html/nsIDOMHTMLInputElement.idl
dom/interfaces/html/nsIDOMHTMLLIElement.idl
dom/interfaces/html/nsIDOMHTMLLabelElement.idl
dom/interfaces/html/nsIDOMHTMLLinkElement.idl
dom/interfaces/html/nsIDOMHTMLMapElement.idl
dom/interfaces/html/nsIDOMHTMLMediaElement.idl
dom/interfaces/html/nsIDOMHTMLMenuElement.idl
dom/interfaces/html/nsIDOMHTMLMenuItemElement.idl
dom/interfaces/html/nsIDOMHTMLMetaElement.idl
dom/interfaces/html/nsIDOMHTMLOListElement.idl
dom/interfaces/html/nsIDOMHTMLObjectElement.idl
dom/interfaces/html/nsIDOMHTMLOptGroupElement.idl
dom/interfaces/html/nsIDOMHTMLOptionElement.idl
dom/interfaces/html/nsIDOMHTMLOptionsCollection.idl
dom/interfaces/html/nsIDOMHTMLParagraphElement.idl
dom/interfaces/html/nsIDOMHTMLPreElement.idl
dom/interfaces/html/nsIDOMHTMLQuoteElement.idl
dom/interfaces/html/nsIDOMHTMLScriptElement.idl
dom/interfaces/html/nsIDOMHTMLSelectElement.idl
dom/interfaces/html/nsIDOMHTMLSourceElement.idl
dom/interfaces/html/nsIDOMHTMLStyleElement.idl
dom/interfaces/html/nsIDOMHTMLTableCaptionElem.idl
dom/interfaces/html/nsIDOMHTMLTableCellElement.idl
dom/interfaces/html/nsIDOMHTMLTableElement.idl
dom/interfaces/html/nsIDOMHTMLTextAreaElement.idl
dom/interfaces/html/nsIDOMHTMLTitleElement.idl
dom/interfaces/html/nsIDOMHTMLUListElement.idl
dom/interfaces/html/nsIDOMHTMLVideoElement.idl
dom/interfaces/html/nsIDOMMediaError.idl
dom/interfaces/html/nsIDOMTimeRanges.idl
dom/interfaces/html/nsIDOMValidityState.idl
dom/interfaces/offline/nsIDOMOfflineResourceList.idl
dom/interfaces/range/nsIDOMRange.idl
dom/interfaces/settings/nsIDOMMozSettingsEvent.idl
dom/interfaces/smil/nsIDOMTimeEvent.idl
dom/interfaces/storage/nsIDOMStorageEvent.idl
dom/interfaces/stylesheets/nsIDOMMediaList.idl
dom/interfaces/stylesheets/nsIDOMStyleSheet.idl
dom/interfaces/stylesheets/nsIDOMStyleSheetList.idl
dom/interfaces/svg/nsIDOMSVGElement.idl
dom/interfaces/svg/nsIDOMSVGLength.idl
dom/interfaces/traversal/nsIDOMNodeIterator.idl
dom/interfaces/traversal/nsIDOMTreeWalker.idl
dom/interfaces/xbl/nsIDOMDocumentXBL.idl
dom/interfaces/xpath/nsIDOMXPathEvaluator.idl
dom/interfaces/xul/nsIDOMXULCommandEvent.idl
dom/interfaces/xul/nsIDOMXULDocument.idl
dom/interfaces/xul/nsIDOMXULElement.idl
dom/media/nsIDOMMediaStream.idl
dom/mobilemessage/interfaces/nsIDOMMozMmsEvent.idl
dom/mobilemessage/interfaces/nsIDOMMozSmsEvent.idl
dom/voicemail/nsIDOMMozVoicemailEvent.idl
dom/wifi/nsIDOMMozWifiConnectionInfoEvent.idl
dom/wifi/nsIDOMMozWifiP2pStatusChangeEvent.idl
dom/wifi/nsIDOMMozWifiStatusChangeEvent.idl
js/xpconnect/src/XPCComponents.cpp
js/xpconnect/src/XPCJSID.cpp
js/xpconnect/src/XPCWrappedNativeInfo.cpp
js/xpconnect/src/moz.build
xpcom/reflect/xptinfo/public/nsIInterfaceInfo.idl
xpcom/reflect/xptinfo/src/ShimInterfaceInfo.cpp
xpcom/reflect/xptinfo/src/ShimInterfaceInfo.h
xpcom/reflect/xptinfo/src/moz.build
xpcom/reflect/xptinfo/src/xptiInterfaceInfo.cpp
xpcom/reflect/xptinfo/src/xptiprivate.h
xpcom/typelib/xpt/public/xpt_struct.h
--- a/browser/components/sessionstore/src/SessionStore.jsm
+++ b/browser/components/sessionstore/src/SessionStore.jsm
@@ -1504,19 +1504,16 @@ let SessionStoreInternal = {
     if (!aWindow.__SSi) {
       throw Components.Exception("Window is not tracked", Cr.NS_ERROR_INVALID_ARG);
     }
 
     this.restoreWindow(aWindow, aState, {overwriteTabs: aOverwrite});
   },
 
   getTabState: function ssi_getTabState(aTab) {
-    if (!aTab.ownerDocument) {
-      throw Components.Exception("Invalid tab object: no ownerDocument", Cr.NS_ERROR_INVALID_ARG);
-    }
     if (!aTab.ownerDocument.defaultView.__SSi) {
       throw Components.Exception("Default view is not tracked", Cr.NS_ERROR_INVALID_ARG);
     }
 
     let tabState = TabState.collect(aTab);
 
     return this._toJSONString(tabState);
   },
@@ -1531,37 +1528,31 @@ let SessionStoreInternal = {
       throw Components.Exception("Invalid state string: not JSON", Cr.NS_ERROR_INVALID_ARG);
     }
     if (typeof tabState != "object") {
       throw Components.Exception("Not an object", Cr.NS_ERROR_INVALID_ARG);
     }
     if (!("entries" in tabState)) {
       throw Components.Exception("Invalid state object: no entries", Cr.NS_ERROR_INVALID_ARG);
     }
-    if (!aTab.ownerDocument) {
-      throw Components.Exception("Invalid tab object: no ownerDocument", Cr.NS_ERROR_INVALID_ARG);
-    }
 
     let window = aTab.ownerDocument.defaultView;
     if (!("__SSi" in window)) {
       throw Components.Exception("Window is not tracked", Cr.NS_ERROR_INVALID_ARG);
     }
 
     if (aTab.linkedBrowser.__SS_restoreState) {
       this._resetTabRestoringState(aTab);
     }
 
     this._setWindowStateBusy(window);
     this.restoreTabs(window, [aTab], [tabState], 0);
   },
 
   duplicateTab: function ssi_duplicateTab(aWindow, aTab, aDelta = 0) {
-    if (!aTab.ownerDocument) {
-      throw Components.Exception("Invalid tab object: no ownerDocument", Cr.NS_ERROR_INVALID_ARG);
-    }
     if (!aTab.ownerDocument.defaultView.__SSi) {
       throw Components.Exception("Default view is not tracked", Cr.NS_ERROR_INVALID_ARG);
     }
     if (!aWindow.getBrowser) {
       throw Components.Exception("Invalid window object: no getBrowser", Cr.NS_ERROR_INVALID_ARG);
     }
 
     // Flush all data queued in the content script because we will need that
--- a/browser/components/sessionstore/test/browser_345898.js
+++ b/browser/components/sessionstore/test/browser_345898.js
@@ -6,17 +6,18 @@ function test() {
   /** Test for Bug 345898 **/
 
   function test(aLambda) {
     try {
       aLambda();
       return false;
     }
     catch (ex) {
-      return ex.name == "NS_ERROR_ILLEGAL_VALUE";
+      return ex.name == "NS_ERROR_ILLEGAL_VALUE" ||
+             ex.name == "NS_ERROR_FAILURE";
     }
   }
 
   // all of the following calls with illegal arguments should throw NS_ERROR_ILLEGAL_VALUE
   ok(test(function() ss.getWindowState({})),
      "Invalid window for getWindowState throws");
   ok(test(function() ss.setWindowState({}, "", false)),
      "Invalid window for setWindowState throws");
--- a/content/base/public/nsIDOMDataChannel.idl
+++ b/content/base/public/nsIDOMDataChannel.idl
@@ -8,17 +8,17 @@
 #ifdef GetBinaryType
 // Windows apparently has a #define for GetBinaryType...
 #undef GetBinaryType
 #endif
 %}
 
 interface nsIVariant;
 
-[scriptable, builtinclass, uuid(af7077ac-0f9f-44e1-815f-9b1a94618531)]
+[builtinclass, uuid(af7077ac-0f9f-44e1-815f-9b1a94618531)]
 interface nsIDOMDataChannel : nsIDOMEventTarget
 {
   readonly attribute DOMString label;
   readonly attribute DOMString protocol;
   readonly attribute boolean reliable;
   readonly attribute boolean ordered;
 
   readonly attribute DOMString readyState;
--- a/content/base/public/nsIDOMFileList.idl
+++ b/content/base/public/nsIDOMFileList.idl
@@ -2,14 +2,14 @@
 /* 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/. */
 
 #include "nsISupports.idl"
 
 interface nsIDOMFile;
 
-[scriptable, uuid(283aa7b2-da81-4c72-aea2-9797b440fe34)]
+[uuid(283aa7b2-da81-4c72-aea2-9797b440fe34)]
 interface nsIDOMFileList : nsISupports
 {
   readonly attribute unsigned long length;
   nsIDOMFile item(in unsigned long index);
 };
--- a/content/base/public/nsIDOMFileReader.idl
+++ b/content/base/public/nsIDOMFileReader.idl
@@ -3,17 +3,17 @@
  * 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/. */
 
 #include "nsIDOMEventTarget.idl"
 
 interface nsIDOMEventListener;
 interface nsIDOMBlob;
 
-[scriptable, builtinclass, uuid(39ea2c73-7711-4cea-9f73-3166c24dfa69)]
+[builtinclass, uuid(39ea2c73-7711-4cea-9f73-3166c24dfa69)]
 interface nsIDOMFileReader : nsIDOMEventTarget
 {
   [implicit_jscontext]
   void readAsArrayBuffer(in nsIDOMBlob filedata);
   void readAsBinaryString(in nsIDOMBlob filedata);
   void readAsText(in nsIDOMBlob filedata, [optional] in DOMString encoding);
   void readAsDataURL(in nsIDOMBlob file);
 
--- a/content/base/public/nsIDOMFormData.idl
+++ b/content/base/public/nsIDOMFormData.idl
@@ -2,17 +2,17 @@
 /* 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/. */
 
 #include "nsISupports.idl"
 
 interface nsIVariant;
 
-[scriptable, uuid(256c9139-5a29-41e1-8698-f9f9aae7d6cf)]
+[uuid(256c9139-5a29-41e1-8698-f9f9aae7d6cf)]
 interface nsIDOMFormData : nsISupports 
 {
   void append(in DOMString name, in nsIVariant value);
 };
 
 %{ C++
 #define NS_FORMDATA_CID \
 { 0x6b192618, 0x26f2, 0x426e, \
--- a/content/base/public/nsIDOMParser.idl
+++ b/content/base/public/nsIDOMParser.idl
@@ -14,17 +14,17 @@ interface nsIScriptGlobalObject;
 /**
  * The nsIDOMParser interface is a non-SAX interface that can be used
  * to parse a string or byte stream containing XML or HTML content
  * to a DOM document. Parsing is always synchronous - a document is always
  * returned from the parsing methods. This is as opposed to loading and
  * parsing with the XMLHttpRequest interface, which can be used for
  * asynchronous (callback-based) loading.
  */
-[scriptable, uuid(5677f36e-1842-4c6f-a39c-2e5576ab8b40)]
+[uuid(5677f36e-1842-4c6f-a39c-2e5576ab8b40)]
 interface nsIDOMParser : nsISupports
 {
   /**
    * The string passed in is parsed into a DOM document.
    *
    * @param str The UTF16 string to be parsed
    * @param contentType The content type of the string (see parseFromStream)
    * @returns The DOM document created as a result of parsing the 
--- a/content/base/public/nsIDOMSerializer.idl
+++ b/content/base/public/nsIDOMSerializer.idl
@@ -10,17 +10,17 @@ interface nsIDOMNode;
 
 /**
  * The nsIDOMSerializer interface is really a placeholder till the W3C
  * DOM Working Group defines a mechanism for serializing DOM nodes.
  * An instance of this interface can be used to serialize a DOM document
  * or any DOM subtree.
  */
 
-[scriptable, uuid(9fd4ba15-e67c-4c98-b52c-7715f62c9196)]
+[uuid(9fd4ba15-e67c-4c98-b52c-7715f62c9196)]
 interface nsIDOMSerializer : nsISupports
 {
   /**
    * The subtree rooted by the specified element is serialized to
    * a string.
    * 
    * @param root The root of the subtree to be serialized. This could
    *             be any node, including a Document.
--- a/content/base/public/nsISelection.idl
+++ b/content/base/public/nsISelection.idl
@@ -13,17 +13,17 @@ interface nsINode;
 
 /**
  * Interface for manipulating and querying the current selected range
  * of nodes within the document.
  *
  * @version 1.0
  */
 
-[scriptable, builtinclass, uuid(e0a4d4b3-f34e-44bd-b1f2-4e3bde9b6915)]
+[builtinclass, uuid(e0a4d4b3-f34e-44bd-b1f2-4e3bde9b6915)]
 interface nsISelection : nsISupports
 {
     /**
      * Returns the node in which the selection begins.
      */
     readonly attribute nsIDOMNode anchorNode;
 
     /**
--- a/content/base/public/nsIXMLHttpRequest.idl
+++ b/content/base/public/nsIXMLHttpRequest.idl
@@ -11,22 +11,22 @@ interface nsIDOMEventListener;
 interface nsIPrincipal;
 interface nsIScriptContext;
 interface nsIURI;
 interface nsIVariant;
 interface nsIGlobalObject;
 interface nsIInputStream;
 interface nsIDOMBlob;
 
-[scriptable, builtinclass, uuid(5ced7e7a-e2c3-4563-a57d-31b97ce64dc5)]
+[builtinclass, uuid(5ced7e7a-e2c3-4563-a57d-31b97ce64dc5)]
 interface nsIXMLHttpRequestEventTarget : nsIDOMEventTarget {
   // event handler attributes
 };
 
-[scriptable, builtinclass, uuid(df3796fa-d98a-4185-9dda-d2f2b56a5d38)]
+[builtinclass, uuid(df3796fa-d98a-4185-9dda-d2f2b56a5d38)]
 interface nsIXMLHttpRequestUpload : nsIXMLHttpRequestEventTarget {
   // for future use
 };
 
 /**
  * Mozilla's XMLHttpRequest is modelled after Microsoft's IXMLHttpRequest
  * object. The goal has been to make Mozilla's version match Microsoft's
  * version as closely as possible, but there are bound to be some differences.
--- a/content/media/webspeech/recognition/nsIDOMSpeechRecognitionEvent.idl
+++ b/content/media/webspeech/recognition/nsIDOMSpeechRecognitionEvent.idl
@@ -9,17 +9,17 @@
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 #include "nsIDOMEvent.idl"
 
 interface SpeechRecognitionResultList;
 
-[scriptable, builtinclass, uuid(98dded70-33af-42d5-819d-e15b6f4a3aba)]
+[builtinclass, uuid(98dded70-33af-42d5-819d-e15b6f4a3aba)]
 interface nsIDOMSpeechRecognitionEvent : nsIDOMEvent {
     [noscript] void initSpeechRecognitionEvent(in DOMString eventTypeArg,
                                                in boolean canBubbleArg,
                                                in boolean cancelableArg,
                                                in unsigned long resultIndex,
                                                in nsISupports results,
                                                in DOMString interpretation,
                                                in nsIDOMDocument emma);
--- a/content/media/webspeech/synth/nsIDOMSpeechSynthesisEvent.idl
+++ b/content/media/webspeech/synth/nsIDOMSpeechSynthesisEvent.idl
@@ -7,17 +7,17 @@
  * http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(b5240841-dc69-43dd-bcf1-9306b8ddaa09)]
+[uuid(b5240841-dc69-43dd-bcf1-9306b8ddaa09)]
 interface nsIDOMSpeechSynthesisEvent : nsIDOMEvent {
   [noscript] void initSpeechSynthesisEvent(in DOMString aEventTypeArg,
                                            in boolean aCanBubbleArg,
                                            in boolean aCancelableArg,
                                            in unsigned long aCharIndex,
                                            in float aElapsedTime,
                                            in DOMString aName);
 
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -2016,57 +2016,21 @@ DefineInterfaceConstants(JSContext *cx, 
   rv = if_info->GetParent(getter_AddRefs(parent_if_info));
   NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && parent_if_info, rv);
 
   uint16_t parent_constant_count, i;
   parent_if_info->GetConstantCount(&parent_constant_count);
 
   JS::Rooted<JS::Value> v(cx);
   for (i = parent_constant_count; i < constant_count; i++) {
-    const nsXPTConstant *c = nullptr;
-
-    rv = if_info->GetConstant(i, &c);
-    NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && c, rv);
-
-    uint16_t type = c->GetType().TagPart();
-
-    v.setUndefined();
-    switch (type) {
-      case nsXPTType::T_I8:
-      case nsXPTType::T_U8:
-      {
-        v.setInt32(c->GetValue()->val.u8);
-        break;
-      }
-      case nsXPTType::T_I16:
-      case nsXPTType::T_U16:
-      {
-        v.setInt32(c->GetValue()->val.u16);
-        break;
-      }
-      case nsXPTType::T_I32:
-      {
-        v = JS_NumberValue(c->GetValue()->val.i32);
-        break;
-      }
-      case nsXPTType::T_U32:
-      {
-        v = JS_NumberValue(c->GetValue()->val.u32);
-        break;
-      }
-      default:
-      {
-#ifdef DEBUG
-        NS_ERROR("Non-numeric constant found in interface.");
-#endif
-        continue;
-      }
-    }
-
-    if (!::JS_DefineProperty(cx, obj, c->GetName(), v,
+    nsXPIDLCString name;
+    rv = if_info->GetConstant(i, &v, getter_Copies(name));
+    NS_ENSURE_TRUE(NS_SUCCEEDED(rv), rv);
+
+    if (!::JS_DefineProperty(cx, obj, name, v,
                              JSPROP_ENUMERATE | JSPROP_READONLY |
                              JSPROP_PERMANENT,
                              JS_PropertyStub, JS_StrictPropertyStub)) {
       return NS_ERROR_UNEXPECTED;
     }
   }
 
   return NS_OK;
--- a/dom/base/nsIDOMDOMCursor.idl
+++ b/dom/base/nsIDOMDOMCursor.idl
@@ -7,14 +7,14 @@
 #include "nsISupports.idl"
 
 [scriptable, function, uuid(3a75d80a-9258-4ab8-95fd-ec0b5f634df1)]
 interface nsICursorContinueCallback : nsISupports
 {
   void handleContinue();
 };
 
-[scriptable, builtinclass, uuid(062ea35a-5158-425a-b7bc-3ae9daa84398)]
+[builtinclass, uuid(062ea35a-5158-425a-b7bc-3ae9daa84398)]
 interface nsIDOMDOMCursor : nsISupports
 {
   readonly attribute boolean done;
   void continue();
 };
--- a/dom/base/nsIDOMDOMRequest.idl
+++ b/dom/base/nsIDOMDOMRequest.idl
@@ -5,17 +5,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEventTarget.idl"
 
 interface nsIDOMWindow;
 interface nsIDOMDOMCursor;
 interface nsICursorContinueCallback;
 
-[scriptable, builtinclass, uuid(d4c7372a-661c-4798-9a13-af48128609e9)]
+[builtinclass, uuid(d4c7372a-661c-4798-9a13-af48128609e9)]
 interface nsIDOMDOMRequest : nsIDOMEventTarget
 {
   readonly attribute DOMString readyState; // "pending" or "done"
 
   readonly attribute jsval result;
 
   // DOMError
   readonly attribute nsISupports error;
--- a/dom/interfaces/apps/nsIDOMMozApplicationEvent.idl
+++ b/dom/interfaces/apps/nsIDOMMozApplicationEvent.idl
@@ -1,17 +1,17 @@
 /* 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/. */
 
 #include "nsIDOMEvent.idl"
 
 interface mozIDOMApplication;
 
-[scriptable, builtinclass, uuid(453ae38a-8d8d-465f-a718-3f01240f8f75)]
+[builtinclass, uuid(453ae38a-8d8d-465f-a718-3f01240f8f75)]
 interface nsIDOMMozApplicationEvent : nsIDOMEvent
 {
   readonly attribute mozIDOMApplication application;
 
   [noscript] void initMozApplicationEvent(in DOMString aType,
                                           in boolean aCanBubble,
                                           in boolean aCancelable,
                                           in mozIDOMApplication aApplication);
--- a/dom/interfaces/base/nsIDOMClientRect.idl
+++ b/dom/interfaces/base/nsIDOMClientRect.idl
@@ -1,16 +1,16 @@
 /* -*- 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/. */
 
 #include "domstubs.idl"
 
-[scriptable, uuid(B2F824C4-D9D3-499B-8D3B-45C8245497C6)]
+[uuid(B2F824C4-D9D3-499B-8D3B-45C8245497C6)]
 interface nsIDOMClientRect : nsISupports
 {
   readonly attribute float left;
   readonly attribute float top;
   readonly attribute float right;
   readonly attribute float bottom;
   readonly attribute float width;
   readonly attribute float height;
--- a/dom/interfaces/base/nsIDOMClientRectList.idl
+++ b/dom/interfaces/base/nsIDOMClientRectList.idl
@@ -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/. */
 
 #include "domstubs.idl"
 
-[scriptable, uuid(f474c567-cbcb-458f-abad-ae42363da287)]
+[uuid(f474c567-cbcb-458f-abad-ae42363da287)]
 interface nsIDOMClientRectList : nsISupports
 {
   readonly attribute unsigned long length;
   nsIDOMClientRect        item(in unsigned long index);
 };
--- a/dom/interfaces/base/nsIDOMHistory.idl
+++ b/dom/interfaces/base/nsIDOMHistory.idl
@@ -1,12 +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/. */
 
 #include "domstubs.idl"
 
-[scriptable, uuid(55226663-fe68-48ba-addf-08e32eaab569)]
+[uuid(55226663-fe68-48ba-addf-08e32eaab569)]
 interface nsIDOMHistory : nsISupports
 {
   // Empty interface that exists only for extension backwards compat
 };
--- a/dom/interfaces/base/nsIDOMScreen.idl
+++ b/dom/interfaces/base/nsIDOMScreen.idl
@@ -1,16 +1,16 @@
 /* -*- 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/. */
 
 #include "nsIDOMEventTarget.idl"
 
-[scriptable, builtinclass, uuid(e732649a-4f78-4ded-abe1-dbdc36fd59d3)]
+[builtinclass, uuid(e732649a-4f78-4ded-abe1-dbdc36fd59d3)]
 interface nsIDOMScreen : nsIDOMEventTarget
 {
   readonly attribute long             top;
   readonly attribute long             left;
   readonly attribute long             width;
   readonly attribute long             height;
   readonly attribute long             pixelDepth;
   readonly attribute long             colorDepth;
--- a/dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl
+++ b/dom/interfaces/canvas/nsIDOMCanvasRenderingContext2D.idl
@@ -8,17 +8,17 @@
 /**
  * This interface remains only for the constants, for a context, use the
  * WebIDL/Paris bindings instead (CanvasRenderingContext2D.webidl).
  * The constants are used by CanvasRenderingContext2D::DrawWindow and are
  * used in WindowsPreviewPerTab.jsm and some extensions. The constants can
  * be referenced directly via a canvas context 2d rather than this interface,
  * and that should be preferred in new code. 
  */
-[scriptable, uuid(4417cab7-c7eb-4e0c-b00a-c43842f0cba8)]
+[uuid(4417cab7-c7eb-4e0c-b00a-c43842f0cba8)]
 interface nsIDOMCanvasRenderingContext2D : nsISupports
 {
   // Show the caret if appropriate when drawing
   const unsigned long DRAWWINDOW_DRAW_CARET   = 0x01;
   // Don't flush pending layout notifications that could otherwise
   // be batched up
   const unsigned long DRAWWINDOW_DO_NOT_FLUSH = 0x02;
   // Draw scrollbars and scroll the viewport if they are present
--- a/dom/interfaces/core/nsIDOMAttr.idl
+++ b/dom/interfaces/core/nsIDOMAttr.idl
@@ -9,17 +9,17 @@
  * The nsIDOMAttr interface represents an attribute in an "Element" object. 
  * Typically the allowable values for the attribute are defined in a document 
  * type definition.
  * 
  * For more information on this interface please see 
  * http://www.w3.org/TR/DOM-Level-2-Core/
  */
 
-[scriptable, builtinclass, uuid(a974a4d3-2ff1-445b-8b8e-0aada5d4eedc)]
+[builtinclass, uuid(a974a4d3-2ff1-445b-8b8e-0aada5d4eedc)]
 interface nsIDOMAttr : nsIDOMNode
 {
   readonly attribute DOMString            name;
   readonly attribute boolean              specified;
            attribute DOMString            value;
                                             // raises(DOMException) on setting
 
   // Introduced in DOM Level 2:
--- a/dom/interfaces/core/nsIDOMCDATASection.idl
+++ b/dom/interfaces/core/nsIDOMCDATASection.idl
@@ -10,12 +10,12 @@
  * that would otherwise be regarded as markup.
  * Their primary purpose is for including material such as XML fragments, 
  * without needing to escape all the delimiters.
  * 
  * For more information on this interface please see 
  * http://www.w3.org/TR/DOM-Level-2-Core/
  */
 
-[scriptable, uuid(0f401429-30b3-46de-b1bf-d7d5fa7563f9)]
+[uuid(0f401429-30b3-46de-b1bf-d7d5fa7563f9)]
 interface nsIDOMCDATASection : nsIDOMText
 {
 };
--- a/dom/interfaces/core/nsIDOMCharacterData.idl
+++ b/dom/interfaces/core/nsIDOMCharacterData.idl
@@ -8,17 +8,17 @@
 /**
  * The nsIDOMCharacterData interface extends nsIDOMNode with a set of 
  * attributes and methods for accessing character data in the DOM.
  * 
  * For more information on this interface please see 
  * http://www.w3.org/TR/DOM-Level-2-Core/
  */
 
-[scriptable, uuid(84f72a38-1873-46f8-937c-1df22d7e7cae)]
+[uuid(84f72a38-1873-46f8-937c-1df22d7e7cae)]
 interface nsIDOMCharacterData : nsIDOMNode
 {
            attribute DOMString            data;
                                   // raises(DOMException) on setting
                                   // raises(DOMException) on retrieval
 
   readonly attribute unsigned long        length;
   DOMString                 substringData(in unsigned long offset, 
--- a/dom/interfaces/core/nsIDOMComment.idl
+++ b/dom/interfaces/core/nsIDOMComment.idl
@@ -9,12 +9,12 @@
  * The nsIDOMComment interface inherits from nsIDOMCharacterData and represents 
  * the content of a comment, i.e., all the characters between the starting 
  * '<!--' and ending '-->'.
  * 
  * For more information on this interface please see 
  * http://www.w3.org/TR/DOM-Level-2-Core/
  */
 
-[scriptable, uuid(e702a5d2-3aa8-4788-b048-2d3b3e6d16f2)]
+[uuid(e702a5d2-3aa8-4788-b048-2d3b3e6d16f2)]
 interface nsIDOMComment : nsIDOMCharacterData
 {
 };
--- a/dom/interfaces/core/nsIDOMDOMException.idl
+++ b/dom/interfaces/core/nsIDOMDOMException.idl
@@ -12,17 +12,17 @@
  * circumstances, i.e., when an operation is impossible to perform
  * (either for logical reasons, because data is lost, or because the
  * implementation has become unstable)
  *
  * For more information on this interface please see
  * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#domexception
  */
 
-[scriptable, uuid(5bd766d3-57a9-4833-995d-dbe21da29595)]
+[uuid(5bd766d3-57a9-4833-995d-dbe21da29595)]
 interface nsIDOMDOMException : nsISupports
 {
   const unsigned short      INDEX_SIZE_ERR                 = 1;
   const unsigned short      DOMSTRING_SIZE_ERR             = 2; // historical
   const unsigned short      HIERARCHY_REQUEST_ERR          = 3;
   const unsigned short      WRONG_DOCUMENT_ERR             = 4;
   const unsigned short      INVALID_CHARACTER_ERR          = 5;
   const unsigned short      NO_DATA_ALLOWED_ERR            = 6; // historical
--- a/dom/interfaces/core/nsIDOMDocument.idl
+++ b/dom/interfaces/core/nsIDOMDocument.idl
@@ -27,17 +27,17 @@ interface nsIDOMLocation;
  * cannot exist outside the context of a Document, the nsIDOMDocument 
  * interface also contains the factory methods needed to create these 
  * objects.
  *
  * For more information on this interface please see 
  * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
  */
 
-[scriptable, uuid(d24d1118-a527-4d5a-9c4e-fb07dfc2fc27)]
+[uuid(d24d1118-a527-4d5a-9c4e-fb07dfc2fc27)]
 interface nsIDOMDocument : nsIDOMNode
 {
   readonly attribute nsIDOMDocumentType         doctype;
   readonly attribute nsIDOMDOMImplementation    implementation;
   readonly attribute nsIDOMElement              documentElement;
   nsIDOMElement                 createElement([Null(Stringify)] in DOMString tagName)
                                   raises(DOMException);
   nsIDOMDocumentFragment        createDocumentFragment();
--- a/dom/interfaces/core/nsIDOMDocumentFragment.idl
+++ b/dom/interfaces/core/nsIDOMDocumentFragment.idl
@@ -9,17 +9,17 @@
  * DocumentFragment is a "lightweight" or "minimal" Document object.
  * nsIDOMDocumentFragment is used in situations where the Document
  * interface can potentially be a heavyweight interface.
  *
  * For more information on this interface please see 
  * http://www.w3.org/TR/DOM-Level-2-Core/
  */
 
-[scriptable, builtinclass, uuid(75a237af-133e-40f0-8196-2a172867c41a)]
+[builtinclass, uuid(75a237af-133e-40f0-8196-2a172867c41a)]
 interface nsIDOMDocumentFragment : nsIDOMNode
 {
   /**
    * Return nodes that match a given CSS selector.
    *
    * @see <http://dev.w3.org/2006/webapi/selectors-api/>
    */
   nsIDOMElement querySelector([Null(Stringify)] in DOMString selectors);
--- a/dom/interfaces/core/nsIDOMDocumentType.idl
+++ b/dom/interfaces/core/nsIDOMDocumentType.idl
@@ -10,17 +10,17 @@
  * or a DocumentType object. 
  * The nsIDOMDocumentType interface in the DOM Core provides an 
  * interface to the list of entities that are defined for the document.
  *
  * For more information on this interface please see 
  * http://www.w3.org/TR/DOM-Level-2-Core/
  */
 
-[scriptable, uuid(aa7d28b2-7122-422d-8fcf-634771fb9ac1)]
+[uuid(aa7d28b2-7122-422d-8fcf-634771fb9ac1)]
 interface nsIDOMDocumentType : nsIDOMNode
 {
   readonly attribute  DOMString            name;
   readonly attribute  DOMString            publicId;
   readonly attribute  DOMString            systemId;
   readonly attribute  DOMString            internalSubset;
 
   [binaryname(MozRemove)]
--- a/dom/interfaces/core/nsIDOMElement.idl
+++ b/dom/interfaces/core/nsIDOMElement.idl
@@ -10,17 +10,17 @@ interface nsIDOMMozNamedAttrMap;
 /**
  * The nsIDOMElement interface represents an element in an HTML or 
  * XML document. 
  *
  * For more information on this interface please see 
  * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-element
  */
 
-[scriptable, uuid(989422ef-120d-4d29-8a56-6aa2505a8b02)]
+[uuid(989422ef-120d-4d29-8a56-6aa2505a8b02)]
 interface nsIDOMElement : nsIDOMNode
 {
   readonly attribute DOMString        tagName;
 
   /**
    * Returns a DOMTokenList object reflecting the class attribute.
    */
   readonly attribute nsISupports classList;
--- a/dom/interfaces/core/nsIDOMMozNamedAttrMap.idl
+++ b/dom/interfaces/core/nsIDOMMozNamedAttrMap.idl
@@ -5,17 +5,17 @@
 
 #include "domstubs.idl"
 
 /**
  * This is a temporary, non-standard interface, to ease the transition to a
  * world where Attr no longer inherits from Node.
  */
 
-[scriptable, uuid(cb5564cd-26ec-418f-a6d6-1d57cd2c971c)]
+[uuid(cb5564cd-26ec-418f-a6d6-1d57cd2c971c)]
 interface nsIDOMMozNamedAttrMap : nsISupports
 {
   nsIDOMAttr                getNamedItem(in DOMString name);
   nsIDOMAttr                setNamedItem(in nsIDOMAttr arg)
                                   raises(DOMException);
   nsIDOMAttr                removeNamedItem(in DOMString name)
                                   raises(DOMException);
   nsIDOMAttr                item(in unsigned long index);
--- a/dom/interfaces/core/nsIDOMNode.idl
+++ b/dom/interfaces/core/nsIDOMNode.idl
@@ -12,17 +12,17 @@ interface nsIDOMUserDataHandler;
  * The nsIDOMNode interface is the primary datatype for the entire 
  * Document Object Model.
  * It represents a single node in the document tree.
  *
  * For more information on this interface please see 
  * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
  */
 
-[scriptable, uuid(56545150-a001-484e-9ed4-cb319eebd7b3)]
+[uuid(56545150-a001-484e-9ed4-cb319eebd7b3)]
 interface nsIDOMNode : nsISupports
 {
   const unsigned short      ELEMENT_NODE       = 1;
   const unsigned short      ATTRIBUTE_NODE     = 2;
   const unsigned short      TEXT_NODE          = 3;
   const unsigned short      CDATA_SECTION_NODE = 4;
   const unsigned short      ENTITY_REFERENCE_NODE = 5;
   const unsigned short      ENTITY_NODE        = 6;
--- a/dom/interfaces/core/nsIDOMNodeList.idl
+++ b/dom/interfaces/core/nsIDOMNodeList.idl
@@ -10,14 +10,16 @@
  * collection of nodes, without defining or constraining how this collection 
  * is implemented.
  * The items in the list are accessible via an integral index, starting from 0.
  *
  * For more information on this interface please see 
  * http://www.w3.org/TR/DOM-Level-2-Core/
  */
 
+// NOTE: Please do not attempt to make this not scriptable,
+// see https://bugzilla.mozilla.org/show_bug.cgi?id=994964#c73.
 [scriptable, uuid(450cf0ba-de90-4f86-85bf-e10cc8b8713f)]
 interface nsIDOMNodeList : nsISupports
 {
   nsIDOMNode    item(in unsigned long index);
   readonly attribute unsigned long          length;
 };
--- a/dom/interfaces/core/nsIDOMProcessingInstruction.idl
+++ b/dom/interfaces/core/nsIDOMProcessingInstruction.idl
@@ -10,13 +10,13 @@
  * "processing instruction", used in XML as a way to keep processor-specific 
  * information in the text of the document.
  *
  * For more information on this interface please see 
  * http://www.w3.org/TR/DOM-Level-2-Core/ and
  * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
  */
 
-[scriptable, uuid(91f2e856-5596-44d6-b396-0a02d8ec28c6)]
+[uuid(91f2e856-5596-44d6-b396-0a02d8ec28c6)]
 interface nsIDOMProcessingInstruction : nsIDOMCharacterData
 {
   readonly attribute DOMString        target;
 };
--- a/dom/interfaces/core/nsIDOMText.idl
+++ b/dom/interfaces/core/nsIDOMText.idl
@@ -8,17 +8,17 @@
 /**
  * The nsIDOMText interface inherits from nsIDOMCharacterData and represents 
  * the textual content (termed character data in XML) of an Element or Attr.
  *
  * For more information on this interface please see 
  * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
  */
 
-[scriptable, uuid(d14d13b4-21d5-49e2-8d59-76a24156db54)]
+[uuid(d14d13b4-21d5-49e2-8d59-76a24156db54)]
 interface nsIDOMText : nsIDOMCharacterData
 {
   nsIDOMText                      splitText(in unsigned long offset)
                                        raises(DOMException);
 
   /**
    * The concatenation of all logically adjacent text nodes with this text
    * node, where "logically adjacent" consists of all text nodes which can be
--- a/dom/interfaces/core/nsIDOMXMLDocument.idl
+++ b/dom/interfaces/core/nsIDOMXMLDocument.idl
@@ -1,16 +1,16 @@
 /* -*- 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/. */
 
 #include "nsIDOMDocument.idl"
 
-[scriptable, uuid(ebf9f390-7cd2-4456-bc53-4869019370ea)]
+[uuid(ebf9f390-7cd2-4456-bc53-4869019370ea)]
 interface nsIDOMXMLDocument : nsIDOMDocument
 {
   // DOM Level 3 Load & Save, DocumentLS
   // http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS
   /**
    * Whether to load synchronously or asynchronously.
    * The default is async==true.
    */
--- a/dom/interfaces/css/nsIDOMCSSPrimitiveValue.idl
+++ b/dom/interfaces/css/nsIDOMCSSPrimitiveValue.idl
@@ -8,17 +8,17 @@
 /**
  * The nsIDOMCSSPrimitiveValue interface is a datatype for a primitive
  * CSS value in the Document Object Model.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Style
  */
 
-[scriptable, uuid(f6df7293-2dc9-4cb9-9531-778caf4370e0)]
+[uuid(f6df7293-2dc9-4cb9-9531-778caf4370e0)]
 interface nsIDOMCSSPrimitiveValue : nsIDOMCSSValue
 {
   // UnitTypes
   const unsigned short      CSS_UNKNOWN                    = 0;
   const unsigned short      CSS_NUMBER                     = 1;
   const unsigned short      CSS_PERCENTAGE                 = 2;
   const unsigned short      CSS_EMS                        = 3;
   const unsigned short      CSS_EXS                        = 4;
--- a/dom/interfaces/css/nsIDOMCSSStyleDeclaration.idl
+++ b/dom/interfaces/css/nsIDOMCSSStyleDeclaration.idl
@@ -8,17 +8,17 @@
 /**
  * The nsIDOMCSSStyleDeclaration interface is a datatype for a CSS
  * style declaration in the Document Object Model.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Style
  */
 
-[scriptable, uuid(a6cf90be-15b3-11d2-932e-00805f8add32)]
+[uuid(a6cf90be-15b3-11d2-932e-00805f8add32)]
 interface nsIDOMCSSStyleDeclaration : nsISupports
 {
            attribute DOMString        cssText;
                                         // raises(DOMException) on setting
 
   DOMString          getPropertyValue(in DOMString propertyName);
   nsIDOMCSSValue     getPropertyCSSValue(in DOMString propertyName);
   DOMString          removeProperty(in DOMString propertyName)
--- a/dom/interfaces/css/nsIDOMCSSStyleSheet.idl
+++ b/dom/interfaces/css/nsIDOMCSSStyleSheet.idl
@@ -8,17 +8,17 @@
 /**
  * The nsIDOMCSSStyleSheet interface is a datatype for a CSS style
  * sheet in the Document Object Model.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Style
  */
 
-[scriptable, uuid(a6cf90c2-15b3-11d2-932e-00805f8add32)]
+[uuid(a6cf90c2-15b3-11d2-932e-00805f8add32)]
 interface nsIDOMCSSStyleSheet : nsIDOMStyleSheet
 {
   readonly attribute nsIDOMCSSRule     ownerRule;
   readonly attribute nsIDOMCSSRuleList cssRules;
 
   unsigned long      insertRule(in DOMString rule, 
                                 in unsigned long index)
                                         raises(DOMException);
--- a/dom/interfaces/css/nsIDOMCSSValue.idl
+++ b/dom/interfaces/css/nsIDOMCSSValue.idl
@@ -8,17 +8,17 @@
 /**
  * The nsIDOMCSSValue interface is a datatype for a CSS value in the
  * Document Object Model.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Style
  */
 
-[scriptable, uuid(009f7ea5-9e80-41be-b008-db62f10823f2)]
+[uuid(009f7ea5-9e80-41be-b008-db62f10823f2)]
 interface nsIDOMCSSValue : nsISupports
 {
   // UnitTypes
   const unsigned short      CSS_INHERIT                    = 0;
   const unsigned short      CSS_PRIMITIVE_VALUE            = 1;
   const unsigned short      CSS_VALUE_LIST                 = 2;
   const unsigned short      CSS_CUSTOM                     = 3;
 
--- a/dom/interfaces/css/nsIDOMCSSValueList.idl
+++ b/dom/interfaces/css/nsIDOMCSSValueList.idl
@@ -1,12 +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/. */
 
 #include "domstubs.idl"
 #include "nsIDOMCSSValue.idl"
 
-[scriptable, uuid(92364ed1-e364-4175-bc52-c2fe9671cbc7)]
+[uuid(92364ed1-e364-4175-bc52-c2fe9671cbc7)]
 interface nsIDOMCSSValueList : nsIDOMCSSValue
 {
 };
--- a/dom/interfaces/css/nsIDOMRect.idl
+++ b/dom/interfaces/css/nsIDOMRect.idl
@@ -1,15 +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/. */
 
 #include "domstubs.idl"
 
-[scriptable, uuid(71735f62-ac5c-4236-9a1f-5ffb280d531c)]
+[uuid(71735f62-ac5c-4236-9a1f-5ffb280d531c)]
 interface nsIDOMRect : nsISupports
 {
   readonly attribute nsIDOMCSSPrimitiveValue  top;
   readonly attribute nsIDOMCSSPrimitiveValue  right;
   readonly attribute nsIDOMCSSPrimitiveValue  bottom;
   readonly attribute nsIDOMCSSPrimitiveValue  left;
 };
--- a/dom/interfaces/devicestorage/nsIDOMDeviceStorage.idl
+++ b/dom/interfaces/devicestorage/nsIDOMDeviceStorage.idl
@@ -11,17 +11,17 @@ interface nsIDOMDeviceStorageChangeEvent
 interface nsIDOMEventListener;
 interface nsIFile;
 
 %{C++
 struct DeviceStorageFileDescriptor;
 %}
 [ptr] native DeviceStorageFdPtr(DeviceStorageFileDescriptor);
 
-[scriptable, uuid(8b724547-3c78-4244-969a-f00a1f4ae0c3), builtinclass]
+[uuid(8b724547-3c78-4244-969a-f00a1f4ae0c3), builtinclass]
 interface nsIDOMDeviceStorage : nsIDOMEventTarget
 {
     [implicit_jscontext] attribute jsval onchange;
     nsIDOMDOMRequest add(in nsIDOMBlob aBlob);
     nsIDOMDOMRequest addNamed(in nsIDOMBlob aBlob, in DOMString aName);
 
     nsIDOMDOMRequest get([Null(Stringify)] in DOMString aName);
     nsIDOMDOMRequest getEditable([Null(Stringify)] in DOMString aName);
--- a/dom/interfaces/devicestorage/nsIDOMDeviceStorageChangeEvent.idl
+++ b/dom/interfaces/devicestorage/nsIDOMDeviceStorageChangeEvent.idl
@@ -1,16 +1,16 @@
 /* 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/. */
 
 #include "domstubs.idl"
 #include "nsIDOMEvent.idl"
 
-[scriptable, uuid(30eaf0b9-8f3f-49fe-818e-7b7d9fbf8f95), builtinclass]
+[uuid(30eaf0b9-8f3f-49fe-818e-7b7d9fbf8f95), builtinclass]
 interface nsIDOMDeviceStorageChangeEvent : nsIDOMEvent
 {
 
   [noscript] void initDeviceStorageChangeEvent(in DOMString eventTypeArg,
                                                in boolean canBubbleArg,
                                                in boolean cancelableArg,
                                                in DOMString path,
                                                in DOMString reason);
--- a/dom/interfaces/events/nsIDOMAnimationEvent.idl
+++ b/dom/interfaces/events/nsIDOMAnimationEvent.idl
@@ -6,14 +6,14 @@
 #include "nsIDOMEvent.idl"
 
 /**
  * Animation events are defined in:
  * http://www.w3.org/TR/css3-animations/#animation-events-
  * http://dev.w3.org/csswg/css3-animations/#animation-events-
  */
 
-[scriptable, builtinclass, uuid(b1bea1bc-689b-4e07-8cbc-ef342725f9a6)]
+[builtinclass, uuid(b1bea1bc-689b-4e07-8cbc-ef342725f9a6)]
 interface nsIDOMAnimationEvent : nsIDOMEvent {
   readonly attribute DOMString          animationName;
   readonly attribute float              elapsedTime;
   readonly attribute DOMString          pseudoElement;
 };
--- a/dom/interfaces/events/nsIDOMBeforeUnloadEvent.idl
+++ b/dom/interfaces/events/nsIDOMBeforeUnloadEvent.idl
@@ -10,17 +10,17 @@
  * sent to handlers of the "beforeunload" event. This event is
  * non-standard. Interface derived from Microsoft IE's event
  * implementation.
  *
  * http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/events.asp
  *
  */
 
-[scriptable, builtinclass, uuid(ee7b8943-440e-4cc3-b25e-c17c8a821d8b)]
+[builtinclass, uuid(ee7b8943-440e-4cc3-b25e-c17c8a821d8b)]
 interface nsIDOMBeforeUnloadEvent : nsIDOMEvent
 {
   /**
    * Attribute used to pass back a return value from a beforeunload
    * handler
    */
            attribute DOMString          returnValue;
 };
--- a/dom/interfaces/events/nsIDOMClipboardEvent.idl
+++ b/dom/interfaces/events/nsIDOMClipboardEvent.idl
@@ -3,17 +3,17 @@
  * 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/. */
 
 #include "domstubs.idl"
 #include "nsIDOMEvent.idl"
 
 interface nsIDOMDataTransfer;
 
-[scriptable, builtinclass, uuid(8D92944A-F2E5-41F4-9CF3-D85043B90CAC)]
+[builtinclass, uuid(8D92944A-F2E5-41F4-9CF3-D85043B90CAC)]
 interface nsIDOMClipboardEvent : nsIDOMEvent
 {
   readonly attribute nsIDOMDataTransfer clipboardData;
 
   // The constructor must be used from script to initialize
   // clipboard events.
   [noscript] void initClipboardEvent(in DOMString typeArg,
                                      in boolean canBubbleArg,
--- a/dom/interfaces/events/nsIDOMCloseEvent.idl
+++ b/dom/interfaces/events/nsIDOMCloseEvent.idl
@@ -7,17 +7,17 @@
 
 /**
  * The CloseEvent interface is the interface to the event
  * close on a WebSocket object.
  *
  * For more information on this interface, please see
  * http://dev.w3.org/html5/websockets/#closeevent
  */
-[scriptable, builtinclass, uuid(0b85dc61-2436-4786-b153-097f5c3a33b6)]
+[builtinclass, uuid(0b85dc61-2436-4786-b153-097f5c3a33b6)]
 interface nsIDOMCloseEvent : nsIDOMEvent
 {
   readonly attribute boolean wasClean;
   readonly attribute unsigned short code;
   readonly attribute DOMString reason;
 
   void initCloseEvent(in DOMString aType,
                       in boolean aCanBubble,
--- a/dom/interfaces/events/nsIDOMCommandEvent.idl
+++ b/dom/interfaces/events/nsIDOMCommandEvent.idl
@@ -1,16 +1,16 @@
 /* -*- 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/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(3fdc07cb-3b2e-4c6e-a054-008a4f302202)]
+[builtinclass, uuid(3fdc07cb-3b2e-4c6e-a054-008a4f302202)]
 interface nsIDOMCommandEvent : nsIDOMEvent
 {
   readonly attribute DOMString command;
 
   void initCommandEvent(in DOMString typeArg,
                         in boolean canBubbleArg,
                         in boolean canCancelArg,
                         in DOMString command);
--- a/dom/interfaces/events/nsIDOMCompositionEvent.idl
+++ b/dom/interfaces/events/nsIDOMCompositionEvent.idl
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* 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/. */
 
 #include "nsIDOMUIEvent.idl"
 
-[scriptable, builtinclass, uuid(ef545b90-a5f4-471c-b4f8-03b5e0f6fda2)]
+[builtinclass, uuid(ef545b90-a5f4-471c-b4f8-03b5e0f6fda2)]
 interface nsIDOMCompositionEvent : nsIDOMUIEvent
 {
   readonly attribute DOMString data;
   readonly attribute DOMString locale;
 
   void initCompositionEvent(in DOMString typeArg,
                             in boolean canBubbleArg,
                             in boolean cancelableArg,
--- a/dom/interfaces/events/nsIDOMCustomEvent.idl
+++ b/dom/interfaces/events/nsIDOMCustomEvent.idl
@@ -1,17 +1,17 @@
 /* vim: set shiftwidth=2 tabstop=8 autoindent cindent expandtab: */
 /* 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/. */
 
 #include "nsIDOMEvent.idl"
 interface nsIVariant;
 
-[scriptable, builtinclass, uuid(b56ae6ca-c822-489e-be71-2a9f3c56082e)]
+[builtinclass, uuid(b56ae6ca-c822-489e-be71-2a9f3c56082e)]
 interface nsIDOMCustomEvent : nsIDOMEvent
 {
 
   readonly attribute nsIVariant detail;
 
   void initCustomEvent(in DOMString  typeArg, 
                        in boolean    canBubbleArg, 
                        in boolean    cancelableArg, 
--- a/dom/interfaces/events/nsIDOMDOMTransactionEvent.idl
+++ b/dom/interfaces/events/nsIDOMDOMTransactionEvent.idl
@@ -2,17 +2,17 @@
 /* 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/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIVariant;
 
-[scriptable, builtinclass, uuid(f57f7c46-d420-4f32-a61b-0eb585d30ee1)]
+[builtinclass, uuid(f57f7c46-d420-4f32-a61b-0eb585d30ee1)]
 interface nsIDOMDOMTransactionEvent : nsIDOMEvent
 {
   readonly attribute nsIVariant transactions;
 
   void initDOMTransactionEvent(in DOMString typeArg,
                                in boolean canBubbleArg,
                                in boolean canCancelArg,
                                in nsIVariant transactions);
--- a/dom/interfaces/events/nsIDOMDataContainerEvent.idl
+++ b/dom/interfaces/events/nsIDOMDataContainerEvent.idl
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; 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/. */
 
 #include "nsIDOMEvent.idl"
 #include "nsIVariant.idl"
 
-[scriptable, builtinclass, uuid(dc6b39da-87ff-4b6f-b065-b52602602e06)]
+[builtinclass, uuid(dc6b39da-87ff-4b6f-b065-b52602602e06)]
 interface nsIDOMDataContainerEvent : nsIDOMEvent
 {
   /**
    * Return the data associated with the given key.
    *
    * @param  key  the key
    * @return      the data associated with the key
    */
--- a/dom/interfaces/events/nsIDOMDataTransfer.idl
+++ b/dom/interfaces/events/nsIDOMDataTransfer.idl
@@ -3,17 +3,17 @@
  * 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/. */
 
 #include "domstubs.idl"
 
 interface nsIVariant;
 interface nsIDOMFileList;
 
-[scriptable, builtinclass, uuid(c71180e3-298b-4fbb-9ccb-82c822474741)]
+[builtinclass, uuid(c71180e3-298b-4fbb-9ccb-82c822474741)]
 interface nsIDOMDataTransfer : nsISupports
 {
   /**
    * The actual effect that will be used, and should always be one of the
    * possible values of effectAllowed.
    *
    * For dragstart, drag and dragleave events, the dropEffect is initialized
    * to none. Any value assigned to the dropEffect will be set, but the value
--- a/dom/interfaces/events/nsIDOMDeviceOrientationEvent.idl
+++ b/dom/interfaces/events/nsIDOMDeviceOrientationEvent.idl
@@ -1,15 +1,15 @@
 /* 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/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(f5921a77-3ac5-4374-bc0c-1ed52fe83123)]
+[builtinclass, uuid(f5921a77-3ac5-4374-bc0c-1ed52fe83123)]
 interface nsIDOMDeviceOrientationEvent : nsIDOMEvent
 {
   void initDeviceOrientationEvent(in DOMString eventTypeArg,
                                   in boolean canBubbleArg,
                                   in boolean cancelableArg,
                                   in double alpha,
                                   in double beta,
                                   in double gamma,
--- a/dom/interfaces/events/nsIDOMDragEvent.idl
+++ b/dom/interfaces/events/nsIDOMDragEvent.idl
@@ -3,17 +3,17 @@
  * 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/. */
 
 #include "domstubs.idl"
 #include "nsIDOMMouseEvent.idl"
 
 interface nsIDOMDataTransfer;
 
-[scriptable, builtinclass, uuid(4d0fe952-7ca7-4730-a163-4454e39ed187)]
+[builtinclass, uuid(4d0fe952-7ca7-4730-a163-4454e39ed187)]
 interface nsIDOMDragEvent : nsIDOMMouseEvent
 {
   readonly attribute nsIDOMDataTransfer dataTransfer;
 
   void initDragEvent(in DOMString typeArg,
                      in boolean canBubbleArg,
                      in boolean cancelableArg,
                      in nsIDOMWindow aView,
--- a/dom/interfaces/events/nsIDOMElementReplaceEvent.idl
+++ b/dom/interfaces/events/nsIDOMElementReplaceEvent.idl
@@ -2,17 +2,17 @@
 /* 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/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIDOMElement;
 
-[scriptable, builtinclass, uuid(19a31767-54bf-4044-8769-cd172e37eca2)]
+[builtinclass, uuid(19a31767-54bf-4044-8769-cd172e37eca2)]
 interface nsIDOMElementReplaceEvent : nsIDOMEvent
 {
   readonly attribute nsIDOMElement upgrade;
 
   void initElementReplaceEvent(in DOMString typeArg,
                                in boolean canBubbleArg,
                                in boolean canCancelArg,
                                in nsIDOMElement upgrade);
--- a/dom/interfaces/events/nsIDOMEvent.idl
+++ b/dom/interfaces/events/nsIDOMEvent.idl
@@ -35,17 +35,17 @@ class EventTarget;
  * The nsIDOMEvent interface is the primary datatype for all events in
  * the Document Object Model.
  *
  * For more information on this interface please see 
  * http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html and
  * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
  */
 
-[scriptable, builtinclass, uuid(02d54f52-a1f5-4ad2-b560-36f14012935e)]
+[builtinclass, uuid(02d54f52-a1f5-4ad2-b560-36f14012935e)]
 interface nsIDOMEvent : nsISupports
 {
   // PhaseType
   /**
    * The event isn't being dispatched.
    */
   const unsigned short      NONE                           = 0;
   /**
--- a/dom/interfaces/events/nsIDOMFocusEvent.idl
+++ b/dom/interfaces/events/nsIDOMFocusEvent.idl
@@ -1,12 +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/. */
 
 #include "nsIDOMUIEvent.idl"
 
-[scriptable, builtinclass, uuid(4faecbd6-1bcd-42d8-bc66-ec6b95050063)]
+[builtinclass, uuid(4faecbd6-1bcd-42d8-bc66-ec6b95050063)]
 interface nsIDOMFocusEvent : nsIDOMUIEvent
 {
   readonly attribute nsIDOMEventTarget  relatedTarget;
 };
--- a/dom/interfaces/events/nsIDOMHashChangeEvent.idl
+++ b/dom/interfaces/events/nsIDOMHashChangeEvent.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; 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/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(d83f3cb2-1fa4-4ee0-8eb1-8181f6d3e214)]
+[builtinclass, uuid(d83f3cb2-1fa4-4ee0-8eb1-8181f6d3e214)]
 interface nsIDOMHashChangeEvent : nsIDOMEvent
 {
   readonly attribute DOMString oldURL;
   readonly attribute DOMString newURL;
 
   void initHashChangeEvent(in DOMString typeArg,
                            in boolean canBubbleArg,
                            in boolean cancelableArg,
--- a/dom/interfaces/events/nsIDOMKeyEvent.idl
+++ b/dom/interfaces/events/nsIDOMKeyEvent.idl
@@ -1,16 +1,16 @@
 /* -*- 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/. */
 
 #include "nsIDOMUIEvent.idl"
 
-[scriptable, builtinclass, uuid(d2b3e35f-8627-4732-a92d-cda54c8f8054)]
+[builtinclass, uuid(d2b3e35f-8627-4732-a92d-cda54c8f8054)]
 interface nsIDOMKeyEvent : nsIDOMUIEvent
 {
   const unsigned long DOM_VK_CANCEL         = 0x03;
   const unsigned long DOM_VK_HELP           = 0x06;
   const unsigned long DOM_VK_BACK_SPACE     = 0x08;
   const unsigned long DOM_VK_TAB            = 0x09;
   const unsigned long DOM_VK_CLEAR          = 0x0C;
   const unsigned long DOM_VK_RETURN         = 0x0D;
--- a/dom/interfaces/events/nsIDOMMessageEvent.idl
+++ b/dom/interfaces/events/nsIDOMMessageEvent.idl
@@ -7,17 +7,17 @@
 
 /**
  * The nsIDOMMessageEvent interface is used for server-sent events and for
  * cross-domain messaging.
  *
  * For more information on this interface, please see
  * http://www.whatwg.org/specs/web-apps/current-work/#messageevent
  */
-[scriptable, builtinclass, uuid(bb869a03-5fc0-4a1b-838a-342e5025fc05)]
+[builtinclass, uuid(bb869a03-5fc0-4a1b-838a-342e5025fc05)]
 interface nsIDOMMessageEvent : nsIDOMEvent
 {
   /**
    * Custom string data associated with this event.
    */
   [implicit_jscontext]
   readonly attribute jsval data;
   
--- a/dom/interfaces/events/nsIDOMMouseEvent.idl
+++ b/dom/interfaces/events/nsIDOMMouseEvent.idl
@@ -8,17 +8,17 @@
 /**
  * The nsIDOMMouseEvent interface is the datatype for all mouse events
  * in the Document Object Model.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Events/
  */
 
-[scriptable, builtinclass, uuid(df068636-9a5b-11e3-b71f-2c27d728e7f9)]
+[builtinclass, uuid(df068636-9a5b-11e3-b71f-2c27d728e7f9)]
 interface nsIDOMMouseEvent : nsIDOMUIEvent
 {
   readonly attribute long               screenX;
   readonly attribute long               screenY;
 
   readonly attribute long               mozMovementX;
   readonly attribute long               mozMovementY;
 
--- a/dom/interfaces/events/nsIDOMMouseScrollEvent.idl
+++ b/dom/interfaces/events/nsIDOMMouseScrollEvent.idl
@@ -1,16 +1,16 @@
 /* -*- 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/. */
 
 #include "nsIDOMMouseEvent.idl"
 
-[scriptable, builtinclass, uuid(2bce5c03-5bed-4c22-8a6a-a3ac8f5563d7)]
+[builtinclass, uuid(2bce5c03-5bed-4c22-8a6a-a3ac8f5563d7)]
 interface nsIDOMMouseScrollEvent : nsIDOMMouseEvent
 {
   const long HORIZONTAL_AXIS = 1;
   const long VERTICAL_AXIS = 2;
 
   readonly attribute long axis;
 
   void                initMouseScrollEvent(in DOMString typeArg,
--- a/dom/interfaces/events/nsIDOMMutationEvent.idl
+++ b/dom/interfaces/events/nsIDOMMutationEvent.idl
@@ -1,16 +1,16 @@
 /* -*- 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/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(982d9800-1402-46e5-8ad2-56fb0f4905ef)]
+[builtinclass, uuid(982d9800-1402-46e5-8ad2-56fb0f4905ef)]
 interface nsIDOMMutationEvent : nsIDOMEvent
 {
   const unsigned short      MODIFICATION       = 1;
   const unsigned short      ADDITION           = 2;
   const unsigned short      REMOVAL            = 3;
 
   readonly attribute nsIDOMNode       relatedNode;
   readonly attribute DOMString        prevValue;
--- a/dom/interfaces/events/nsIDOMNSEvent.idl
+++ b/dom/interfaces/events/nsIDOMNSEvent.idl
@@ -6,16 +6,16 @@
 #include "domstubs.idl"
 
 %{C++
 #ifdef ERROR
 #undef ERROR
 #endif
 %}
 
-[scriptable, uuid(2580b4a2-6d85-4ca6-9be2-98f3406ad296)]
+[uuid(2580b4a2-6d85-4ca6-9be2-98f3406ad296)]
 interface nsIDOMNSEvent : nsISupports
 {
   const long ALT_MASK     = 0x00000001;
   const long CONTROL_MASK = 0x00000002;
   const long SHIFT_MASK   = 0x00000004;
   const long META_MASK    = 0x00000008;
 };
--- a/dom/interfaces/events/nsIDOMNotifyPaintEvent.idl
+++ b/dom/interfaces/events/nsIDOMNotifyPaintEvent.idl
@@ -7,17 +7,17 @@
 
 interface nsIDOMPaintRequestList;
 
 /**
  * The nsIDOMNotifyPaintEvent interface is used for the MozDOMAfterPaint
  * event, which fires at a window when painting has happened in
  * that window.
  */
-[scriptable, builtinclass, uuid(ef68f0d5-5b55-4198-9e59-a5e2c57d3adc)]
+[builtinclass, uuid(ef68f0d5-5b55-4198-9e59-a5e2c57d3adc)]
 interface nsIDOMNotifyPaintEvent : nsIDOMEvent
 {
   /**
    * Get a list of rectangles which are affected. The rectangles are in CSS pixels
    * relative to the viewport origin.
    * If the caller is not trusted (e.g., regular Web content) then only painting
    * caused by the current document is reported; in particular, painting in subdocuments
    * is not reported.
--- a/dom/interfaces/events/nsIDOMPageTransitionEvent.idl
+++ b/dom/interfaces/events/nsIDOMPageTransitionEvent.idl
@@ -6,17 +6,17 @@
 #include "nsIDOMEvent.idl"
 
 /**
  * The nsIDOMPageTransitionEvent interface is used for the pageshow and
  * pagehide events, which are generic events that apply to both page
  * load/unload and saving/restoring a document from session history.
  */
 
-[scriptable, builtinclass, uuid(8a69a3d6-c7da-4caa-993c-7f9583d9f896)]
+[builtinclass, uuid(8a69a3d6-c7da-4caa-993c-7f9583d9f896)]
 interface nsIDOMPageTransitionEvent : nsIDOMEvent
 {
   /**
    * Set to true if the document has been or will be persisted across
    * firing of the event.  For example, if a document is being cached in
    * session history, |persisted| is true for the PageHide event.
    */
   readonly attribute boolean persisted;
--- a/dom/interfaces/events/nsIDOMPaintRequest.idl
+++ b/dom/interfaces/events/nsIDOMPaintRequest.idl
@@ -6,17 +6,17 @@
 #include "domstubs.idl"
 
 interface nsIDOMClientRect;
 
 /**
  * These objects are exposed by the MozDOMAfterPaint event. Each one represents
  * a request to repaint a rectangle that was generated by the browser.
  */
-[scriptable, uuid(9eb5268f-73a4-41da-9790-d21fcefd5ffa)]
+[uuid(9eb5268f-73a4-41da-9790-d21fcefd5ffa)]
 interface nsIDOMPaintRequest : nsISupports
 {
   /**
    * The client rect where invalidation was triggered.
    */
   readonly attribute nsIDOMClientRect clientRect;
   /**
    * The reason for the request, as a string. If an empty string, then we don't know
--- a/dom/interfaces/events/nsIDOMPopStateEvent.idl
+++ b/dom/interfaces/events/nsIDOMPopStateEvent.idl
@@ -2,17 +2,17 @@
 /* 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/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIVariant;
 
-[scriptable, builtinclass, uuid(f0def4a3-0eb3-4c08-b476-582e37b8564b)]
+[builtinclass, uuid(f0def4a3-0eb3-4c08-b476-582e37b8564b)]
 interface nsIDOMPopStateEvent : nsIDOMEvent
 {
   /**
    * The state associated with this popstate event
    */
   readonly attribute nsIVariant state;
 
   void initPopStateEvent(in DOMString typeArg,
--- a/dom/interfaces/events/nsIDOMPopupBlockedEvent.idl
+++ b/dom/interfaces/events/nsIDOMPopupBlockedEvent.idl
@@ -7,17 +7,17 @@
 
 interface nsIURI;
 
 /**
  * The nsIDOMPopupBlockedEvent interface is the datatype for events
  * posted when a popup window is blocked.
  */
 
-[scriptable, builtinclass, uuid(f6e77f79-d178-419d-8177-dfae4392d318)]
+[builtinclass, uuid(f6e77f79-d178-419d-8177-dfae4392d318)]
 interface nsIDOMPopupBlockedEvent : nsIDOMEvent
 {
   /**
    * The window object that attempted to open the blocked popup
    * (i.e. the window object on which open() was called).
    */
   readonly attribute nsIDOMWindow requestingWindow;
 
--- a/dom/interfaces/events/nsIDOMProgressEvent.idl
+++ b/dom/interfaces/events/nsIDOMProgressEvent.idl
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMEvent.idl"
 
 /**
  * ProgressEvent can be used for measuring progress.
  */
 
-[scriptable, builtinclass, uuid(e0682338-4c3f-4d3a-9487-d7492ea76335)]
+[builtinclass, uuid(e0682338-4c3f-4d3a-9487-d7492ea76335)]
 interface nsIDOMProgressEvent : nsIDOMEvent
 {
   readonly attribute boolean lengthComputable;
   readonly attribute unsigned long long loaded;
   readonly attribute unsigned long long total;
   [noscript]
   void initProgressEvent(in DOMString typeArg,
                          in boolean canBubbleArg,
--- a/dom/interfaces/events/nsIDOMRecordErrorEvent.idl
+++ b/dom/interfaces/events/nsIDOMRecordErrorEvent.idl
@@ -6,17 +6,17 @@
 #include "nsIDOMEvent.idl"
 
 /**
  * The nsIDOMRecordErrorEvent interface is used for media recorder sent events
  * and for indeciate what's wrong in the object
  * The name value is defined in the
  * http://www.w3.org/TR/2012/WD-dom-20121206/#error-names-table
  */
-[scriptable, builtinclass, uuid(606e6f94-bf02-11e2-8a01-e722108c6d66)]
+[builtinclass, uuid(606e6f94-bf02-11e2-8a01-e722108c6d66)]
 interface nsIDOMRecordErrorEvent : nsIDOMEvent
 {
   /**
    * The error name in this event.
    */
   readonly attribute DOMString name;
 
   [noscript]
--- a/dom/interfaces/events/nsIDOMScrollAreaEvent.idl
+++ b/dom/interfaces/events/nsIDOMScrollAreaEvent.idl
@@ -1,16 +1,16 @@
 /* -*- 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/. */
 
 #include "nsIDOMUIEvent.idl"
 
-[scriptable, builtinclass, uuid(49ab3d1d-f549-4cdb-904c-f6b6d3a0ec9e)]
+[builtinclass, uuid(49ab3d1d-f549-4cdb-904c-f6b6d3a0ec9e)]
 interface nsIDOMScrollAreaEvent : nsIDOMUIEvent
 {
   // Scroll area client rect
   readonly attribute float x;
   readonly attribute float y;
   readonly attribute float width;
   readonly attribute float height;
 
--- a/dom/interfaces/events/nsIDOMSimpleGestureEvent.idl
+++ b/dom/interfaces/events/nsIDOMSimpleGestureEvent.idl
@@ -94,17 +94,17 @@
  * Default behavior:
  *
  * Some operating systems support default behaviors for gesture events
  * when they are not handled by the application. Consumers should
  * use event.preventDefault() to prevent default behavior when
  * consuming events.
  */
 
-[scriptable, builtinclass, uuid(d78656ab-9d68-4f03-83f9-7c7bee071aa7)]
+[builtinclass, uuid(d78656ab-9d68-4f03-83f9-7c7bee071aa7)]
 interface nsIDOMSimpleGestureEvent : nsIDOMMouseEvent
 {
   /* Swipe direction constants */
   const unsigned long DIRECTION_UP = 1;
   const unsigned long DIRECTION_DOWN = 2;
   const unsigned long DIRECTION_LEFT = 4;
   const unsigned long DIRECTION_RIGHT = 8;
 
--- a/dom/interfaces/events/nsIDOMSmartCardEvent.idl
+++ b/dom/interfaces/events/nsIDOMSmartCardEvent.idl
@@ -5,17 +5,17 @@
 
 #include "nsIDOMEvent.idl"
 
 %{C++
 #define SMARTCARDEVENT_INSERT "smartcard-insert"
 #define SMARTCARDEVENT_REMOVE "smartcard-remove"
 %}
 
-[scriptable, builtinclass, uuid(cd251f11-7020-4f85-a7bd-94c98d884fa7)]
+[builtinclass, uuid(cd251f11-7020-4f85-a7bd-94c98d884fa7)]
 interface nsIDOMSmartCardEvent : nsIDOMEvent
 {
   readonly attribute DOMString   tokenName;
   [noscript] void initSmartCardEvent(in DOMString aTypeArg,
                                      in boolean aCanBubbleArg,
                                      in boolean aCancelableArg,
                                      in DOMString aTokenNAme);
 };
--- a/dom/interfaces/events/nsIDOMStyleRuleChangeEvent.idl
+++ b/dom/interfaces/events/nsIDOMStyleRuleChangeEvent.idl
@@ -3,17 +3,17 @@
  * 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/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIDOMCSSRule;
 interface nsIDOMCSSStyleSheet;
 
-[scriptable, builtinclass, uuid(36098d39-b471-47e9-976e-33fee3d81467)]
+[builtinclass, uuid(36098d39-b471-47e9-976e-33fee3d81467)]
 interface nsIDOMStyleRuleChangeEvent : nsIDOMEvent
 {
   readonly attribute nsIDOMCSSStyleSheet stylesheet;
   readonly attribute nsIDOMCSSRule rule;
   [noscript] void initStyleRuleChangeEvent(in DOMString aTypeArg,
                                            in boolean aCanBubbleArg,
                                            in boolean aCancelableArg,
                                            in nsIDOMCSSStyleSheet aStyleSheet,
--- a/dom/interfaces/events/nsIDOMStyleSheetApplicableStateChangeEvent.idl
+++ b/dom/interfaces/events/nsIDOMStyleSheetApplicableStateChangeEvent.idl
@@ -2,17 +2,17 @@
 /* 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/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIDOMCSSStyleSheet;
 
-[scriptable, builtinclass, uuid(75f27960-fd1a-4e05-8b8b-55d97ea22a9a)]
+[builtinclass, uuid(75f27960-fd1a-4e05-8b8b-55d97ea22a9a)]
 interface nsIDOMStyleSheetApplicableStateChangeEvent : nsIDOMEvent
 {
   readonly attribute nsIDOMCSSStyleSheet stylesheet;
   readonly attribute boolean applicable;
   [noscript] void initStyleSheetApplicableStateChangeEvent(in DOMString aTypeArg,
                                                            in boolean aCanBubbleArg,
                                                            in boolean aCancelableArg,
                                                            in nsIDOMCSSStyleSheet aStyleSheet,
--- a/dom/interfaces/events/nsIDOMStyleSheetChangeEvent.idl
+++ b/dom/interfaces/events/nsIDOMStyleSheetChangeEvent.idl
@@ -2,17 +2,17 @@
 /* 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/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIDOMCSSStyleSheet;
 
-[scriptable, builtinclass, uuid(f94c6a47-58f0-4996-b1db-3ea1d14c4ddd)]
+[builtinclass, uuid(f94c6a47-58f0-4996-b1db-3ea1d14c4ddd)]
 interface nsIDOMStyleSheetChangeEvent : nsIDOMEvent
 {
   readonly attribute nsIDOMCSSStyleSheet stylesheet;
   readonly attribute boolean documentSheet;
   [noscript] void initStyleSheetChangeEvent(in DOMString aTypeArg,
                                             in boolean aCanBubbleArg,
                                             in boolean aCancelableArg,
                                             in nsIDOMCSSStyleSheet aStyleSheet,
--- a/dom/interfaces/events/nsIDOMTransitionEvent.idl
+++ b/dom/interfaces/events/nsIDOMTransitionEvent.idl
@@ -6,14 +6,14 @@
 #include "nsIDOMEvent.idl"
 
 /**
  * Transition events are defined in:
  * http://www.w3.org/TR/css3-transitions/#transition-events-
  * http://dev.w3.org/csswg/css3-transitions/#transition-events-
  */
 
-[scriptable, builtinclass, uuid(a37171e0-9f43-41ea-a25c-0b78a3329683)]
+[builtinclass, uuid(a37171e0-9f43-41ea-a25c-0b78a3329683)]
 interface nsIDOMTransitionEvent : nsIDOMEvent {
   readonly attribute DOMString           propertyName;
   readonly attribute float               elapsedTime;
   readonly attribute DOMString           pseudoElement;
 };
--- a/dom/interfaces/events/nsIDOMUIEvent.idl
+++ b/dom/interfaces/events/nsIDOMUIEvent.idl
@@ -8,17 +8,17 @@
 /**
  * The nsIDOMUIEvent interface is the datatype for all UI events in the
  * Document Object Model.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Events/
  */
 
-[scriptable, builtinclass, uuid(d73852f8-7bd6-477d-8233-117dbf83860b)]
+[builtinclass, uuid(d73852f8-7bd6-477d-8233-117dbf83860b)]
 interface nsIDOMUIEvent : nsIDOMEvent
 {
   readonly attribute nsIDOMWindow       view;
   readonly attribute long               detail;
   void                      initUIEvent(in DOMString typeArg,
                                         in boolean canBubbleArg,
                                         in boolean cancelableArg,
                                         in nsIDOMWindow viewArg,
--- a/dom/interfaces/events/nsIDOMWheelEvent.idl
+++ b/dom/interfaces/events/nsIDOMWheelEvent.idl
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* 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/. */
 
 #include "nsIDOMMouseEvent.idl"
 
-[scriptable, builtinclass, uuid(86e2b577-7e61-4ed5-8ddd-c1533bf07137)]
+[builtinclass, uuid(86e2b577-7e61-4ed5-8ddd-c1533bf07137)]
 interface nsIDOMWheelEvent : nsIDOMMouseEvent
 {
   const unsigned long DOM_DELTA_PIXEL = 0x00;
   const unsigned long DOM_DELTA_LINE  = 0x01;
   const unsigned long DOM_DELTA_PAGE  = 0x02;
 
   // Note that DOM Level 3 Events defines the type of delta values as float.
   // However, we should use double for them.  Javascript engine always uses
--- a/dom/interfaces/geolocation/nsIDOMGeoPositionError.idl
+++ b/dom/interfaces/geolocation/nsIDOMGeoPositionError.idl
@@ -7,17 +7,17 @@
 
 // undef the GetMessage macro defined in winuser.h from the MS Platform SDK
 %{C++
 #ifdef GetMessage
 #undef GetMessage
 #endif
 %}
 
-[scriptable, uuid(85255CC3-07BA-49FD-BC9B-18D2963DAF7F)]
+[uuid(85255CC3-07BA-49FD-BC9B-18D2963DAF7F)]
 interface nsIDOMGeoPositionError : nsISupports
 {
   const unsigned short PERMISSION_DENIED  = 1;
   const unsigned short POSITION_UNAVAILABLE = 2;
   const unsigned short TIMEOUT = 3;
 
   readonly attribute short code;
   readonly attribute AString message;
--- a/dom/interfaces/html/nsIDOMHTMLAnchorElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLAnchorElement.idl
@@ -11,17 +11,17 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(339c01c8-2d41-4626-b231-eec63f0241b6)]
+[uuid(339c01c8-2d41-4626-b231-eec63f0241b6)]
 interface nsIDOMHTMLAnchorElement : nsISupports
 {
            attribute DOMString        href;
            attribute DOMString        target;
 
            attribute DOMString        ping;
            attribute DOMString        download;
 
--- a/dom/interfaces/html/nsIDOMHTMLAppletElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLAppletElement.idl
@@ -11,17 +11,17 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(0b7d12c9-4cd3-47db-99c6-0b5ff910446c)]
+[uuid(0b7d12c9-4cd3-47db-99c6-0b5ff910446c)]
 interface nsIDOMHTMLAppletElement : nsISupports
 {
            attribute DOMString        align;
            attribute DOMString        alt;
            attribute DOMString        archive;
            attribute DOMString        code;
            attribute DOMString        codeBase;
            attribute DOMString        height;
--- a/dom/interfaces/html/nsIDOMHTMLAreaElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLAreaElement.idl
@@ -11,17 +11,17 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(40c78026-36dc-40ca-9221-de73267e9e99)]
+[uuid(40c78026-36dc-40ca-9221-de73267e9e99)]
 interface nsIDOMHTMLAreaElement : nsISupports
 {
            attribute DOMString        alt;
            attribute DOMString        coords;
            attribute DOMString        shape;
            attribute DOMString        href;
            attribute DOMString        target;
 
--- a/dom/interfaces/html/nsIDOMHTMLAudioElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLAudioElement.idl
@@ -11,12 +11,12 @@
  * <audio> element.
  *
  * For more information on this interface, please see
  * http://www.whatwg.org/specs/web-apps/current-work/#audio
  *
  * @status UNDER_DEVELOPMENT
  */
 
-[scriptable, uuid(75a7f3ca-0761-4b63-863b-6fd6a87ed51c)]
+[uuid(75a7f3ca-0761-4b63-863b-6fd6a87ed51c)]
 interface nsIDOMHTMLAudioElement : nsIDOMHTMLMediaElement
 {
 };
--- a/dom/interfaces/html/nsIDOMHTMLBRElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLBRElement.idl
@@ -11,13 +11,13 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(ba8fb51a-e552-4272-b3df-5e63a60b86ee)]
+[uuid(ba8fb51a-e552-4272-b3df-5e63a60b86ee)]
 interface nsIDOMHTMLBRElement : nsISupports
 {
            attribute DOMString        clear;
 };
--- a/dom/interfaces/html/nsIDOMHTMLBaseElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLBaseElement.idl
@@ -11,14 +11,14 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(a348ac22-7880-4613-af4c-984ec2ef5adc)]
+[uuid(a348ac22-7880-4613-af4c-984ec2ef5adc)]
 interface nsIDOMHTMLBaseElement : nsISupports
 {
            attribute DOMString        href;
            attribute DOMString        target;
 };
--- a/dom/interfaces/html/nsIDOMHTMLBodyElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLBodyElement.idl
@@ -15,17 +15,17 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(068630db-2c00-43dd-b167-495757a88236)]
+[uuid(068630db-2c00-43dd-b167-495757a88236)]
 interface nsIDOMHTMLBodyElement : nsISupports
 {
            attribute DOMString        aLink;
            attribute DOMString        background;
            attribute DOMString        bgColor;
            attribute DOMString        link;
            attribute DOMString        text;
            attribute DOMString        vLink;
--- a/dom/interfaces/html/nsIDOMHTMLButtonElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLButtonElement.idl
@@ -13,17 +13,17 @@
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
 interface nsIDOMValidityState;
 
-[scriptable, uuid(44b7a468-7dba-4f0c-9b4e-ee46dc0f26c7)]
+[uuid(44b7a468-7dba-4f0c-9b4e-ee46dc0f26c7)]
 interface nsIDOMHTMLButtonElement : nsISupports
 {
            attribute boolean               autofocus;
            attribute boolean               disabled;
   readonly attribute nsIDOMHTMLFormElement form;
            attribute DOMString             formAction;
            attribute DOMString             formEnctype;
            attribute DOMString             formMethod;
--- a/dom/interfaces/html/nsIDOMHTMLCanvasElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLCanvasElement.idl
@@ -15,17 +15,17 @@
  * @status UNDER_DEVELOPMENT
  */
 
 interface nsIDOMBlob;
 interface nsIDOMFile;
 interface nsIVariant;
 interface nsIInputStreamCallback;
 
-[scriptable, uuid(8978d1c5-2981-4678-a1c3-b0b7bae04fbc)]
+[uuid(8978d1c5-2981-4678-a1c3-b0b7bae04fbc)]
 interface nsIDOMHTMLCanvasElement : nsISupports
 {
   attribute unsigned long width;
   attribute unsigned long height;
   attribute boolean mozOpaque;
 
   // Valid calls are:
   //  toDataURL();              -- defaults to image/png
--- a/dom/interfaces/html/nsIDOMHTMLCollection.idl
+++ b/dom/interfaces/html/nsIDOMHTMLCollection.idl
@@ -11,16 +11,16 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(bb07f567-5b37-4172-92aa-7d00ceed4809)]
+[uuid(bb07f567-5b37-4172-92aa-7d00ceed4809)]
 interface nsIDOMHTMLCollection : nsISupports
 {
   readonly attribute unsigned long    length;
 
   nsIDOMNode item(in unsigned long index);
   nsIDOMNode namedItem(in DOMString name);
 };
--- a/dom/interfaces/html/nsIDOMHTMLDirectoryElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLDirectoryElement.idl
@@ -12,12 +12,12 @@
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
 // Exists so that | element instanceof Ci.nsIDOMHTMLDirectoryElement | works.
-[scriptable, uuid(8cfff7a4-8b14-4ce0-97b0-babe78da16f8)]
+[uuid(8cfff7a4-8b14-4ce0-97b0-babe78da16f8)]
 interface nsIDOMHTMLDirectoryElement : nsISupports
 {
 };
--- a/dom/interfaces/html/nsIDOMHTMLDivElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLDivElement.idl
@@ -11,13 +11,13 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(d1b51f44-38e0-4496-8236-b795e36df0e2)]
+[uuid(d1b51f44-38e0-4496-8236-b795e36df0e2)]
 interface nsIDOMHTMLDivElement : nsISupports
 {
            attribute DOMString        align;
 };
--- a/dom/interfaces/html/nsIDOMHTMLDocument.idl
+++ b/dom/interfaces/html/nsIDOMHTMLDocument.idl
@@ -8,17 +8,17 @@
 /**
  * The nsIDOMHTMLDocument interface is the interface to a [X]HTML
  * document object.
  *
  * @see <http://www.whatwg.org/html/>
  */
 interface nsISelection;
 
-[scriptable, uuid(b73be9dd-bcc8-44df-8b01-3389e277427f)]
+[uuid(b73be9dd-bcc8-44df-8b01-3389e277427f)]
 interface nsIDOMHTMLDocument : nsIDOMDocument
 {
            attribute DOMString            domain;
            attribute DOMString            cookie;
 
   readonly attribute nsIDOMHTMLHeadElement head;
            attribute nsIDOMHTMLElement    body;
 
--- a/dom/interfaces/html/nsIDOMHTMLElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLElement.idl
@@ -14,17 +14,17 @@ interface nsIDOMHTMLMenuElement;
  * tree.
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
-[scriptable, uuid(e29ddc73-ac40-40fe-8bbd-14bf2d52c53a)]
+[uuid(e29ddc73-ac40-40fe-8bbd-14bf2d52c53a)]
 interface nsIDOMHTMLElement : nsIDOMElement
 {
   // metadata attributes
            attribute DOMString        id;
            attribute DOMString        title;
            attribute DOMString        lang;
            attribute DOMString        dir;
   [binaryname(DOMClassName)]
--- a/dom/interfaces/html/nsIDOMHTMLEmbedElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLEmbedElement.idl
@@ -8,17 +8,17 @@
 /**
  * The nsIDOMHTMLEmbedElement interface is the interface to a [X]HTML
  * embed element.
  *
  * For more information on this interface, please see
  * http://www.whatwg.org/specs/web-apps/current-work/#the-embed-element
  */
 
-[scriptable, uuid(adae53da-713d-4570-81ad-dabdd6d46241)]
+[uuid(adae53da-713d-4570-81ad-dabdd6d46241)]
 interface nsIDOMHTMLEmbedElement : nsISupports
 {
            attribute DOMString        align;
            attribute DOMString        height;
            attribute DOMString        name;
            attribute DOMString        src;
            attribute DOMString        type;
            attribute DOMString        width;
--- a/dom/interfaces/html/nsIDOMHTMLFieldSetElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLFieldSetElement.idl
@@ -13,17 +13,17 @@
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
 interface nsIDOMValidityState;
 
-[scriptable, uuid(e3d91535-9da3-4c4b-a809-f17d85a4fb9f)]
+[uuid(e3d91535-9da3-4c4b-a809-f17d85a4fb9f)]
 interface nsIDOMHTMLFieldSetElement : nsISupports
 {
            attribute boolean                disabled;
   readonly attribute nsIDOMHTMLFormElement  form;
            attribute DOMString              name;
 
   readonly attribute DOMString              type;
 
--- a/dom/interfaces/html/nsIDOMHTMLFormElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLFormElement.idl
@@ -11,17 +11,17 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(ad9b2ad0-9d29-43f6-b1a2-a1fd24627e6b)]
+[uuid(ad9b2ad0-9d29-43f6-b1a2-a1fd24627e6b)]
 interface nsIDOMHTMLFormElement : nsISupports
 {
            attribute DOMString            acceptCharset;
            attribute DOMString            action;
            attribute DOMString            autocomplete;
            attribute DOMString            enctype;
            attribute DOMString            encoding;
            attribute DOMString            method;
--- a/dom/interfaces/html/nsIDOMHTMLFrameElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLFrameElement.idl
@@ -11,17 +11,17 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(60ab25b9-3246-4f50-b0d4-21e73ba88cd6)]
+[uuid(60ab25b9-3246-4f50-b0d4-21e73ba88cd6)]
 interface nsIDOMHTMLFrameElement : nsISupports
 {
            attribute DOMString        frameBorder;
            attribute DOMString        longDesc;
            attribute DOMString        marginHeight;
            attribute DOMString        marginWidth;
            attribute DOMString        name;
            attribute boolean          noResize;
--- a/dom/interfaces/html/nsIDOMHTMLFrameSetElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLFrameSetElement.idl
@@ -15,14 +15,14 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(14b29269-c387-4cff-8463-b0871ca0be3a)]
+[uuid(14b29269-c387-4cff-8463-b0871ca0be3a)]
 interface nsIDOMHTMLFrameSetElement : nsISupports
 {
            attribute DOMString        cols;
            attribute DOMString        rows;
 };
--- a/dom/interfaces/html/nsIDOMHTMLHRElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLHRElement.idl
@@ -11,17 +11,17 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(30771953-b9f4-44de-b0fe-e490949af98b)]
+[uuid(30771953-b9f4-44de-b0fe-e490949af98b)]
 interface nsIDOMHTMLHRElement : nsISupports
 {
            attribute DOMString        align;
            attribute boolean          noShade;
            attribute DOMString        size;
            attribute DOMString        width;
            attribute DOMString        color;
 };
--- a/dom/interfaces/html/nsIDOMHTMLHeadElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLHeadElement.idl
@@ -11,12 +11,12 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(59b80014-00f5-412d-846f-725494122d42)]
+[uuid(59b80014-00f5-412d-846f-725494122d42)]
 interface nsIDOMHTMLHeadElement : nsISupports
 {
 };
--- a/dom/interfaces/html/nsIDOMHTMLHeadingElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLHeadingElement.idl
@@ -11,13 +11,13 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(a40b92f7-9da7-4c9f-8a0c-cf5b9e28bb30)]
+[uuid(a40b92f7-9da7-4c9f-8a0c-cf5b9e28bb30)]
 interface nsIDOMHTMLHeadingElement : nsISupports
 {
            attribute DOMString        align;
 };
--- a/dom/interfaces/html/nsIDOMHTMLHtmlElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLHtmlElement.idl
@@ -11,13 +11,13 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(6a5d2ce7-2c45-43c1-bdab-9df7a06caed1)]
+[uuid(6a5d2ce7-2c45-43c1-bdab-9df7a06caed1)]
 interface nsIDOMHTMLHtmlElement : nsISupports
 {
            attribute DOMString        version;
 };
--- a/dom/interfaces/html/nsIDOMHTMLIFrameElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLIFrameElement.idl
@@ -11,17 +11,17 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(9fd7b656-1055-4cb2-b8b1-ed13efe24457)]
+[uuid(9fd7b656-1055-4cb2-b8b1-ed13efe24457)]
 interface nsIDOMHTMLIFrameElement : nsISupports
 {
            attribute DOMString        align;
            attribute DOMString        frameBorder;
            attribute DOMString        height;
            attribute DOMString        longDesc;
            attribute DOMString        marginHeight;
            attribute DOMString        marginWidth;
--- a/dom/interfaces/html/nsIDOMHTMLImageElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLImageElement.idl
@@ -11,17 +11,17 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(d3e488b9-3b29-410a-bcf4-18fb874c170a)]
+[uuid(d3e488b9-3b29-410a-bcf4-18fb874c170a)]
 interface nsIDOMHTMLImageElement : nsISupports
 {
            attribute DOMString        alt;
            attribute DOMString        src;
            attribute DOMString        crossOrigin;
            attribute DOMString        useMap;
            attribute boolean          isMap;
            attribute unsigned long    width;
--- a/dom/interfaces/html/nsIDOMHTMLInputElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLInputElement.idl
@@ -15,17 +15,17 @@ interface nsIDOMValidityState;
   *
   * This interface is trying to follow the DOM Level 2 HTML specification:
   * http://www.w3.org/TR/DOM-Level-2-HTML/
   *
   * with changes from the work-in-progress WHATWG HTML specification:
   * http://www.whatwg.org/specs/web-apps/current-work/
   */
 
-[scriptable, uuid(64aeda0b-e9b5-4868-a4f9-e4776e32e733)]
+[uuid(64aeda0b-e9b5-4868-a4f9-e4776e32e733)]
 interface nsIDOMHTMLInputElement : nsISupports
 {
            attribute DOMString             accept;
            attribute DOMString             alt;
 
            attribute DOMString             autocomplete;
            attribute boolean               autofocus;
            attribute boolean               defaultChecked;
--- a/dom/interfaces/html/nsIDOMHTMLLIElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLLIElement.idl
@@ -11,14 +11,14 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(17bd5c1c-3746-4268-a9f6-45018025f09c)]
+[uuid(17bd5c1c-3746-4268-a9f6-45018025f09c)]
 interface nsIDOMHTMLLIElement : nsISupports
 {
            attribute DOMString           type;
            attribute long                value;
 };
--- a/dom/interfaces/html/nsIDOMHTMLLabelElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLLabelElement.idl
@@ -11,15 +11,15 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(efc0eaf2-5756-4388-a229-fbec2033529d)]
+[uuid(efc0eaf2-5756-4388-a229-fbec2033529d)]
 interface nsIDOMHTMLLabelElement : nsISupports
 {
   readonly attribute nsIDOMHTMLFormElement form;
            attribute DOMString             htmlFor;
   readonly attribute nsIDOMHTMLElement     control;
 };
--- a/dom/interfaces/html/nsIDOMHTMLLinkElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLLinkElement.idl
@@ -11,17 +11,17 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(95d6ec66-2754-45bd-a068-49ac1fb45004)]
+[uuid(95d6ec66-2754-45bd-a068-49ac1fb45004)]
 interface nsIDOMHTMLLinkElement : nsISupports
 {
            [binaryname(MozDisabled)]
            attribute boolean          disabled;
            attribute DOMString        charset;
            attribute DOMString        href;
            attribute DOMString        hreflang;
            attribute DOMString        media;
--- a/dom/interfaces/html/nsIDOMHTMLMapElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLMapElement.idl
@@ -11,14 +11,14 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(3f49f8c6-2e9d-4323-b30c-2404d5ff1f57)]
+[uuid(3f49f8c6-2e9d-4323-b30c-2404d5ff1f57)]
 interface nsIDOMHTMLMapElement : nsISupports
 {
   readonly attribute nsIDOMHTMLCollection areas;
            attribute DOMString            name;
 };
--- a/dom/interfaces/html/nsIDOMHTMLMediaElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLMediaElement.idl
@@ -22,17 +22,17 @@ interface nsIDOMMediaStream;
 
 // undef the GetCurrentTime macro defined in WinBase.h from the MS Platform SDK
 %{C++
 #ifdef GetCurrentTime
 #undef GetCurrentTime
 #endif
 %}
 
-[scriptable, uuid(1f9393e8-2df0-4072-87b9-c26999b09acc)]
+[uuid(1f9393e8-2df0-4072-87b9-c26999b09acc)]
 interface nsIDOMHTMLMediaElement : nsISupports
 {
   // error state
   readonly attribute nsIDOMMediaError error;
 
   // network state
            attribute DOMString src;
            attribute nsIDOMMediaStream mozSrcObject;
--- a/dom/interfaces/html/nsIDOMHTMLMenuElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLMenuElement.idl
@@ -11,16 +11,16 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(a1ca9af6-f865-4fdf-901d-5858bb0ad5ea)]
+[uuid(a1ca9af6-f865-4fdf-901d-5858bb0ad5ea)]
 interface nsIDOMHTMLMenuElement : nsISupports
 {
            attribute boolean          compact;
 
            attribute DOMString        type;
            attribute DOMString        label;
 };
--- a/dom/interfaces/html/nsIDOMHTMLMenuItemElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLMenuItemElement.idl
@@ -5,17 +5,17 @@
 
 #include "nsIDOMHTMLElement.idl"
 
 /**
  * The nsIDOMHTMLMenuItemElement interface is the interface to a HTML
  * <menuitem> element.
  */
 
-[scriptable, uuid(979d6e44-5930-4232-b405-873939655c19)]
+[uuid(979d6e44-5930-4232-b405-873939655c19)]
 interface nsIDOMHTMLMenuItemElement : nsISupports
 {
            attribute DOMString        type;
            attribute DOMString        label;
            attribute DOMString        icon;
            attribute boolean          disabled;
 
            // This should be 'default' but in the IDL implementation
--- a/dom/interfaces/html/nsIDOMHTMLMetaElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLMetaElement.idl
@@ -11,16 +11,16 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(2a3f789e-0667-464f-a8d7-6f58513443d9)]
+[uuid(2a3f789e-0667-464f-a8d7-6f58513443d9)]
 interface nsIDOMHTMLMetaElement : nsISupports
 {
            attribute DOMString        content;
            attribute DOMString        httpEquiv;
            attribute DOMString        name;
            attribute DOMString        scheme;
 };
--- a/dom/interfaces/html/nsIDOMHTMLOListElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLOListElement.idl
@@ -11,16 +11,16 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(d899642a-53e2-4eb4-9d65-4a666a45ee01)]
+[uuid(d899642a-53e2-4eb4-9d65-4a666a45ee01)]
 interface nsIDOMHTMLOListElement : nsISupports
 {
            attribute boolean          compact;
            attribute boolean          reversed;
            attribute long             start;
            attribute DOMString        type;
 };
--- a/dom/interfaces/html/nsIDOMHTMLObjectElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLObjectElement.idl
@@ -13,17 +13,17 @@
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
 interface nsIDOMValidityState;
 
-[scriptable, uuid(baf443d2-da5d-40c9-be3c-c65a69a25250)]
+[uuid(baf443d2-da5d-40c9-be3c-c65a69a25250)]
 interface nsIDOMHTMLObjectElement : nsISupports
 {
   readonly attribute nsIDOMHTMLFormElement form;
            attribute DOMString             code;
            attribute DOMString             align;
            attribute DOMString             archive;
            attribute DOMString             border;
            attribute DOMString             codeBase;
--- a/dom/interfaces/html/nsIDOMHTMLOptGroupElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLOptGroupElement.idl
@@ -11,14 +11,14 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(6fa79f99-4ce4-4634-840a-867fcfb32dba)]
+[uuid(6fa79f99-4ce4-4634-840a-867fcfb32dba)]
 interface nsIDOMHTMLOptGroupElement : nsISupports
 {
            attribute boolean          disabled;
            attribute DOMString        label;
 };
--- a/dom/interfaces/html/nsIDOMHTMLOptionElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLOptionElement.idl
@@ -11,17 +11,17 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(c2b3e9ff-6b36-4158-ace3-05a9c5b8e1c1)]
+[uuid(c2b3e9ff-6b36-4158-ace3-05a9c5b8e1c1)]
 interface nsIDOMHTMLOptionElement : nsISupports
 {
            attribute boolean               disabled;
   readonly attribute nsIDOMHTMLFormElement form;
            attribute DOMString             label;
            attribute boolean               defaultSelected;
            attribute boolean               selected;
            attribute DOMString             value;
--- a/dom/interfaces/html/nsIDOMHTMLOptionsCollection.idl
+++ b/dom/interfaces/html/nsIDOMHTMLOptionsCollection.idl
@@ -16,17 +16,17 @@ interface nsIDOMHTMLSelectElement;
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
 // Introduced in DOM Level 2:
-[scriptable, uuid(4173cc53-30f6-4d12-a770-981ba53164e2)]
+[uuid(4173cc53-30f6-4d12-a770-981ba53164e2)]
 interface nsIDOMHTMLOptionsCollection : nsISupports
 {
            attribute unsigned long   length;
                                         // raises(DOMException) on setting
 
   // FIXME item should just be inherited from nsIDOMHTMLCollection
   nsIDOMNode         item(in unsigned long index);
 
--- a/dom/interfaces/html/nsIDOMHTMLParagraphElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLParagraphElement.idl
@@ -11,13 +11,13 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(b494e517-2388-4a63-80e7-2f73be3c38a3)]
+[uuid(b494e517-2388-4a63-80e7-2f73be3c38a3)]
 interface nsIDOMHTMLParagraphElement : nsISupports
 {
            attribute DOMString        align;
 };
--- a/dom/interfaces/html/nsIDOMHTMLPreElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLPreElement.idl
@@ -11,13 +11,13 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(a2441b77-ad22-4275-b1dd-1b58c044fd04)]
+[uuid(a2441b77-ad22-4275-b1dd-1b58c044fd04)]
 interface nsIDOMHTMLPreElement : nsISupports
 {
            attribute long             width;
 };
--- a/dom/interfaces/html/nsIDOMHTMLQuoteElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLQuoteElement.idl
@@ -11,13 +11,13 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(f02502b5-32a6-4df7-8a57-1416553a3188)]
+[uuid(f02502b5-32a6-4df7-8a57-1416553a3188)]
 interface nsIDOMHTMLQuoteElement : nsISupports
 {
            attribute DOMString        cite;
 };
--- a/dom/interfaces/html/nsIDOMHTMLScriptElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLScriptElement.idl
@@ -11,17 +11,17 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(4627336e-3070-4e73-8f67-3851b54cc0eb)]
+[uuid(4627336e-3070-4e73-8f67-3851b54cc0eb)]
 interface nsIDOMHTMLScriptElement : nsISupports
 {
            attribute DOMString        src;
            attribute boolean          async;
            attribute boolean          defer;
            attribute DOMString        type;
            attribute DOMString        charset;
            attribute DOMString        text;
--- a/dom/interfaces/html/nsIDOMHTMLSelectElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLSelectElement.idl
@@ -14,17 +14,17 @@
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
 interface nsIDOMValidityState;
 
-[scriptable, uuid(d8914a2d-3556-4b66-911c-a84c4394e7fa)]
+[uuid(d8914a2d-3556-4b66-911c-a84c4394e7fa)]
 interface nsIDOMHTMLSelectElement : nsISupports
 {
            attribute boolean                     autofocus;
            attribute boolean                     disabled;
   readonly attribute nsIDOMHTMLFormElement       form;
            attribute boolean                     multiple;
            attribute DOMString                   name;
            attribute unsigned long               size;
--- a/dom/interfaces/html/nsIDOMHTMLSourceElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLSourceElement.idl
@@ -11,15 +11,15 @@
  * <source> element.
  *
  * For more information on this interface, please see
  * http://www.whatwg.org/specs/web-apps/current-work/#source
  *
  * @status UNDER_DEVELOPMENT
  */
 
-[scriptable, uuid(7adbaf06-572d-4c99-bd59-ac673ddcca93)]
+[uuid(7adbaf06-572d-4c99-bd59-ac673ddcca93)]
 interface nsIDOMHTMLSourceElement : nsISupports
 {
            attribute DOMString src;
            attribute DOMString type;
            attribute DOMString media;
 };
--- a/dom/interfaces/html/nsIDOMHTMLStyleElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLStyleElement.idl
@@ -11,17 +11,17 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(fa326d22-8739-4eef-a80e-6449bde605d2)]
+[uuid(fa326d22-8739-4eef-a80e-6449bde605d2)]
 interface nsIDOMHTMLStyleElement : nsISupports
 {
            [binaryname(MozDisabled)]
            attribute boolean          disabled;
            attribute DOMString        media;
            attribute DOMString        type;
            attribute boolean          scoped;
 };
--- a/dom/interfaces/html/nsIDOMHTMLTableCaptionElem.idl
+++ b/dom/interfaces/html/nsIDOMHTMLTableCaptionElem.idl
@@ -11,13 +11,13 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, builtinclass, uuid(78f0635b-44d2-4d5c-87de-29d54df6aed6)]
+[builtinclass, uuid(78f0635b-44d2-4d5c-87de-29d54df6aed6)]
 interface nsIDOMHTMLTableCaptionElement : nsISupports
 {
            attribute DOMString        align;
 };
--- a/dom/interfaces/html/nsIDOMHTMLTableCellElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLTableCellElement.idl
@@ -11,17 +11,17 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(3203c36f-33fd-4628-8c88-77e82d38df1e)]
+[uuid(3203c36f-33fd-4628-8c88-77e82d38df1e)]
 interface nsIDOMHTMLTableCellElement : nsISupports
 {
   readonly attribute long             cellIndex;
            attribute DOMString        abbr;
            attribute DOMString        align;
            attribute DOMString        axis;
            attribute DOMString        bgColor;
            attribute DOMString        ch;
--- a/dom/interfaces/html/nsIDOMHTMLTableElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLTableElement.idl
@@ -11,12 +11,12 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(135a30ee-0374-4ee7-9d36-91736bff5fb1)]
+[uuid(135a30ee-0374-4ee7-9d36-91736bff5fb1)]
 interface nsIDOMHTMLTableElement : nsISupports
 {
 };
--- a/dom/interfaces/html/nsIDOMHTMLTextAreaElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLTextAreaElement.idl
@@ -14,17 +14,17 @@ interface nsIDOMValidityState;
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(7a4aeb2e-fcf3-443e-b002-ca1c8ea322e9)]
+[uuid(7a4aeb2e-fcf3-443e-b002-ca1c8ea322e9)]
 interface nsIDOMHTMLTextAreaElement : nsISupports
 {
            attribute boolean               autofocus;
            attribute unsigned long         cols;
            attribute boolean               disabled;
   readonly attribute nsIDOMHTMLFormElement form;
            attribute long                  maxLength;
            attribute DOMString             name;
--- a/dom/interfaces/html/nsIDOMHTMLTitleElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLTitleElement.idl
@@ -11,13 +11,13 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(e8e5168a-e12e-4946-9fa7-5fe0d6932198)]
+[uuid(e8e5168a-e12e-4946-9fa7-5fe0d6932198)]
 interface nsIDOMHTMLTitleElement : nsISupports
 {
            attribute DOMString        text;
 };
--- a/dom/interfaces/html/nsIDOMHTMLUListElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLUListElement.idl
@@ -11,14 +11,14 @@
  *
  * This interface is trying to follow the DOM Level 2 HTML specification:
  * http://www.w3.org/TR/DOM-Level-2-HTML/
  *
  * with changes from the work-in-progress WHATWG HTML specification:
  * http://www.whatwg.org/specs/web-apps/current-work/
  */
 
-[scriptable, uuid(8ba1ee8d-36a4-43fc-9148-5144c2a29c96)]
+[uuid(8ba1ee8d-36a4-43fc-9148-5144c2a29c96)]
 interface nsIDOMHTMLUListElement : nsISupports
 {
            attribute boolean          compact;
            attribute DOMString        type;
 };
--- a/dom/interfaces/html/nsIDOMHTMLVideoElement.idl
+++ b/dom/interfaces/html/nsIDOMHTMLVideoElement.idl
@@ -11,17 +11,17 @@
  * <video> element.
  *
  * For more information on this interface, please see
  * http://www.whatwg.org/specs/web-apps/current-work/#video
  *
  * @status UNDER_DEVELOPMENT
  */
 
-[scriptable, uuid(185a3e8f-56a7-4bda-8dc7-2cff6ed07d1d)]
+[uuid(185a3e8f-56a7-4bda-8dc7-2cff6ed07d1d)]
 interface nsIDOMHTMLVideoElement : nsIDOMHTMLMediaElement
 {
            attribute long width; 
            attribute long height;
   readonly attribute unsigned long videoWidth;
   readonly attribute unsigned long videoHeight;
            attribute DOMString poster;
            
--- a/dom/interfaces/html/nsIDOMMediaError.idl
+++ b/dom/interfaces/html/nsIDOMMediaError.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* 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/. */
 #include "domstubs.idl"
 
-[scriptable, uuid(7bd8c29f-8a76-453f-9373-79f820f2dc01)]
+[uuid(7bd8c29f-8a76-453f-9373-79f820f2dc01)]
 interface nsIDOMMediaError : nsISupports
 {
   /* The download of the media resource was aborted by
      the user agent at the user's requet */
   const unsigned short MEDIA_ERR_ABORTED = 1;
 
   /* A network error of some description caused the 
      user agent to stop downloading the media resource */
--- a/dom/interfaces/html/nsIDOMTimeRanges.idl
+++ b/dom/interfaces/html/nsIDOMTimeRanges.idl
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* 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/. */
 #include "domstubs.idl"
 
-[scriptable, uuid(c43448db-0bab-461d-b648-1ca14a967f7e)]
+[uuid(c43448db-0bab-461d-b648-1ca14a967f7e)]
 interface nsIDOMTimeRanges : nsISupports
 {
   /* The number of ranges represented by the time range object */
   readonly attribute unsigned long length;
 
   /* The position of the start of the index'd range, in seconds measured
      from the start of the timeline that this object represents */
   double start(in unsigned long index);
--- a/dom/interfaces/html/nsIDOMValidityState.idl
+++ b/dom/interfaces/html/nsIDOMValidityState.idl
@@ -8,17 +8,17 @@
 /**
  * The nsIDOMValidityState interface is the interface to a ValidityState
  * object which represents the validity states of an element.
  *
  * For more information on this interface please see
  * http://www.whatwg.org/specs/web-apps/current-work/#validitystate
  */
 
-[scriptable, uuid(00bed276-f1f7-492f-a039-dbd9b9efc10b)]
+[uuid(00bed276-f1f7-492f-a039-dbd9b9efc10b)]
 interface nsIDOMValidityState : nsISupports
 {
   readonly attribute boolean valueMissing;
   readonly attribute boolean typeMismatch;
   readonly attribute boolean patternMismatch;
   readonly attribute boolean tooLong;
   readonly attribute boolean rangeUnderflow;
   readonly attribute boolean rangeOverflow;
--- a/dom/interfaces/offline/nsIDOMOfflineResourceList.idl
+++ b/dom/interfaces/offline/nsIDOMOfflineResourceList.idl
@@ -1,16 +1,16 @@
 /* -*- 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/. */
 
 #include "domstubs.idl"
 
-[scriptable, uuid(6044702d-e4a9-420c-b711-558b7d6a3b9f)]
+[uuid(6044702d-e4a9-420c-b711-558b7d6a3b9f)]
 interface nsIDOMOfflineResourceList : nsISupports
 {
   /**
    * Get the list of dynamically-managed entries.
    */
   readonly attribute nsISupports mozItems;
 
   /**
--- a/dom/interfaces/range/nsIDOMRange.idl
+++ b/dom/interfaces/range/nsIDOMRange.idl
@@ -7,17 +7,17 @@
 
 /**
  * The nsIDOMRange interface is an interface to a DOM range object.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Traversal-Range/
  */
 
-[scriptable, builtinclass, uuid(1f94055c-42e7-4a30-96a1-6a804f1c2d1e)]
+[builtinclass, uuid(1f94055c-42e7-4a30-96a1-6a804f1c2d1e)]
 interface nsIDOMRange : nsISupports
 {
   readonly attribute nsIDOMNode       startContainer;
   readonly attribute long             startOffset;
   readonly attribute nsIDOMNode       endContainer;
   readonly attribute long             endOffset;
   readonly attribute boolean          collapsed;
   readonly attribute nsIDOMNode       commonAncestorContainer;
--- a/dom/interfaces/settings/nsIDOMMozSettingsEvent.idl
+++ b/dom/interfaces/settings/nsIDOMMozSettingsEvent.idl
@@ -1,16 +1,16 @@
 /* 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/. */
 
 #include "nsIDOMEvent.idl"
 interface nsIVariant;
 
-[scriptable, builtinclass, uuid(d5081bf4-6a63-4ee6-8ce6-f488082dc08f)]
+[builtinclass, uuid(d5081bf4-6a63-4ee6-8ce6-f488082dc08f)]
 interface nsIDOMMozSettingsEvent : nsIDOMEvent
 {
   readonly attribute DOMString  settingName;
   readonly attribute nsIVariant settingValue;
 
   [noscript] void initMozSettingsEvent(in DOMString aType,
                                        in boolean aCanBubble,
                                        in boolean aCancelable,
--- a/dom/interfaces/smil/nsIDOMTimeEvent.idl
+++ b/dom/interfaces/smil/nsIDOMTimeEvent.idl
@@ -8,17 +8,17 @@
 /**
  * The SMIL TimeEvent interface.
  *
  * For more information please refer to:
  * http://www.w3.org/TR/SMIL/smil-timing.html#Events-TimeEvent
  * http://www.w3.org/TR/SVG/animate.html#InterfaceTimeEvent
  */
 
-[scriptable, builtinclass, uuid(4a5a5fa6-2783-4171-b8bb-cae4ab06e6ff)]
+[builtinclass, uuid(4a5a5fa6-2783-4171-b8bb-cae4ab06e6ff)]
 interface nsIDOMTimeEvent : nsIDOMEvent
 {
   readonly attribute long detail;
   readonly attribute nsIDOMWindow view;
   
   void initTimeEvent(in DOMString typeArg,
                      in nsIDOMWindow viewArg,
                      in long detailArg);
--- a/dom/interfaces/storage/nsIDOMStorageEvent.idl
+++ b/dom/interfaces/storage/nsIDOMStorageEvent.idl
@@ -11,17 +11,17 @@
  * http://dev.w3.org/html5/webstorage/#the-storage-event
  * for more information.
  *
  * Event sent to a window when a storage area changes.
  */
 
 interface nsIDOMStorage;
 
-[scriptable, builtinclass, uuid(85f04275-4679-4e89-b43f-142bbbab1e89)]
+[builtinclass, uuid(85f04275-4679-4e89-b43f-142bbbab1e89)]
 interface nsIDOMStorageEvent : nsIDOMEvent
 {
   /**
    * Attribute represents the key being changed. The key attribute is null
    * when change has been invoked by the storage clear() method.
    */
   readonly attribute DOMString key;
 
--- a/dom/interfaces/stylesheets/nsIDOMMediaList.idl
+++ b/dom/interfaces/stylesheets/nsIDOMMediaList.idl
@@ -8,17 +8,17 @@
 /**
  * The nsIDOMMediaList interface is a datatype for a list of media
  * types in the Document Object Model.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Style
  */
 
-[scriptable, uuid(9b0c2ed7-111c-4824-adf9-ef0da6dad371)]
+[uuid(9b0c2ed7-111c-4824-adf9-ef0da6dad371)]
 interface nsIDOMMediaList : nsISupports
 {
            attribute DOMString        mediaText;
                                         // raises(DOMException) on setting
 
   readonly attribute unsigned long    length;
   DOMString          item(in unsigned long index);
   void               deleteMedium(in DOMString oldMedium)
--- a/dom/interfaces/stylesheets/nsIDOMStyleSheet.idl
+++ b/dom/interfaces/stylesheets/nsIDOMStyleSheet.idl
@@ -8,17 +8,17 @@
 /**
  * The nsIDOMStyleSheet interface is a datatype for a style sheet in
  * the Document Object Model.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Style
  */
 
-[scriptable, uuid(a6cf9080-15b3-11d2-932e-00805f8add32)]
+[uuid(a6cf9080-15b3-11d2-932e-00805f8add32)]
 interface nsIDOMStyleSheet : nsISupports
 {
   readonly attribute DOMString        type;
            attribute boolean          disabled;
   readonly attribute nsIDOMNode       ownerNode;
   readonly attribute nsIDOMStyleSheet parentStyleSheet;
   readonly attribute DOMString        href;
   readonly attribute DOMString        title;
--- a/dom/interfaces/stylesheets/nsIDOMStyleSheetList.idl
+++ b/dom/interfaces/stylesheets/nsIDOMStyleSheetList.idl
@@ -8,15 +8,15 @@
 /**
  * The nsIDOMStyleSheetList interface is a datatype for a style sheet
  * list in the Document Object Model.
  *
  * For more information on this interface please see
  * http://www.w3.org/TR/DOM-Level-2-Style
  */
 
-[scriptable, uuid(0e424250-ac2a-4fe2-bccd-a45824af090e)]
+[uuid(0e424250-ac2a-4fe2-bccd-a45824af090e)]
 interface nsIDOMStyleSheetList : nsISupports
 {
   readonly attribute unsigned long    length;
   [binaryname(SlowItem)]
   nsIDOMStyleSheet         item(in unsigned long index);
 };
--- a/dom/interfaces/svg/nsIDOMSVGElement.idl
+++ b/dom/interfaces/svg/nsIDOMSVGElement.idl
@@ -4,17 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsIDOMElement.idl"
 
 interface nsIDOMCSSStyleDeclaration;
 interface nsIDOMCSSValue;
 
 
-[scriptable, uuid(abdf347a-0063-42cc-b6fc-c9a19a65248e)]
+[uuid(abdf347a-0063-42cc-b6fc-c9a19a65248e)]
 interface nsIDOMSVGElement : nsIDOMElement
 {
   attribute DOMString id;
             // raises DOMException on setting
   readonly attribute nsIDOMSVGElement    ownerSVGElement;
   readonly attribute nsIDOMSVGElement    viewportElement;
 
   readonly attribute nsISupports   className;
--- a/dom/interfaces/svg/nsIDOMSVGLength.idl
+++ b/dom/interfaces/svg/nsIDOMSVGLength.idl
@@ -1,16 +1,16 @@
 /* -*- 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/. */
 
 #include "domstubs.idl"
 
-[scriptable, uuid(2596325c-aed0-487e-96a1-0a6d589b9c6b)]
+[uuid(2596325c-aed0-487e-96a1-0a6d589b9c6b)]
 interface nsIDOMSVGLength : nsISupports
 { 
   // Length Unit Types
   const unsigned short SVG_LENGTHTYPE_UNKNOWN    = 0;
   const unsigned short SVG_LENGTHTYPE_NUMBER     = 1;
   const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2;
   const unsigned short SVG_LENGTHTYPE_EMS        = 3;
   const unsigned short SVG_LENGTHTYPE_EXS        = 4;
--- a/dom/interfaces/traversal/nsIDOMNodeIterator.idl
+++ b/dom/interfaces/traversal/nsIDOMNodeIterator.idl
@@ -3,17 +3,17 @@
  * 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/. */
 
 #include "domstubs.idl"
 
 interface nsIDOMNodeFilter;
 
-[scriptable, uuid(a86bdac9-ff89-4c94-8160-4fe86733bab8)]
+[uuid(a86bdac9-ff89-4c94-8160-4fe86733bab8)]
 // Introduced in DOM Level 2, updated to DOM Level 4:
 interface nsIDOMNodeIterator : nsISupports
 {
   readonly attribute nsIDOMNode       root;
   readonly attribute unsigned long    whatToShow;
   readonly attribute nsIDOMNodeFilter filter;
   nsIDOMNode         nextNode()
                                         raises(DOMException);
--- a/dom/interfaces/traversal/nsIDOMTreeWalker.idl
+++ b/dom/interfaces/traversal/nsIDOMTreeWalker.idl
@@ -3,17 +3,17 @@
  * 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/. */
 
 #include "domstubs.idl"
 
 interface nsIDOMNodeFilter;
 
-[scriptable, uuid(c4ffa159-237c-4dde-b0ba-20b9f9270cf6)]
+[uuid(c4ffa159-237c-4dde-b0ba-20b9f9270cf6)]
 // Introduced in DOM Level 2:
 interface nsIDOMTreeWalker : nsISupports {
   readonly attribute nsIDOMNode       root;
   readonly attribute unsigned long    whatToShow;
   readonly attribute nsIDOMNodeFilter filter;
            attribute nsIDOMNode       currentNode;
                                         // raises(DOMException) on setting
 
--- a/dom/interfaces/xbl/nsIDOMDocumentXBL.idl
+++ b/dom/interfaces/xbl/nsIDOMDocumentXBL.idl
@@ -1,16 +1,16 @@
 /* -*- 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/. */
 
 #include "domstubs.idl"
 
-[scriptable, uuid(af628000-e3fa-40d2-9118-fbaa9f3ec6b9)]
+[uuid(af628000-e3fa-40d2-9118-fbaa9f3ec6b9)]
 interface nsIDOMDocumentXBL : nsISupports
 {
   /**
    * See the MDC documentation for what these methods do.
    */
   nsIDOMNodeList        getAnonymousNodes(in nsIDOMElement elt);
   nsIDOMElement         getAnonymousElementByAttribute(in nsIDOMElement elt,
                                                        in DOMString attrName,
--- a/dom/interfaces/xpath/nsIDOMXPathEvaluator.idl
+++ b/dom/interfaces/xpath/nsIDOMXPathEvaluator.idl
@@ -9,17 +9,17 @@
 
 #include "domstubs.idl"
 
 interface nsIDOMXPathNSResolver;
 interface nsIDOMXPathResult;
 interface nsIDOMXPathExpression;
 interface XPathException;
 
-[scriptable, uuid(75506f8a-b504-11d5-a7f2-ca108ab8b6fc)]
+[uuid(75506f8a-b504-11d5-a7f2-ca108ab8b6fc)]
 interface nsIDOMXPathEvaluator : nsISupports
 {
   nsIDOMXPathExpression    createExpression(in DOMString expression, 
                                             in nsIDOMXPathNSResolver resolver)
                                       raises(XPathException,
                                              DOMException);
   nsIDOMXPathNSResolver    createNSResolver(in nsIDOMNode nodeResolver);
   nsISupports              evaluate(in DOMString expression, 
--- a/dom/interfaces/xul/nsIDOMXULCommandEvent.idl
+++ b/dom/interfaces/xul/nsIDOMXULCommandEvent.idl
@@ -6,17 +6,17 @@
 
 /**
  * This interface is supported by command events, which are dispatched to
  * XUL elements as a result of mouse or keyboard activation.
  */
 
 #include "nsIDOMUIEvent.idl"
 
-[scriptable, builtinclass, uuid(2d5b6e19-74bb-40af-9aac-59a1e53e3fcc)]
+[builtinclass, uuid(2d5b6e19-74bb-40af-9aac-59a1e53e3fcc)]
 interface nsIDOMXULCommandEvent : nsIDOMUIEvent
 {
   /**
    * Command events support the same set of modifier keys as mouse and key
    * events.
    */
   readonly attribute boolean ctrlKey;
   readonly attribute boolean shiftKey;
--- a/dom/interfaces/xul/nsIDOMXULDocument.idl
+++ b/dom/interfaces/xul/nsIDOMXULDocument.idl
@@ -5,17 +5,17 @@
 
 #include "domstubs.idl"
 #include "nsIDOMDocument.idl"
 
 interface nsIDOMXULCommandDispatcher;
 interface nsIObserver;
 interface nsIBoxObject;
 
-[scriptable, uuid(efdb94fb-642f-4a79-ae20-9a5f7cb7f736)]
+[uuid(efdb94fb-642f-4a79-ae20-9a5f7cb7f736)]
 interface nsIDOMXULDocument : nsIDOMDocument
 {
   attribute nsIDOMNode                          popupNode;
 
   /**
    * These attributes correspond to trustedGetPopupNode().rangeOffset and
    * rangeParent. They will help you find where in the DOM the popup is
    * happening. Can be accessed from chrome only, and only during a popup
--- a/dom/interfaces/xul/nsIDOMXULElement.idl
+++ b/dom/interfaces/xul/nsIDOMXULElement.idl
@@ -7,17 +7,17 @@
 
 interface nsIRDFCompositeDataSource;
 interface nsIXULTemplateBuilder;
 interface nsIRDFResource;
 interface nsIControllers;
 interface nsIBoxObject;
 
 
-[scriptable, uuid(e89578c8-64ec-4047-984a-cce1b1735543)]
+[uuid(e89578c8-64ec-4047-984a-cce1b1735543)]
 interface nsIDOMXULElement : nsIDOMElement
 {
   attribute DOMString                 className;
 
   // Layout properties
   attribute DOMString align;
   attribute DOMString dir;
   attribute DOMString flex;
--- a/dom/media/nsIDOMMediaStream.idl
+++ b/dom/media/nsIDOMMediaStream.idl
@@ -7,21 +7,21 @@
 
 // undef the GetCurrentTime macro defined in WinBase.h from the MS Platform SDK
 %{C++
 #ifdef GetCurrentTime
 #undef GetCurrentTime
 #endif
 %}
 
-[scriptable, builtinclass, uuid(3ef760bb-ff19-4dbb-b552-af27ab84b9b8)]
+[builtinclass, uuid(3ef760bb-ff19-4dbb-b552-af27ab84b9b8)]
 interface nsIDOMMediaStream : nsISupports
 {
   /* Placeholder interface only; will be removed after further WebIDL conversion.
      Do not add anything here. */
 };
 
-[scriptable, builtinclass, uuid(dd37150a-9823-4605-ac4c-3516629a8aaf)]
+[builtinclass, uuid(dd37150a-9823-4605-ac4c-3516629a8aaf)]
 interface nsIDOMLocalMediaStream : nsIDOMMediaStream
 {
   /* Placeholder interface only; will be removed after further WebIDL conversion.
      Do not add anything here. */
 };
--- a/dom/mobilemessage/interfaces/nsIDOMMozMmsEvent.idl
+++ b/dom/mobilemessage/interfaces/nsIDOMMozMmsEvent.idl
@@ -1,17 +1,17 @@
 /* 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/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIDOMMozMmsMessage;
 
-[scriptable, builtinclass, uuid(b33cc0f2-8886-11e2-9433-eff9a8af9a70)]
+[builtinclass, uuid(b33cc0f2-8886-11e2-9433-eff9a8af9a70)]
 interface nsIDOMMozMmsEvent : nsIDOMEvent
 {
   readonly attribute nsIDOMMozMmsMessage message;
 
   [noscript] void initMozMmsEvent(in DOMString aType,
                                   in boolean aCanBubble,
                                   in boolean aCancelable,
                                   in nsIDOMMozMmsMessage aMessage);
--- a/dom/mobilemessage/interfaces/nsIDOMMozSmsEvent.idl
+++ b/dom/mobilemessage/interfaces/nsIDOMMozSmsEvent.idl
@@ -1,17 +1,17 @@
 /* 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/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIDOMMozSmsMessage;
 
-[scriptable, builtinclass, uuid(f12f9208-0abd-4d95-9a27-93a74b5e47a2)]
+[builtinclass, uuid(f12f9208-0abd-4d95-9a27-93a74b5e47a2)]
 interface nsIDOMMozSmsEvent : nsIDOMEvent
 {
   readonly attribute nsIDOMMozSmsMessage message;
 
   [noscript] void initMozSmsEvent(in DOMString aType,
                                   in boolean aCanBubble,
                                   in boolean aCancelable,
                                   in nsIDOMMozSmsMessage aMessage);
--- a/dom/voicemail/nsIDOMMozVoicemailEvent.idl
+++ b/dom/voicemail/nsIDOMMozVoicemailEvent.idl
@@ -3,17 +3,17 @@
 /* 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/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIDOMMozVoicemailStatus;
 
-[scriptable, builtinclass, uuid(63e42e5f-0742-4c8f-bd52-938a7e03d2c9)]
+[builtinclass, uuid(63e42e5f-0742-4c8f-bd52-938a7e03d2c9)]
 interface nsIDOMMozVoicemailEvent : nsIDOMEvent
 {
   /**
    * The voicemail status that caused this event to fire
    */
   readonly attribute nsIDOMMozVoicemailStatus status;
 
   [noscript] void initMozVoicemailEvent(in DOMString aType,
--- a/dom/wifi/nsIDOMMozWifiConnectionInfoEvent.idl
+++ b/dom/wifi/nsIDOMMozWifiConnectionInfoEvent.idl
@@ -1,17 +1,17 @@
 /* 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/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIVariant;
 
-[scriptable, builtinclass, uuid(627b2102-9605-40e0-a5bf-6d3ac672b328)]
+[builtinclass, uuid(627b2102-9605-40e0-a5bf-6d3ac672b328)]
 interface nsIDOMMozWifiConnectionInfoEvent : nsIDOMEvent
 {
     /**
      * Network object with an SSID field.
      */
     readonly attribute nsIVariant network;
 
     /**
--- a/dom/wifi/nsIDOMMozWifiP2pStatusChangeEvent.idl
+++ b/dom/wifi/nsIDOMMozWifiP2pStatusChangeEvent.idl
@@ -1,15 +1,15 @@
 /* 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/. */
 
 #include "nsIDOMEvent.idl"
 
-[scriptable, builtinclass, uuid(82cad910-2019-11e3-8224-0800200c9a66)]
+[builtinclass, uuid(82cad910-2019-11e3-8224-0800200c9a66)]
 interface nsIDOMMozWifiP2pStatusChangeEvent : nsIDOMEvent
 {
   /**
    * The mac address of the peer whose status has just changed.
    */
   readonly attribute DOMString peerAddress;
 
   [noscript] void initMozWifiP2pStatusChangeEvent(in DOMString aType,
--- a/dom/wifi/nsIDOMMozWifiStatusChangeEvent.idl
+++ b/dom/wifi/nsIDOMMozWifiStatusChangeEvent.idl
@@ -1,17 +1,17 @@
 /* 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/. */
 
 #include "nsIDOMEvent.idl"
 
 interface nsIVariant;
 
-[scriptable, builtinclass, uuid(251252ba-ed8c-47a0-8979-f7652b4d558a)]
+[builtinclass, uuid(251252ba-ed8c-47a0-8979-f7652b4d558a)]
 interface nsIDOMMozWifiStatusChangeEvent : nsIDOMEvent
 {
     /**
      * Network object with a SSID field describing the network affected by
      * this change. This might be null.
      */
     readonly attribute nsIVariant network;
 
--- a/js/xpconnect/src/XPCComponents.cpp
+++ b/js/xpconnect/src/XPCComponents.cpp
@@ -21,16 +21,18 @@
 #include "mozilla/dom/DOMException.h"
 #include "mozilla/dom/DOMExceptionBinding.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/StructuredCloneTags.h"
 #include "nsZipArchive.h"
 #include "nsIDOMFile.h"
 #include "nsIDOMFileList.h"
 #include "nsWindowMemoryReporter.h"
+#include "nsDOMClassInfo.h"
+#include "ShimInterfaceInfo.h"
 
 using namespace mozilla;
 using namespace JS;
 using namespace js;
 using namespace xpc;
 using mozilla::dom::Exception;
 
 /***************************************************************************/
@@ -298,19 +300,22 @@ nsXPCComponents_Interfaces::NewResolve(n
     if (!JSID_IS_STRING(id))
         return NS_OK;
 
     JSAutoByteString name;
     RootedString str(cx, JSID_TO_STRING(id));
 
     // we only allow interfaces by name here
     if (name.encodeLatin1(cx, str) && name.ptr()[0] != '{') {
-        nsCOMPtr<nsIInterfaceInfo> info;
-        XPTInterfaceInfoManager::GetSingleton()->
-            GetInfoForName(name.ptr(), getter_AddRefs(info));
+        nsCOMPtr<nsIInterfaceInfo> info =
+            ShimInterfaceInfo::MaybeConstruct(name.ptr(), cx);
+        if (!info) {
+            XPTInterfaceInfoManager::GetSingleton()->
+                GetInfoForName(name.ptr(), getter_AddRefs(info));
+        }
         if (!info)
             return NS_OK;
 
         nsCOMPtr<nsIJSIID> nsid = nsJSIID::NewID(info);
 
         if (nsid) {
             nsXPConnect* xpc = nsXPConnect::XPConnect();
             nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
--- a/js/xpconnect/src/XPCJSID.cpp
+++ b/js/xpconnect/src/XPCJSID.cpp
@@ -387,20 +387,17 @@ nsJSIID::NewResolve(nsIXPConnectWrappedN
                     bool *_retval)
 {
     RootedObject obj(cx, objArg);
     RootedId id(cx, idArg);
     XPCCallContext ccx(JS_CALLER, cx);
 
     AutoMarkingNativeInterfacePtr iface(ccx);
 
-    const nsIID* iid;
-    mInfo->GetIIDShared(&iid);
-
-    iface = XPCNativeInterface::GetNewOrUsed(iid);
+    iface = XPCNativeInterface::GetNewOrUsed(mInfo);
 
     if (!iface)
         return NS_OK;
 
     XPCNativeMember* member = iface->FindMember(id);
     if (member && member->IsConstant()) {
         RootedValue val(cx);
         if (!member->GetConstantValue(ccx, iface, val.address()))
@@ -422,20 +419,17 @@ nsJSIID::Enumerate(nsIXPConnectWrappedNa
 {
     // In this case, let's just eagerly resolve...
 
     RootedObject obj(cx, objArg);
     XPCCallContext ccx(JS_CALLER, cx);
 
     AutoMarkingNativeInterfacePtr iface(ccx);
 
-    const nsIID* iid;
-    mInfo->GetIIDShared(&iid);
-
-    iface = XPCNativeInterface::GetNewOrUsed(iid);
+    iface = XPCNativeInterface::GetNewOrUsed(mInfo);
 
     if (!iface)
         return NS_OK;
 
     uint16_t count = iface->GetMemberCount();
     for (uint16_t i = 0; i < count; i++) {
         XPCNativeMember* member = iface->GetMemberAt(i);
         if (member && member->IsConstant() &&
--- a/js/xpconnect/src/XPCWrappedNativeInfo.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeInfo.cpp
@@ -46,31 +46,20 @@ XPCNativeMember::NewFunctionObject(XPCCa
     return Resolve(ccx, iface, parent, pval);
 }
 
 bool
 XPCNativeMember::Resolve(XPCCallContext& ccx, XPCNativeInterface* iface,
                          HandleObject parent, jsval *vp)
 {
     if (IsConstant()) {
-        const nsXPTConstant* constant;
-        if (NS_FAILED(iface->GetInterfaceInfo()->GetConstant(mIndex, &constant)))
-            return false;
-
-        const nsXPTCMiniVariant& mv = *constant->GetValue();
-
-        // XXX Big Hack!
-        nsXPTCVariant v;
-        v.flags = 0;
-        v.type = constant->GetType();
-        memcpy(&v.val, &mv.val, sizeof(mv.val));
-
         RootedValue resultVal(ccx);
-
-        if (!XPCConvert::NativeData2JS(&resultVal, &v.val, v.type, nullptr, nullptr))
+        nsXPIDLCString name;
+        if (NS_FAILED(iface->GetInterfaceInfo()->GetConstant(mIndex, &resultVal,
+                                                             getter_Copies(name))))
             return false;
 
         *vp = resultVal;
 
         return true;
     }
     // else...
 
@@ -305,23 +294,24 @@ XPCNativeInterface::NewInstance(nsIInter
                 cur->SetReadOnlyAttribute(i);
             else
                 cur->SetMethod(i);
         }
     }
 
     if (!failed) {
         for (i = 0; i < constCount; i++) {
-            const nsXPTConstant* constant;
-            if (NS_FAILED(aInfo->GetConstant(i, &constant))) {
+            RootedValue constant(cx);
+            nsXPIDLCString namestr;
+            if (NS_FAILED(aInfo->GetConstant(i, &constant, getter_Copies(namestr)))) {
                 failed = true;
                 break;
             }
 
-            str = JS_InternString(cx, constant->GetName());
+            str = JS_InternString(cx, namestr);
             if (!str) {
                 NS_ERROR("bad constant name");
                 failed = true;
                 break;
             }
             jsid name = INTERNED_STRING_TO_JSID(cx, str);
 
             // XXX need better way to find dups
--- a/js/xpconnect/src/moz.build
+++ b/js/xpconnect/src/moz.build
@@ -87,14 +87,15 @@ LOCAL_INCLUDES += [
     '/content/html/content/src',
     '/content/html/document/src',
     '/content/svg/content/src',
     '/dom/base',
     '/dom/workers',
     '/js/ipc',
     '/layout/base',
     '/layout/style',
+    '/xpcom/reflect/xptinfo/src',
 ]
 
 if CONFIG['MOZ_B2G_BT']:
     LOCAL_INCLUDES += [
         '/dom/bluetooth',
     ]
--- a/xpcom/reflect/xptinfo/public/nsIInterfaceInfo.idl
+++ b/xpcom/reflect/xptinfo/public/nsIInterfaceInfo.idl
@@ -6,32 +6,30 @@
 /* The nsIInterfaceInfo public declaration. */
 
 
 #include "nsISupports.idl"
 
 // forward declaration of non-XPCOM types
 
 [ptr] native nsXPTMethodInfoPtr(nsXPTMethodInfo);
-[ptr] native nsXPTConstantPtr(nsXPTConstant);
 [ptr] native nsXPTParamInfoPtr(nsXPTParamInfo);
       native nsXPTType(nsXPTType);
 
 // We bend the rules to do a [shared] nsIID (but this is never scriptable)  
 [ptr] native nsIIDPtrShared(nsIID);
 
 %{C++
 class nsXPTMethodInfo;
-class nsXPTConstant;
 class nsXPTParamInfo;
 class nsXPTType;
 %}
 
 /* this is NOT intended to be scriptable */
-[uuid(1affa260-8965-4612-869a-78af4ccfb287)]
+[uuid(3f1ae084-607e-45b2-8f1e-8d450b0f9c65)]
 interface nsIInterfaceInfo : nsISupports
 {
     readonly attribute string   name;
     readonly attribute nsIIDPtr InterfaceIID;
 
     boolean isScriptable();
     boolean isBuiltinClass();
 
@@ -50,18 +48,19 @@ interface nsIInterfaceInfo : nsISupports
     */
     
     void getMethodInfo(in uint16_t index, 
                        [shared, retval] out nsXPTMethodInfoPtr info);
 
     void getMethodInfoForName(in string methodName, out uint16_t index, 
                        [shared, retval] out nsXPTMethodInfoPtr info);
 
-    void getConstant(in uint16_t index, 
-                     [shared, retval] out nsXPTConstantPtr constant);
+    void getConstant(in uint16_t index,
+                     out jsval constant,
+                     out string name);
 
 
     /**
     * Get the interface information or iid associated with a param of some
     * method in this interface.
     */
 
     nsIInterfaceInfo getInfoForParam(in uint16_t methodIndex, 
new file mode 100644
--- /dev/null
+++ b/xpcom/reflect/xptinfo/src/ShimInterfaceInfo.cpp
@@ -0,0 +1,761 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=78:
+ *
+ * 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/. */
+
+#include "ShimInterfaceInfo.h"
+
+#include "nsIDOMAnimationEvent.h"
+#include "nsIDOMAttr.h"
+#include "nsIDOMBeforeUnloadEvent.h"
+#include "nsIDOMCanvasRenderingContext2D.h"
+#include "nsIDOMCDATASection.h"
+#include "nsIDOMCharacterData.h"
+#include "nsIDOMClientRect.h"
+#include "nsIDOMClientRectList.h"
+#include "nsIDOMClipboardEvent.h"
+#include "nsIDOMCloseEvent.h"
+#include "nsIDOMCommandEvent.h"
+#include "nsIDOMComment.h"
+#include "nsIDOMCompositionEvent.h"
+#include "nsIDOMCSSPrimitiveValue.h"
+#include "nsIDOMCSSStyleDeclaration.h"
+#include "nsIDOMCSSStyleSheet.h"
+#include "nsIDOMCSSValue.h"
+#include "nsIDOMCSSValueList.h"
+#include "nsIDOMCustomEvent.h"
+#include "nsIDOMDataContainerEvent.h"
+#include "nsIDOMDataChannel.h"
+#include "nsIDOMDataTransfer.h"
+#include "nsIDOMDeviceOrientationEvent.h"
+#include "nsIDOMDeviceStorage.h"
+#include "nsIDOMDeviceStorageChangeEvent.h"
+#include "nsIDOMDOMCursor.h"
+#include "nsIDOMDOMException.h"
+#include "nsIDOMDOMRequest.h"
+#include "nsIDOMDOMTransactionEvent.h"
+#include "nsIDOMDocument.h"
+#include "nsIDOMDocumentFragment.h"
+#include "nsIDOMDocumentType.h"
+#include "nsIDOMDocumentXBL.h"
+#include "nsIDOMDragEvent.h"
+#include "nsIDOMElement.h"
+#include "nsIDOMElementReplaceEvent.h"
+#include "nsIDOMEvent.h"
+#include "nsIDOMEventTarget.h"
+#include "nsIDOMFileList.h"
+#include "nsIDOMFileReader.h"
+#include "nsIDOMFocusEvent.h"
+#include "nsIDOMFormData.h"
+#include "nsIDOMGeoPositionError.h"
+#include "nsIDOMHashChangeEvent.h"
+#include "nsIDOMHistory.h"
+#include "nsIDOMHTMLAnchorElement.h"
+#include "nsIDOMHTMLAppletElement.h"
+#include "nsIDOMHTMLAreaElement.h"
+#include "nsIDOMHTMLAudioElement.h"
+#include "nsIDOMHTMLBRElement.h"
+#include "nsIDOMHTMLBaseElement.h"
+#include "nsIDOMHTMLBodyElement.h"
+#include "nsIDOMHTMLButtonElement.h"
+#include "nsIDOMHTMLCanvasElement.h"
+#include "nsIDOMHTMLCollection.h"
+#include "nsIDOMHTMLDirectoryElement.h"
+#include "nsIDOMHTMLDivElement.h"
+#include "nsIDOMHTMLDocument.h"
+#include "nsIDOMHTMLElement.h"
+#include "nsIDOMHTMLEmbedElement.h"
+#include "nsIDOMHTMLFieldSetElement.h"
+#include "nsIDOMHTMLFormElement.h"
+#include "nsIDOMHTMLFrameElement.h"
+#include "nsIDOMHTMLFrameSetElement.h"
+#include "nsIDOMHTMLHRElement.h"
+#include "nsIDOMHTMLHeadElement.h"
+#include "nsIDOMHTMLHeadingElement.h"
+#include "nsIDOMHTMLHtmlElement.h"
+#include "nsIDOMHTMLIFrameElement.h"
+#include "nsIDOMHTMLImageElement.h"
+#include "nsIDOMHTMLInputElement.h"
+#include "nsIDOMHTMLLIElement.h"
+#include "nsIDOMHTMLLabelElement.h"
+#include "nsIDOMHTMLLinkElement.h"
+#include "nsIDOMHTMLMapElement.h"
+#include "nsIDOMHTMLMediaElement.h"
+#include "nsIDOMHTMLMenuElement.h"
+#include "nsIDOMHTMLMenuItemElement.h"
+#include "nsIDOMHTMLMetaElement.h"
+#include "nsIDOMHTMLOListElement.h"
+#include "nsIDOMHTMLObjectElement.h"
+#include "nsIDOMHTMLOptGroupElement.h"
+#include "nsIDOMHTMLOptionElement.h"
+#include "nsIDOMHTMLOptionsCollection.h"
+#include "nsIDOMHTMLParagraphElement.h"
+#include "nsIDOMHTMLPreElement.h"
+#include "nsIDOMHTMLQuoteElement.h"
+#include "nsIDOMHTMLScriptElement.h"
+#include "nsIDOMHTMLSelectElement.h"
+#include "nsIDOMHTMLSourceElement.h"
+#include "nsIDOMHTMLStyleElement.h"
+#include "nsIDOMHTMLTableCaptionElem.h"
+#include "nsIDOMHTMLTableCellElement.h"
+#include "nsIDOMHTMLTableElement.h"
+#include "nsIDOMHTMLTextAreaElement.h"
+#include "nsIDOMHTMLTitleElement.h"
+#include "nsIDOMHTMLUListElement.h"
+#include "nsIDOMHTMLVideoElement.h"
+#include "nsIDOMKeyEvent.h"
+#include "nsIDOMMediaError.h"
+#include "nsIDOMMediaList.h"
+#include "nsIDOMMediaStream.h"
+#include "nsIDOMMessageEvent.h"
+#include "nsIDOMMouseEvent.h"
+#include "nsIDOMMouseScrollEvent.h"
+#include "nsIDOMMutationEvent.h"
+#include "nsIDOMMozApplicationEvent.h"
+#include "nsIDOMMozMmsEvent.h"
+#include "nsIDOMMozNamedAttrMap.h"
+#include "nsIDOMMozSettingsEvent.h"
+#include "nsIDOMMozSmsEvent.h"
+#ifdef MOZ_B2G_RIL
+#include "nsIDOMMozVoicemailEvent.h"
+#endif
+#ifdef MOZ_WIDGET_GONK
+#include "nsIDOMMozWifiConnectionInfoEvent.h"
+#include "nsIDOMMozWifiStatusChangeEvent.h"
+#include "nsIDOMMozWifiP2pStatusChangeEvent.h"
+#endif
+#include "nsIDOMNode.h"
+#include "nsIDOMNodeIterator.h"
+#include "nsIDOMNotifyPaintEvent.h"
+#include "nsIDOMNSEvent.h"
+#include "nsIDOMOfflineResourceList.h"
+#include "nsIDOMPageTransitionEvent.h"
+#include "nsIDOMPaintRequest.h"
+#include "nsIDOMParser.h"
+#include "nsIDOMPopStateEvent.h"
+#include "nsIDOMPopupBlockedEvent.h"
+#include "nsIDOMProcessingInstruction.h"
+#include "nsIDOMProgressEvent.h"
+#include "nsIDOMRange.h"
+#include "nsIDOMRecordErrorEvent.h"
+#include "nsIDOMRect.h"
+#include "nsIDOMScreen.h"
+#include "nsIDOMScrollAreaEvent.h"
+#include "nsIDOMSerializer.h"
+#include "nsIDOMSimpleGestureEvent.h"
+#include "nsIDOMSmartCardEvent.h"
+#include "nsIDOMSpeechRecognitionEvent.h"
+#include "nsIDOMSpeechSynthesisEvent.h"
+#include "nsIDOMStorageEvent.h"
+#include "nsIDOMStyleSheet.h"
+#include "nsIDOMStyleSheetList.h"
+#include "nsIDOMStyleRuleChangeEvent.h"
+#include "nsIDOMStyleSheetApplicableStateChangeEvent.h"
+#include "nsIDOMStyleSheetChangeEvent.h"
+#include "nsIDOMSVGElement.h"
+#include "nsIDOMSVGLength.h"
+#include "nsIDOMText.h"
+#include "nsIDOMTimeEvent.h"
+#include "nsIDOMTimeRanges.h"
+#include "nsIDOMTouchEvent.h"
+#include "nsIDOMTransitionEvent.h"
+#include "nsIDOMTreeWalker.h"
+#include "nsIDOMUIEvent.h"
+#include "nsIDOMValidityState.h"
+#include "nsIDOMWheelEvent.h"
+#include "nsIDOMXMLDocument.h"
+#include "nsIDOMXPathEvaluator.h"
+#include "nsIDOMXULCommandEvent.h"
+#include "nsIDOMXULDocument.h"
+#include "nsIDOMXULElement.h"
+#include "nsISelection.h"
+#include "nsIXMLHttpRequest.h"
+
+#include "mozilla/dom/AnimationEventBinding.h"
+#include "mozilla/dom/AttrBinding.h"
+#include "mozilla/dom/BeforeUnloadEventBinding.h"
+#include "mozilla/dom/CanvasRenderingContext2DBinding.h"
+#include "mozilla/dom/CDATASectionBinding.h"
+#include "mozilla/dom/CharacterDataBinding.h"
+#include "mozilla/dom/DOMRectBinding.h"
+#include "mozilla/dom/DOMRectListBinding.h"
+#include "mozilla/dom/ClipboardEventBinding.h"
+#include "mozilla/dom/CloseEventBinding.h"
+#include "mozilla/dom/CommandEventBinding.h"
+#include "mozilla/dom/CommentBinding.h"
+#include "mozilla/dom/CompositionEventBinding.h"
+#include "mozilla/dom/CSSPrimitiveValueBinding.h"
+#include "mozilla/dom/CSSStyleDeclarationBinding.h"
+#include "mozilla/dom/CSSStyleSheetBinding.h"
+#include "mozilla/dom/CSSValueBinding.h"
+#include "mozilla/dom/CSSValueListBinding.h"
+#include "mozilla/dom/CustomEventBinding.h"
+#include "mozilla/dom/DataChannelBinding.h"
+#include "mozilla/dom/DataContainerEventBinding.h"
+#include "mozilla/dom/DataTransferBinding.h"
+#include "mozilla/dom/DeviceOrientationEventBinding.h"
+#include "mozilla/dom/DeviceStorageBinding.h"
+#include "mozilla/dom/DeviceStorageChangeEventBinding.h"
+#include "mozilla/dom/DOMCursorBinding.h"
+#include "mozilla/dom/DOMExceptionBinding.h"
+#include "mozilla/dom/DOMParserBinding.h"
+#include "mozilla/dom/DOMRequestBinding.h"
+#include "mozilla/dom/DOMTransactionEventBinding.h"
+#include "mozilla/dom/DocumentBinding.h"
+#include "mozilla/dom/DocumentFragmentBinding.h"
+#include "mozilla/dom/DocumentTypeBinding.h"
+#include "mozilla/dom/DocumentBinding.h"
+#include "mozilla/dom/DragEventBinding.h"
+#include "mozilla/dom/ElementBinding.h"
+#include "mozilla/dom/ElementReplaceEventBinding.h"
+#include "mozilla/dom/EventBinding.h"
+#include "mozilla/dom/EventTargetBinding.h"
+#include "mozilla/dom/FileListBinding.h"
+#include "mozilla/dom/FileReaderBinding.h"
+#include "mozilla/dom/FocusEventBinding.h"
+#include "mozilla/dom/FormDataBinding.h"
+#include "mozilla/dom/HashChangeEventBinding.h"
+#include "mozilla/dom/HistoryBinding.h"
+#include "mozilla/dom/HTMLAnchorElementBinding.h"
+#include "mozilla/dom/HTMLAppletElementBinding.h"
+#include "mozilla/dom/HTMLAreaElementBinding.h"
+#include "mozilla/dom/HTMLAudioElementBinding.h"
+#include "mozilla/dom/HTMLBRElementBinding.h"
+#include "mozilla/dom/HTMLBaseElementBinding.h"
+#include "mozilla/dom/HTMLBodyElementBinding.h"
+#include "mozilla/dom/HTMLButtonElementBinding.h"
+#include "mozilla/dom/HTMLCanvasElementBinding.h"
+#include "mozilla/dom/HTMLCollectionBinding.h"
+#include "mozilla/dom/HTMLDirectoryElementBinding.h"
+#include "mozilla/dom/HTMLDivElementBinding.h"
+#include "mozilla/dom/HTMLDocumentBinding.h"
+#include "mozilla/dom/HTMLElementBinding.h"
+#include "mozilla/dom/HTMLEmbedElementBinding.h"
+#include "mozilla/dom/HTMLFieldSetElementBinding.h"
+#include "mozilla/dom/HTMLFormElementBinding.h"
+#include "mozilla/dom/HTMLFrameElementBinding.h"
+#include "mozilla/dom/HTMLFrameSetElementBinding.h"
+#include "mozilla/dom/HTMLHRElementBinding.h"
+#include "mozilla/dom/HTMLHeadElementBinding.h"
+#include "mozilla/dom/HTMLHeadingElementBinding.h"
+#include "mozilla/dom/HTMLHtmlElementBinding.h"
+#include "mozilla/dom/HTMLIFrameElementBinding.h"
+#include "mozilla/dom/HTMLImageElementBinding.h"
+#include "mozilla/dom/HTMLInputElementBinding.h"
+#include "mozilla/dom/HTMLLIElementBinding.h"
+#include "mozilla/dom/HTMLLabelElementBinding.h"
+#include "mozilla/dom/HTMLLinkElementBinding.h"
+#include "mozilla/dom/HTMLMapElementBinding.h"
+#include "mozilla/dom/HTMLMediaElementBinding.h"
+#include "mozilla/dom/HTMLMenuElementBinding.h"
+#include "mozilla/dom/HTMLMenuItemElementBinding.h"
+#include "mozilla/dom/HTMLMetaElementBinding.h"
+#include "mozilla/dom/HTMLOListElementBinding.h"
+#include "mozilla/dom/HTMLObjectElementBinding.h"
+#include "mozilla/dom/HTMLOptGroupElementBinding.h"
+#include "mozilla/dom/HTMLOptionElementBinding.h"
+#include "mozilla/dom/HTMLOptionsCollectionBinding.h"
+#include "mozilla/dom/HTMLParagraphElementBinding.h"
+#include "mozilla/dom/HTMLPreElementBinding.h"
+#include "mozilla/dom/HTMLQuoteElementBinding.h"
+#include "mozilla/dom/HTMLScriptElementBinding.h"
+#include "mozilla/dom/HTMLSelectElementBinding.h"
+#include "mozilla/dom/HTMLSourceElementBinding.h"
+#include "mozilla/dom/HTMLStyleElementBinding.h"
+#include "mozilla/dom/HTMLTableCaptionElementBinding.h"
+#include "mozilla/dom/HTMLTableCellElementBinding.h"
+#include "mozilla/dom/HTMLTableElementBinding.h"
+#include "mozilla/dom/HTMLTextAreaElementBinding.h"
+#include "mozilla/dom/HTMLTitleElementBinding.h"
+#include "mozilla/dom/HTMLUListElementBinding.h"
+#include "mozilla/dom/HTMLVideoElementBinding.h"
+#include "mozilla/dom/KeyEventBinding.h"
+#include "mozilla/dom/LocalMediaStreamBinding.h"
+#include "mozilla/dom/MediaErrorBinding.h"
+#include "mozilla/dom/MediaListBinding.h"
+#include "mozilla/dom/MediaStreamBinding.h"
+#include "mozilla/dom/MessageEventBinding.h"
+#include "mozilla/dom/MouseEventBinding.h"
+#include "mozilla/dom/MouseScrollEventBinding.h"
+#include "mozilla/dom/MutationEventBinding.h"
+#include "mozilla/dom/MozApplicationEventBinding.h"
+#include "mozilla/dom/MozMmsEventBinding.h"
+#include "mozilla/dom/MozNamedAttrMapBinding.h"
+#include "mozilla/dom/MozSettingsEventBinding.h"
+#include "mozilla/dom/MozSmsEventBinding.h"
+#ifdef MOZ_B2G_RIL
+#include "mozilla/dom/MozVoicemailEventBinding.h"
+#endif
+#ifdef MOZ_WIDGET_GONK
+#include "mozilla/dom/MozWifiConnectionInfoEventBinding.h"
+#include "mozilla/dom/MozWifiStatusChangeEventBinding.h"
+#include "mozilla/dom/MozWifiP2pStatusChangeEventBinding.h"
+#endif
+#include "mozilla/dom/NodeIteratorBinding.h"
+#include "mozilla/dom/NodeBinding.h"
+#include "mozilla/dom/NotifyPaintEventBinding.h"
+#include "mozilla/dom/EventBinding.h"
+#include "mozilla/dom/OfflineResourceListBinding.h"
+#include "mozilla/dom/PageTransitionEventBinding.h"
+#include "mozilla/dom/PaintRequestBinding.h"
+#include "mozilla/dom/PopStateEventBinding.h"
+#include "mozilla/dom/PopupBlockedEventBinding.h"
+#include "mozilla/dom/PositionErrorBinding.h"
+#include "mozilla/dom/ProcessingInstructionBinding.h"
+#include "mozilla/dom/ProgressEventBinding.h"
+#include "mozilla/dom/RangeBinding.h"
+#include "mozilla/dom/RecordErrorEventBinding.h"
+#include "mozilla/dom/RectBinding.h"
+#include "mozilla/dom/ScreenBinding.h"
+#include "mozilla/dom/SelectionBinding.h"
+#include "mozilla/dom/ScrollAreaEventBinding.h"
+#include "mozilla/dom/SimpleGestureEventBinding.h"
+#include "mozilla/dom/SmartCardEventBinding.h"
+#include "mozilla/dom/SpeechRecognitionEventBinding.h"
+#include "mozilla/dom/SpeechSynthesisEventBinding.h"
+#include "mozilla/dom/StorageEventBinding.h"
+#include "mozilla/dom/StyleSheetBinding.h"
+#include "mozilla/dom/StyleSheetListBinding.h"
+#include "mozilla/dom/StyleRuleChangeEventBinding.h"
+#include "mozilla/dom/StyleSheetApplicableStateChangeEventBinding.h"
+#include "mozilla/dom/StyleSheetChangeEventBinding.h"
+#include "mozilla/dom/SVGElementBinding.h"
+#include "mozilla/dom/SVGLengthBinding.h"
+#include "mozilla/dom/TextBinding.h"
+#include "mozilla/dom/TimeEventBinding.h"
+#include "mozilla/dom/TimeRangesBinding.h"
+#include "mozilla/dom/TransitionEventBinding.h"
+#include "mozilla/dom/TreeWalkerBinding.h"
+#include "mozilla/dom/UIEventBinding.h"
+#include "mozilla/dom/ValidityStateBinding.h"
+#include "mozilla/dom/WheelEventBinding.h"
+#include "mozilla/dom/XMLDocumentBinding.h"
+#include "mozilla/dom/XMLHttpRequestEventTargetBinding.h"
+#include "mozilla/dom/XMLHttpRequestUploadBinding.h"
+#include "mozilla/dom/XMLSerializerBinding.h"
+#include "mozilla/dom/XPathEvaluatorBinding.h"
+#include "mozilla/dom/XULCommandEventBinding.h"
+#include "mozilla/dom/XULDocumentBinding.h"
+#include "mozilla/dom/XULElementBinding.h"
+
+using namespace mozilla;
+
+struct ComponentsInterfaceShimEntry {
+  const char *geckoName;
+  nsIID iid;
+  const mozilla::dom::NativePropertyHooks* nativePropHooks;
+};
+
+#define DEFINE_SHIM_WITH_CUSTOM_INTERFACE(geckoName, domName) \
+  { #geckoName, NS_GET_IID(geckoName), \
+     mozilla::dom::domName ## Binding::sNativePropertyHooks }
+#define DEFINE_SHIM(name) \
+  DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOM ## name, name)
+
+const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
+{
+  DEFINE_SHIM(AnimationEvent),
+  DEFINE_SHIM(Attr),
+  DEFINE_SHIM(BeforeUnloadEvent),
+  DEFINE_SHIM(CanvasRenderingContext2D),
+  DEFINE_SHIM(CDATASection),
+  DEFINE_SHIM(CharacterData),
+  DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMClientRect, DOMRectReadOnly),
+  DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMClientRectList, DOMRectList),
+  DEFINE_SHIM(ClipboardEvent),
+  DEFINE_SHIM(CloseEvent),
+  DEFINE_SHIM(CommandEvent),
+  DEFINE_SHIM(Comment),
+  DEFINE_SHIM(CompositionEvent),
+  DEFINE_SHIM(CSSPrimitiveValue),
+  DEFINE_SHIM(CSSStyleDeclaration),
+  DEFINE_SHIM(CSSStyleSheet),
+  DEFINE_SHIM(CSSValue),
+  DEFINE_SHIM(CSSValueList),
+  DEFINE_SHIM(CustomEvent),
+  DEFINE_SHIM(DataChannel),
+  DEFINE_SHIM(DataContainerEvent),
+  DEFINE_SHIM(DataTransfer),
+  DEFINE_SHIM(DeviceOrientationEvent),
+  DEFINE_SHIM(DeviceStorage),
+  DEFINE_SHIM(DeviceStorageChangeEvent),
+  DEFINE_SHIM(DOMCursor),
+  DEFINE_SHIM(DOMException),
+  DEFINE_SHIM(DOMRequest),
+  DEFINE_SHIM(DOMTransactionEvent),
+  DEFINE_SHIM(Document),
+  DEFINE_SHIM(DocumentFragment),
+  DEFINE_SHIM(DocumentType),
+  DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMDocumentXBL, Document),
+  DEFINE_SHIM(DragEvent),
+  DEFINE_SHIM(Element),
+  DEFINE_SHIM(ElementReplaceEvent),
+  DEFINE_SHIM(Event),
+  DEFINE_SHIM(EventTarget),
+  DEFINE_SHIM(FileReader),
+  DEFINE_SHIM(FileList),
+  DEFINE_SHIM(FocusEvent),
+  DEFINE_SHIM(FormData),
+  DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMGeoPositionError, PositionError),
+  DEFINE_SHIM(HashChangeEvent),
+  DEFINE_SHIM(History),
+  DEFINE_SHIM(HTMLAnchorElement),
+  DEFINE_SHIM(HTMLAppletElement),
+  DEFINE_SHIM(HTMLAreaElement),
+  DEFINE_SHIM(HTMLAudioElement),
+  DEFINE_SHIM(HTMLBRElement),
+  DEFINE_SHIM(HTMLBaseElement),
+  DEFINE_SHIM(HTMLBodyElement),
+  DEFINE_SHIM(HTMLButtonElement),
+  DEFINE_SHIM(HTMLCanvasElement),
+  DEFINE_SHIM(HTMLCollection),
+  DEFINE_SHIM(HTMLDirectoryElement),
+  DEFINE_SHIM(HTMLDivElement),
+  DEFINE_SHIM(HTMLDocument),
+  DEFINE_SHIM(HTMLElement),
+  DEFINE_SHIM(HTMLEmbedElement),
+  DEFINE_SHIM(HTMLFieldSetElement),
+  DEFINE_SHIM(HTMLFormElement),
+  DEFINE_SHIM(HTMLFrameElement),
+  DEFINE_SHIM(HTMLFrameSetElement),
+  DEFINE_SHIM(HTMLHRElement),
+  DEFINE_SHIM(HTMLHeadElement),
+  DEFINE_SHIM(HTMLHeadingElement),
+  DEFINE_SHIM(HTMLHtmlElement),
+  DEFINE_SHIM(HTMLIFrameElement),
+  DEFINE_SHIM(HTMLImageElement),
+  DEFINE_SHIM(HTMLInputElement),
+  DEFINE_SHIM(HTMLLIElement),
+  DEFINE_SHIM(HTMLLabelElement),
+  DEFINE_SHIM(HTMLLinkElement),
+  DEFINE_SHIM(HTMLMapElement),
+  DEFINE_SHIM(HTMLMediaElement),
+  DEFINE_SHIM(HTMLMenuElement),
+  DEFINE_SHIM(HTMLMenuItemElement),
+  DEFINE_SHIM(HTMLMetaElement),
+  DEFINE_SHIM(HTMLOListElement),
+  DEFINE_SHIM(HTMLObjectElement),
+  DEFINE_SHIM(HTMLOptGroupElement),
+  DEFINE_SHIM(HTMLOptionElement),
+  DEFINE_SHIM(HTMLOptionsCollection),
+  DEFINE_SHIM(HTMLParagraphElement),
+  DEFINE_SHIM(HTMLPreElement),
+  DEFINE_SHIM(HTMLQuoteElement),
+  DEFINE_SHIM(HTMLScriptElement),
+  DEFINE_SHIM(HTMLSelectElement),
+  DEFINE_SHIM(HTMLSourceElement),
+  DEFINE_SHIM(HTMLStyleElement),
+  DEFINE_SHIM(HTMLTableCaptionElement),
+  DEFINE_SHIM(HTMLTableCellElement),
+  DEFINE_SHIM(HTMLTableElement),
+  DEFINE_SHIM(HTMLTextAreaElement),
+  DEFINE_SHIM(HTMLTitleElement),
+  DEFINE_SHIM(HTMLUListElement),
+  DEFINE_SHIM(HTMLVideoElement),
+  DEFINE_SHIM(KeyEvent),
+  DEFINE_SHIM(LocalMediaStream),
+  DEFINE_SHIM(MediaError),
+  DEFINE_SHIM(MediaList),
+  DEFINE_SHIM(MediaStream),
+  DEFINE_SHIM(MessageEvent),
+  DEFINE_SHIM(MouseEvent),
+  DEFINE_SHIM(MouseScrollEvent),
+  DEFINE_SHIM(MutationEvent),
+  DEFINE_SHIM(MozApplicationEvent),
+  DEFINE_SHIM(MozMmsEvent),
+  DEFINE_SHIM(MozNamedAttrMap),
+  DEFINE_SHIM(MozSettingsEvent),
+  DEFINE_SHIM(MozSmsEvent),
+#ifdef MOZ_B2G_RIL
+  DEFINE_SHIM(MozVoicemailEvent),
+#endif
+#ifdef MOZ_WIDGET_GONK
+  DEFINE_SHIM(MozWifiConnectionInfoEvent),
+  DEFINE_SHIM(MozWifiP2pStatusChangeEvent),
+  DEFINE_SHIM(MozWifiStatusChangeEvent),
+#endif
+  DEFINE_SHIM(NodeIterator),
+  DEFINE_SHIM(Node),
+  DEFINE_SHIM(NotifyPaintEvent),
+  DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMNSEvent, Event),
+  DEFINE_SHIM(OfflineResourceList),
+  DEFINE_SHIM(PageTransitionEvent),
+  DEFINE_SHIM(PaintRequest),
+  DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMParser, DOMParser),
+  DEFINE_SHIM(PopStateEvent),
+  DEFINE_SHIM(PopupBlockedEvent),
+  DEFINE_SHIM(ProcessingInstruction),
+  DEFINE_SHIM(ProgressEvent),
+  DEFINE_SHIM(Range),
+  DEFINE_SHIM(RecordErrorEvent),
+  DEFINE_SHIM(Rect),
+  DEFINE_SHIM(Screen),
+  DEFINE_SHIM(ScrollAreaEvent),
+  DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMSerializer, XMLSerializer),
+  DEFINE_SHIM(SimpleGestureEvent),
+  DEFINE_SHIM(SmartCardEvent),
+  DEFINE_SHIM(SpeechRecognitionEvent),
+  DEFINE_SHIM(SpeechSynthesisEvent),
+  DEFINE_SHIM(StorageEvent),
+  DEFINE_SHIM(StyleSheet),
+  DEFINE_SHIM(StyleSheetList),
+  DEFINE_SHIM(StyleRuleChangeEvent),
+  DEFINE_SHIM(StyleSheetApplicableStateChangeEvent),
+  DEFINE_SHIM(StyleSheetChangeEvent),
+  DEFINE_SHIM(SVGElement),
+  DEFINE_SHIM(SVGLength),
+  DEFINE_SHIM(Text),
+  DEFINE_SHIM(TimeEvent),
+  DEFINE_SHIM(TimeRanges),
+  DEFINE_SHIM(TransitionEvent),
+  DEFINE_SHIM(TreeWalker),
+  DEFINE_SHIM(UIEvent),
+  DEFINE_SHIM(ValidityState),
+  DEFINE_SHIM(WheelEvent),
+  DEFINE_SHIM(XMLDocument),
+  DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIXMLHttpRequestEventTarget, XMLHttpRequestEventTarget),
+  DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIXMLHttpRequestUpload, XMLHttpRequestUpload),
+  DEFINE_SHIM(XPathEvaluator),
+  DEFINE_SHIM(XULCommandEvent),
+  DEFINE_SHIM(XULDocument),
+  DEFINE_SHIM(XULElement),
+  DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsISelection, Selection),
+};
+
+#undef DEFINE_SHIM
+#undef DEFINE_SHIM_WITH_CUSTOM_INTERFACE
+
+NS_IMPL_ISUPPORTS(ShimInterfaceInfo, nsISupports, nsIInterfaceInfo)
+
+already_AddRefed<ShimInterfaceInfo>
+ShimInterfaceInfo::MaybeConstruct(const char* aName, JSContext* cx)
+{
+    nsRefPtr<ShimInterfaceInfo> info;
+    for (uint32_t i = 0; i < ArrayLength(kComponentsInterfaceShimMap); ++i) {
+        if (!strcmp(aName, kComponentsInterfaceShimMap[i].geckoName)) {
+            const ComponentsInterfaceShimEntry& shimEntry =
+                kComponentsInterfaceShimMap[i];
+            info = new ShimInterfaceInfo(shimEntry.iid,
+                                         shimEntry.geckoName,
+                                         shimEntry.nativePropHooks);
+            break;
+        }
+    }
+    return info.forget();
+}
+
+ShimInterfaceInfo::ShimInterfaceInfo(const nsIID& aIID,
+                                     const char* aName,
+                                     const mozilla::dom::NativePropertyHooks* aNativePropHooks)
+    : mIID(aIID)
+    , mName(aName)
+    , mNativePropHooks(aNativePropHooks)
+{
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::GetName(char** aName)
+{
+    *aName = ToNewCString(mName);
+    return NS_OK;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::GetInterfaceIID(nsIID** aIID)
+{
+    *aIID = static_cast<nsIID*> (nsMemory::Clone(&mIID, sizeof(mIID)));
+    return NS_OK;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::IsScriptable(bool* aRetVal)
+{
+    // This class should pretend that the interface is scriptable because
+    // that's what nsJSIID assumes.
+    *aRetVal = true;
+    return NS_OK;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::IsBuiltinClass(bool* aRetVal)
+{
+    *aRetVal = true;
+    return NS_OK;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::GetParent(nsIInterfaceInfo** aParent)
+{
+    *aParent = nullptr;
+    return NS_OK;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::GetMethodCount(uint16_t* aCount)
+{
+    // Pretend we don't have any methods.
+    *aCount = 0;
+    return NS_OK;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::GetConstantCount(uint16_t* aCount)
+{
+    // We assume that we never have interfaces with more than UINT16_MAX
+    // constants defined on them.
+    uint16_t count = 0;
+
+    // NOTE: The structure of this loop must be kept in sync with the loop
+    // in GetConstant.
+    const mozilla::dom::NativePropertyHooks* propHooks = mNativePropHooks;
+    do {
+        const mozilla::dom::NativeProperties* props[] = {
+            propHooks->mNativeProperties.regular,
+            propHooks->mNativeProperties.chromeOnly
+        };
+        for (size_t i = 0; i < ArrayLength(props); ++i) {
+            auto prop = props[i];
+            if (prop && prop->constants) {
+                for (auto cs = prop->constants->specs; cs->name; ++cs) {
+                    // We have found one constant here.  We explicitly do not
+                    // bother calling isEnabled() here because it's OK to define
+                    // potentially extra constants on these shim interfaces.
+                    ++count;
+                }
+            }
+        }
+    } while ((propHooks = propHooks->mProtoHooks));
+    *aCount = count;
+    return NS_OK;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::GetMethodInfo(uint16_t aIndex, const nsXPTMethodInfo** aInfo)
+{
+    MOZ_ASSERT(false, "This should never be called");
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::GetMethodInfoForName(const char* aName, uint16_t* aIndex, const nsXPTMethodInfo** aInfo)
+{
+    MOZ_ASSERT(false, "This should never be called");
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::GetConstant(uint16_t aIndex, JS::MutableHandleValue aConstant,
+                               char** aName)
+{
+    // We assume that we never have interfaces with more than UINT16_MAX
+    // constants defined on them.
+    uint16_t index = 0;
+
+    // NOTE: The structure of this loop must be kept in sync with the loop
+    // in GetConstantCount.
+    const mozilla::dom::NativePropertyHooks* propHooks = mNativePropHooks;
+    do {
+        const mozilla::dom::NativeProperties* props[] = {
+            propHooks->mNativeProperties.regular,
+            propHooks->mNativeProperties.chromeOnly
+        };
+        for (size_t i = 0; i < ArrayLength(props); ++i) {
+            auto prop = props[i];
+            if (prop && prop->constants) {
+                for (auto cs = prop->constants->specs; cs->name; ++cs) {
+                    // We have found one constant here.  We explicitly do not
+                    // bother calling isEnabled() here because it's OK to define
+                    // potentially extra constants on these shim interfaces.
+                    if (index == aIndex) {
+                        aConstant.set(cs->value);
+                        *aName = ToNewCString(nsDependentCString(cs->name));
+                        return NS_OK;
+                    }
+                    ++index;
+                }
+            }
+        }
+    } while ((propHooks = propHooks->mProtoHooks));
+
+    // aIndex was bigger than the number of constants we have.
+    return NS_ERROR_INVALID_ARG;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::GetInfoForParam(uint16_t aIndex, const nsXPTParamInfo* aParam, nsIInterfaceInfo** aRetVal)
+{
+    MOZ_ASSERT(false, "This should never be called");
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::GetIIDForParam(uint16_t aIndex, const nsXPTParamInfo* aParam, nsIID** aRetVal)
+{
+    MOZ_ASSERT(false, "This should never be called");
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::GetTypeForParam(uint16_t aInex, const nsXPTParamInfo* aParam, uint16_t aDimension, nsXPTType* aRetVal)
+{
+    MOZ_ASSERT(false, "This should never be called");
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::GetSizeIsArgNumberForParam(uint16_t aInex, const nsXPTParamInfo* aParam, uint16_t aDimension, uint8_t* aRetVal)
+{
+    MOZ_ASSERT(false, "This should never be called");
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::GetInterfaceIsArgNumberForParam(uint16_t aInex, const nsXPTParamInfo* aParam, uint8_t* aRetVal)
+{
+    MOZ_ASSERT(false, "This should never be called");
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::IsIID(const nsIID* aIID, bool* aRetVal)
+{
+    *aRetVal = mIID.Equals(*aIID);
+    return NS_OK;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::GetNameShared(const char** aName)
+{
+    *aName = mName.get();
+    return NS_OK;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::GetIIDShared(const nsIID** aIID)
+{
+    *aIID = &mIID;
+    return NS_OK;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::IsFunction(bool* aRetVal)
+{
+    *aRetVal = false;
+    return NS_OK;
+}
+
+NS_IMETHODIMP
+ShimInterfaceInfo::HasAncestor(const nsIID* aIID, bool* aRetVal)
+{
+    *aRetVal = false;
+    return NS_OK;
+}
+
+NS_IMETHODIMP_(nsresult)
+ShimInterfaceInfo::GetIIDForParamNoAlloc(uint16_t aIndex, const nsXPTParamInfo* aInfo, nsIID* aIID)
+{
+    MOZ_ASSERT(false, "This should never be called");
+    return NS_ERROR_NOT_IMPLEMENTED;
+}
new file mode 100644
--- /dev/null
+++ b/xpcom/reflect/xptinfo/src/ShimInterfaceInfo.h
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * vim: set ts=8 sw=4 et tw=78:
+ *
+ * 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/. */
+
+#ifndef ShimInterfaceInfo_h
+#define ShimInterfaceInfo_h
+
+#include "mozilla/Attributes.h"
+#include "nsIInterfaceInfo.h"
+#include "nsString.h"
+#include "nsID.h"
+#include "nsTArray.h"
+#include "xptinfo.h"
+#include "nsAutoPtr.h"
+#include "js/RootingAPI.h"
+
+namespace mozilla {
+namespace dom {
+struct ConstantSpec;
+struct NativePropertyHooks;
+}
+}
+
+class ShimInterfaceInfo MOZ_FINAL : public nsIInterfaceInfo
+{
+public:
+    NS_DECL_ISUPPORTS
+    NS_DECL_NSIINTERFACEINFO
+
+    // Construct a ShimInterfaceInfo object if we have a shim available for aName.
+    // Otherwise, returns nullptr.
+    static already_AddRefed<ShimInterfaceInfo>
+    MaybeConstruct(const char* aName, JSContext* cx);
+
+private:
+    ShimInterfaceInfo(const nsIID& aIID,
+                      const char* aName,
+                      const mozilla::dom::NativePropertyHooks* aNativePropHooks);
+
+private:
+    nsIID mIID;
+    nsAutoCString mName;
+    const mozilla::dom::NativePropertyHooks* mNativePropHooks;
+};
+
+#endif
--- a/xpcom/reflect/xptinfo/src/moz.build
+++ b/xpcom/reflect/xptinfo/src/moz.build
@@ -1,16 +1,21 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
 UNIFIED_SOURCES += [
+    'ShimInterfaceInfo.cpp',
     'xptiInterfaceInfo.cpp',
     'xptiInterfaceInfoManager.cpp',
     'xptiTypelibGuts.cpp',
     'xptiWorkingSet.cpp',
 ]
 
+LOCAL_INCLUDES += [
+    '/dom/base',
+]
+
 MSVC_ENABLE_PGO = True
 
 FINAL_LIBRARY = 'xpcom_core'
--- a/xpcom/reflect/xptinfo/src/xptiInterfaceInfo.cpp
+++ b/xpcom/reflect/xptinfo/src/xptiInterfaceInfo.cpp
@@ -2,16 +2,19 @@
 /* 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/. */
 
 /* Implementation of xptiInterfaceEntry and xptiInterfaceInfo. */
 
 #include "xptiprivate.h"
 #include "mozilla/XPTInterfaceInfoManager.h"
+#include "mozilla/PodOperations.h"
+#include "nsCxPusher.h"
+#include "jsapi.h"
 
 using namespace mozilla;
 
 /***************************************************************************/
 // Debug Instrumentation...
 
 #ifdef SHOW_INFO_COUNT_STATS
 static int DEBUG_TotalInfos = 0;
@@ -228,38 +231,79 @@ xptiInterfaceEntry::GetMethodInfoForName
     {
         *index = 0;
         *result = 0;
         return NS_ERROR_INVALID_ARG;
     }
 }
 
 nsresult
-xptiInterfaceEntry::GetConstant(uint16_t index, const nsXPTConstant** constant)
+xptiInterfaceEntry::GetConstant(uint16_t index, JS::MutableHandleValue constant,
+                                char** name)
 {
     if(!EnsureResolved())
         return NS_ERROR_UNEXPECTED;
 
     if(index < mConstantBaseIndex)
-        return mParent->GetConstant(index, constant);
+        return mParent->GetConstant(index, constant, name);
 
     if(index >= mConstantBaseIndex + 
                 mDescriptor->num_constants)
     {
         NS_PRECONDITION(0, "bad param");
-        *constant = nullptr;
         return NS_ERROR_INVALID_ARG;
     }
 
-    // else...
-    *constant =
-        reinterpret_cast<nsXPTConstant*>
-                        (&mDescriptor->
-                                const_descriptors[index -
-                                    mConstantBaseIndex]);
+    const auto& c = mDescriptor->const_descriptors[index - mConstantBaseIndex];
+    AutoJSContext cx;
+    JS::Rooted<JS::Value> v(cx);
+    v.setUndefined();
+
+    switch (c.type.prefix.flags) {
+      case nsXPTType::T_I8:
+      {
+        v.setInt32(c.value.i8);
+        break;
+      }
+      case nsXPTType::T_U8:
+      {
+        v.setInt32(c.value.ui8);
+        break;
+      }
+      case nsXPTType::T_I16:
+      {
+        v.setInt32(c.value.i16);
+        break;
+      }
+      case nsXPTType::T_U16:
+      {
+        v.setInt32(c.value.ui16);
+        break;
+      }
+      case nsXPTType::T_I32:
+      {
+        v = JS_NumberValue(c.value.i32);
+        break;
+      }
+      case nsXPTType::T_U32:
+      {
+        v = JS_NumberValue(c.value.ui32);
+        break;
+      }
+      default:
+      {
+#ifdef DEBUG
+        NS_ERROR("Non-numeric constant found in interface.");
+#endif
+      }
+    }
+
+    constant.set(v);
+    *name = ToNewCString(nsDependentCString(c.name));
+
     return NS_OK;
 }
 
 // this is a private helper
 
 nsresult 
 xptiInterfaceEntry::GetEntryForParam(uint16_t methodIndex, 
                                      const nsXPTParamInfo * param,
--- a/xpcom/reflect/xptinfo/src/xptiprivate.h
+++ b/xpcom/reflect/xptinfo/src/xptiprivate.h
@@ -27,16 +27,18 @@
 #include "nsDirectoryServiceDefs.h"
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsIWeakReference.h"
 
 #include "mozilla/ReentrantMonitor.h"
 #include "mozilla/Mutex.h"
 #include "mozilla/Attributes.h"
 
+#include "js/TypeDecls.h"
+
 #include "nsCRT.h"
 #include "nsMemory.h"
 
 #include "nsCOMArray.h"
 #include "nsQuickSort.h"
 
 #include "nsXPIDLString.h"
 
@@ -223,17 +225,17 @@ public:
         return NS_OK;
     }
     // Except this one.
     //nsresult GetParent(nsIInterfaceInfo * *aParent);
     nsresult GetMethodCount(uint16_t *aMethodCount);
     nsresult GetConstantCount(uint16_t *aConstantCount);
     nsresult GetMethodInfo(uint16_t index, const nsXPTMethodInfo * *info);
     nsresult GetMethodInfoForName(const char *methodName, uint16_t *index, const nsXPTMethodInfo * *info);
-    nsresult GetConstant(uint16_t index, const nsXPTConstant * *constant);
+    nsresult GetConstant(uint16_t index, JS::MutableHandleValue, char** constant);
     nsresult GetInfoForParam(uint16_t methodIndex, const nsXPTParamInfo * param, nsIInterfaceInfo **_retval);
     nsresult GetIIDForParam(uint16_t methodIndex, const nsXPTParamInfo * param, nsIID * *_retval);
     nsresult GetTypeForParam(uint16_t methodIndex, const nsXPTParamInfo * param, uint16_t dimension, nsXPTType *_retval);
     nsresult GetSizeIsArgNumberForParam(uint16_t methodIndex, const nsXPTParamInfo * param, uint16_t dimension, uint8_t *_retval);
     nsresult GetInterfaceIsArgNumberForParam(uint16_t methodIndex, const nsXPTParamInfo * param, uint8_t *_retval);
     nsresult IsIID(const nsIID * IID, bool *_retval);
     nsresult GetNameShared(const char **name);
     nsresult GetIIDShared(const nsIID * *iid);
@@ -304,17 +306,17 @@ public:
             return NS_ERROR_UNEXPECTED;
         NS_IF_ADDREF(*aParent = mParent);
         return NS_OK;
     }
     NS_IMETHOD GetMethodCount(uint16_t *aMethodCount) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->GetMethodCount(aMethodCount); }
     NS_IMETHOD GetConstantCount(uint16_t *aConstantCount) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->GetConstantCount(aConstantCount); }
     NS_IMETHOD GetMethodInfo(uint16_t index, const nsXPTMethodInfo * *info) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->GetMethodInfo(index, info); }
     NS_IMETHOD GetMethodInfoForName(const char *methodName, uint16_t *index, const nsXPTMethodInfo * *info) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->GetMethodInfoForName(methodName, index, info); }
-    NS_IMETHOD GetConstant(uint16_t index, const nsXPTConstant * *constant) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->GetConstant(index, constant); }
+    NS_IMETHOD GetConstant(uint16_t index, JS::MutableHandleValue constant, char** name) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->GetConstant(index, constant, name); }
     NS_IMETHOD GetInfoForParam(uint16_t methodIndex, const nsXPTParamInfo * param, nsIInterfaceInfo **_retval) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->GetInfoForParam(methodIndex, param, _retval); }
     NS_IMETHOD GetIIDForParam(uint16_t methodIndex, const nsXPTParamInfo * param, nsIID * *_retval) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->GetIIDForParam(methodIndex, param, _retval); }
     NS_IMETHOD GetTypeForParam(uint16_t methodIndex, const nsXPTParamInfo * param, uint16_t dimension, nsXPTType *_retval) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->GetTypeForParam(methodIndex, param, dimension, _retval); }
     NS_IMETHOD GetSizeIsArgNumberForParam(uint16_t methodIndex, const nsXPTParamInfo * param, uint16_t dimension, uint8_t *_retval) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->GetSizeIsArgNumberForParam(methodIndex, param, dimension, _retval); }
     NS_IMETHOD GetInterfaceIsArgNumberForParam(uint16_t methodIndex, const nsXPTParamInfo * param, uint8_t *_retval) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->GetInterfaceIsArgNumberForParam(methodIndex, param, _retval); }
     NS_IMETHOD IsIID(const nsIID * IID, bool *_retval) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->IsIID(IID, _retval); }
     NS_IMETHOD GetNameShared(const char **name) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->GetNameShared(name); }
     NS_IMETHOD GetIIDShared(const nsIID * *iid) { return !mEntry ? NS_ERROR_UNEXPECTED : mEntry->GetIIDShared(iid); }
--- a/xpcom/typelib/xpt/public/xpt_struct.h
+++ b/xpcom/typelib/xpt/public/xpt_struct.h
@@ -9,19 +9,17 @@
  */
 
 #ifndef __xpt_struct_h__
 #define __xpt_struct_h__
 
 #include "xpt_arena.h"
 #include <stdint.h>
 
-#ifdef __cplusplus
 extern "C" {
-#endif
 
 /*
  * Originally, I was going to have structures that exactly matched the on-disk
  * representation, but that proved difficult: different compilers can pack
  * their structs differently, and that makes overlaying them atop a
  * read-from-disk byte buffer troublesome.  So now I just have some structures
  * that are used in memory, and we're going to write a nice XDR library to
  * write them to disk and stuff.  It is pure joy. -- shaver
@@ -513,13 +511,11 @@ struct XPTAnnotation {
 #define XPT_ANN_IS_LAST(flags)          (flags & XPT_ANN_LAST)
 #define XPT_ANN_PRIVATE                 0x40
 #define XPT_ANN_IS_PRIVATE(flags)       (flags & XPT_ANN_PRIVATE)
 
 extern XPT_PUBLIC_API(XPTAnnotation *)
 XPT_NewAnnotation(XPTArena *arena, uint8_t flags, XPTString *creator, 
                   XPTString *private_data);
 
-#ifdef __cplusplus
 }
-#endif
 
 #endif /* __xpt_struct_h__ */