Fixing bug 189494. Making window.frames replaceable. r=fabian@guisset.org, sr=peterv@netscape.com, a=asa@mozilla.org

This commit is contained in:
jst%netscape.com 2003-02-14 01:59:52 +00:00
parent dcc6361443
commit c735423014
3 changed files with 8 additions and 2 deletions

View File

@ -88,8 +88,9 @@ interface nsIDOMJSWindow : nsISupports
* window itself (i.e. window.frames === window), but this doesn't
* make sense from a generic API point of view so that's why this is
* JS specific.
*
* This property is "replaceable" in JavaScript.
*/
readonly attribute nsIDOMWindow frames;
/* Scriptable version of find(). See nsIDOMWindowInternal for the

View File

@ -873,6 +873,7 @@ jsval nsDOMClassInfo::sEnumerate_id = JSVAL_VOID;
jsval nsDOMClassInfo::sNavigator_id = JSVAL_VOID;
jsval nsDOMClassInfo::sDocument_id = JSVAL_VOID;
jsval nsDOMClassInfo::sWindow_id = JSVAL_VOID;
jsval nsDOMClassInfo::sFrames_id = JSVAL_VOID;
const JSClass *nsDOMClassInfo::sObjectClass = nsnull;
@ -970,6 +971,7 @@ nsDOMClassInfo::DefineStaticJSVals(JSContext *cx)
SET_JSVAL_TO_STRING(sNavigator_id, cx, "navigator");
SET_JSVAL_TO_STRING(sDocument_id, cx, "document");
SET_JSVAL_TO_STRING(sWindow_id, cx, "window");
SET_JSVAL_TO_STRING(sFrames_id, cx, "frames");
return NS_OK;
}
@ -2794,6 +2796,7 @@ nsDOMClassInfo::ShutDown()
sNavigator_id = JSVAL_VOID;
sDocument_id = JSVAL_VOID;
sWindow_id = JSVAL_VOID;
sFrames_id = JSVAL_VOID;
NS_IF_RELEASE(sXPConnect);
NS_IF_RELEASE(sSecMan);

View File

@ -162,7 +162,8 @@ protected:
id == sControllers_id ||
id == sScrollX_id ||
id == sScrollY_id ||
id == sLength_id);
id == sLength_id ||
id == sFrames_id);
}
static inline PRBool IsWritableReplaceable(jsval id)
@ -248,6 +249,7 @@ protected:
static jsval sNavigator_id;
static jsval sDocument_id;
static jsval sWindow_id;
static jsval sFrames_id;
static const JSClass *sObjectClass;