Backing out fixes for bug 416931 due to the JS property tree blowing up in size due to this change.

git-svn-id: svn://10.0.0.236/trunk@245861 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%mozilla.org 2008-02-17 04:07:51 +00:00
parent b5714259b1
commit abc1e27c4d

View File

@ -4601,41 +4601,7 @@ nsWindowSH::SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
return NS_FAILED(rv) ? rv : NS_SUCCESS_I_DID_SOMETHING;
}
if (JSVAL_IS_STRING(id)) {
// Let the event receiver helper deal with event handler
// properties, all other properties that make it here are handled
// below.
if (IsEventName(id)) {
return nsEventReceiverSH::SetProperty(wrapper, cx, obj, id, vp, _retval);
}
if (win->IsInnerWindow()) {
// Define a fast expando so that we can access this global script
// defined property w/o going through XPConnect.
JSString *str = JSVAL_TO_STRING(id);
jschar *name = ::JS_GetStringChars(str);
size_t length = ::JS_GetStringLength(str);
uintN attrs;
JSBool found;
if (!::JS_GetUCPropertyAttributes(cx, obj, name, length,
&attrs, &found)) {
*_retval = PR_FALSE;
return NS_OK;
}
if (!::JS_DefineUCProperty(cx, obj, name, length, *vp,
JS_PropertyStub, JS_PropertyStub,
attrs & (JSPROP_ENUMERATE |
JSPROP_PERMANENT))) {
*_retval = PR_FALSE;
return NS_OK;
}
}
}
return NS_OK;
return nsEventReceiverSH::SetProperty(wrapper, cx, obj, id, vp, _retval);
}
NS_IMETHODIMP