Fixing bug 417266. Don't call IsEventName() with non-string jsvals. r+sr=jonas@sicking.cc

This commit is contained in:
jst@mozilla.org 2008-02-13 22:11:36 -08:00
Родитель 5fd5861767
Коммит ce2c246576
1 изменённых файлов: 10 добавлений и 9 удалений

Просмотреть файл

@ -4601,17 +4601,18 @@ nsWindowSH::SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
return NS_FAILED(rv) ? rv : NS_SUCCESS_I_DID_SOMETHING;
}
// 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 (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.
if (win->IsInnerWindow()) {
// Define a fast expando so that we can access this global script
// defined property w/o going through XPConnect.
if (JSVAL_IS_STRING(id)) {
JSString *str = JSVAL_TO_STRING(id);
::JS_DefineUCProperty(cx, obj, ::JS_GetStringChars(str),