Bug 962290. Remove support for the JavaScript-global-dynamic-nameset category as a way to install lazy properties on the global. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 29 Jan 2014 22:33:10 -0800
changeset 181956 9e1b8cf5f2b269b80439a20837085f9b17e7bd09
parent 181955 0b7dba29d960938c1861cebf067646cfdd359075
child 181957 16fd42fa8fc871c670501f80cd1dbf2d54ed675e
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs962290
milestone29.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 962290. Remove support for the JavaScript-global-dynamic-nameset category as a way to install lazy properties on the global. r=peterv
dom/base/nsDOMClassInfo.cpp
dom/base/nsIScriptNameSpaceManager.h
dom/base/nsScriptNameSpaceManager.cpp
dom/base/nsScriptNameSpaceManager.h
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -3074,29 +3074,16 @@ nsWindowSH::GlobalResolve(nsGlobalWindow
                                       JS_PropertyStub, JS_StrictPropertyStub,
                                       JSPROP_ENUMERATE);
 
     *did_resolve = true;
 
     return ok ? NS_OK : NS_ERROR_FAILURE;
   }
 
-  if (name_struct->mType == nsGlobalNameStruct::eTypeDynamicNameSet) {
-    nsCOMPtr<nsIScriptExternalNameSet> nameset =
-      do_CreateInstance(name_struct->mCID, &rv);
-    NS_ENSURE_SUCCESS(rv, rv);
-
-    nsIScriptContext *context = aWin->GetContext();
-    NS_ENSURE_TRUE(context, NS_ERROR_UNEXPECTED);
-
-    rv = nameset->InitializeNameSet(context);
-
-    *did_resolve = true;
-  }
-
   return rv;
 }
 
 template<class Interface>
 static nsresult
 LocationSetterGuts(JSContext *cx, JSObject *obj, JS::MutableHandle<JS::Value> vp)
 {
   // This function duplicates some of the logic in XPC_WN_HelperSetProperty
--- a/dom/base/nsIScriptNameSpaceManager.h
+++ b/dom/base/nsIScriptNameSpaceManager.h
@@ -20,18 +20,15 @@
   "JavaScript-global-privileged-property"
 
 #define JAVASCRIPT_NAVIGATOR_PROPERTY_CATEGORY \
   "JavaScript-navigator-property"
 
 #define JAVASCRIPT_GLOBAL_STATIC_NAMESET_CATEGORY \
   "JavaScript-global-static-nameset"
 
-#define JAVASCRIPT_GLOBAL_DYNAMIC_NAMESET_CATEGORY \
-  "JavaScript-global-dynamic-nameset"
-
 #define JAVASCRIPT_DOM_CLASS \
   "JavaScript-DOM-class"
 
 #define JAVASCRIPT_DOM_INTERFACE \
   "JavaScript-DOM-interface"
 
 #endif /* nsIScriptNameSpaceManager_h__ */
--- a/dom/base/nsScriptNameSpaceManager.cpp
+++ b/dom/base/nsScriptNameSpaceManager.cpp
@@ -364,19 +364,16 @@ nsScriptNameSpaceManager::Init()
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = FillHash(cm, JAVASCRIPT_GLOBAL_PRIVILEGED_PROPERTY_CATEGORY);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = FillHash(cm, JAVASCRIPT_GLOBAL_STATIC_NAMESET_CATEGORY);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  rv = FillHash(cm, JAVASCRIPT_GLOBAL_DYNAMIC_NAMESET_CATEGORY);
-  NS_ENSURE_SUCCESS(rv, rv);
-
   rv = FillHash(cm, JAVASCRIPT_NAVIGATOR_PROPERTY_CATEGORY);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Initial filling of the has table has been done.
   // Now, listen for changes.
   nsCOMPtr<nsIObserverService> serv = 
     mozilla::services::GetObserverService();
 
@@ -621,18 +618,16 @@ nsScriptNameSpaceManager::OperateCategor
     type = nsGlobalNameStruct::eTypeExternalConstructor;
   } else if (strcmp(aCategory, JAVASCRIPT_GLOBAL_PROPERTY_CATEGORY) == 0 ||
              strcmp(aCategory, JAVASCRIPT_GLOBAL_PRIVILEGED_PROPERTY_CATEGORY) == 0) {
     type = nsGlobalNameStruct::eTypeProperty;
   } else if (strcmp(aCategory, JAVASCRIPT_NAVIGATOR_PROPERTY_CATEGORY) == 0) {
     type = nsGlobalNameStruct::eTypeNavigatorProperty;
   } else if (strcmp(aCategory, JAVASCRIPT_GLOBAL_STATIC_NAMESET_CATEGORY) == 0) {
     type = nsGlobalNameStruct::eTypeStaticNameSet;
-  } else if (strcmp(aCategory, JAVASCRIPT_GLOBAL_DYNAMIC_NAMESET_CATEGORY) == 0) {
-    type = nsGlobalNameStruct::eTypeDynamicNameSet;
   } else {
     return NS_OK;
   }
 
   nsCOMPtr<nsISupportsCString> strWrapper = do_QueryInterface(aEntry);
 
   if (!strWrapper) {
     NS_WARNING("Category entry not an nsISupportsCString!");
--- a/dom/base/nsScriptNameSpaceManager.h
+++ b/dom/base/nsScriptNameSpaceManager.h
@@ -45,17 +45,16 @@ struct nsGlobalNameStruct
   enum nametype {
     eTypeNotInitialized,
     eTypeNewDOMBinding,
     eTypeInterface,
     eTypeProperty,
     eTypeNavigatorProperty,
     eTypeExternalConstructor,
     eTypeStaticNameSet,
-    eTypeDynamicNameSet,
     eTypeClassConstructor,
     eTypeClassProto,
     eTypeExternalClassInfoCreator,
     eTypeExternalClassInfo,
     eTypeExternalConstructorAlias
   } mType;
 
   // mChromeOnly is only used for structs that define non-WebIDL things