Bug 617296. Window.URL should be replaceable. r=sicking, a=sicking
authorBoris Zbarsky <bzbarsky@mit.edu>
Wed, 08 Dec 2010 11:16:09 -0500
changeset 58898 35ea831c27abbe8630b6329bad3a69840a1671f1
parent 58897 048f8f89152b22b77104b80f473a74437d1ac4a4
child 58899 e68363d923898a5378964b9553cbe465b724f8e0
push idunknown
push userunknown
push dateunknown
reviewerssicking, sicking
bugs617296
milestone2.0b8pre
Bug 617296. Window.URL should be replaceable. r=sicking, a=sicking
dom/base/nsDOMClassInfo.cpp
dom/base/nsDOMClassInfo.h
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -1630,16 +1630,17 @@ jsid nsDOMClassInfo::sOntimeupdate_id   
 jsid nsDOMClassInfo::sOnended_id         = JSID_VOID;
 jsid nsDOMClassInfo::sOnratechange_id    = JSID_VOID;
 jsid nsDOMClassInfo::sOndurationchange_id= JSID_VOID;
 jsid nsDOMClassInfo::sOnvolumechange_id  = JSID_VOID;
 jsid nsDOMClassInfo::sOnmessage_id       = JSID_VOID;
 jsid nsDOMClassInfo::sOnbeforescriptexecute_id = JSID_VOID;
 jsid nsDOMClassInfo::sOnafterscriptexecute_id = JSID_VOID;
 jsid nsDOMClassInfo::sWrappedJSObject_id = JSID_VOID;
+jsid nsDOMClassInfo::sURL_id             = JSID_VOID;
 
 static const JSClass *sObjectClass = nsnull;
 
 /**
  * Set our JSClass pointer for the Object class
  */
 static void
 FindObjectClass(JSObject* aGlobalObject)
@@ -1855,16 +1856,17 @@ nsDOMClassInfo::DefineStaticJSVals(JSCon
   SET_JSID_TO_STRING(sOnratechange_id,    cx, "onratechange");
   SET_JSID_TO_STRING(sOndurationchange_id,cx, "ondurationchange");
   SET_JSID_TO_STRING(sOnvolumechange_id,  cx, "onvolumechange");
   SET_JSID_TO_STRING(sOnmessage_id,       cx, "onmessage");
   SET_JSID_TO_STRING(sOnbeforescriptexecute_id, cx, "onbeforescriptexecute");
   SET_JSID_TO_STRING(sOnafterscriptexecute_id, cx, "onafterscriptexecute");
 #endif // MOZ_MEDIA
   SET_JSID_TO_STRING(sWrappedJSObject_id, cx, "wrappedJSObject");
+  SET_JSID_TO_STRING(sURL_id,             cx, "URL");
 
   return NS_OK;
 }
 
 static nsresult
 CreateExceptionFromResult(JSContext *cx, nsresult aResult)
 {
   nsCOMPtr<nsIExceptionService> xs =
--- a/dom/base/nsDOMClassInfo.h
+++ b/dom/base/nsDOMClassInfo.h
@@ -227,17 +227,18 @@ protected:
             id == sStatusbar_id    ||
             id == sControllers_id  ||
             id == sScrollX_id      ||
             id == sScrollY_id      ||
             id == sScrollMaxX_id   ||
             id == sScrollMaxY_id   ||
             id == sLength_id       ||
             id == sFrames_id       ||
-            id == sSelf_id);
+            id == sSelf_id         ||
+            id == sURL_id);
   }
 
   static inline PRBool IsWritableReplaceable(jsid id)
   {
     return (id == sInnerHeight_id  ||
             id == sInnerWidth_id   ||
             id == sOpener_id       ||
             id == sOuterHeight_id  ||
@@ -384,16 +385,17 @@ protected:
   static jsid sOnended_id;
   static jsid sOnratechange_id;
   static jsid sOndurationchange_id;
   static jsid sOnvolumechange_id;
   static jsid sOnmessage_id;
   static jsid sOnbeforescriptexecute_id;
   static jsid sOnafterscriptexecute_id;
   static jsid sWrappedJSObject_id;
+  static jsid sURL_id;
 
   static JSPropertyOp sXPCNativeWrapperGetPropertyOp;
   static JSPropertyOp sXrayWrapperPropertyHolderGetPropertyOp;
 };
 
 
 inline
 const nsQueryInterface