зеркало из https://github.com/mozilla/gecko-dev.git
Fixing bug 417266. Don't call IsEventName() with non-string jsvals. r+sr=jonas@sicking.cc
This commit is contained in:
Родитель
5fd5861767
Коммит
ce2c246576
|
@ -4601,17 +4601,18 @@ nsWindowSH::SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||||
return NS_FAILED(rv) ? rv : NS_SUCCESS_I_DID_SOMETHING;
|
return NS_FAILED(rv) ? rv : NS_SUCCESS_I_DID_SOMETHING;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Let the event receiver helper deal with event handler properties,
|
if (JSVAL_IS_STRING(id)) {
|
||||||
// all other properties that make it here are handled below.
|
// Let the event receiver helper deal with event handler
|
||||||
if (IsEventName(id)) {
|
// properties, all other properties that make it here are handled
|
||||||
return nsEventReceiverSH::SetProperty(wrapper, cx, obj, id, vp, _retval);
|
// below.
|
||||||
}
|
if (IsEventName(id)) {
|
||||||
|
return nsEventReceiverSH::SetProperty(wrapper, cx, obj, id, vp, _retval);
|
||||||
|
}
|
||||||
|
|
||||||
if (win->IsInnerWindow()) {
|
if (win->IsInnerWindow()) {
|
||||||
// Define a fast expando so that we can access this global script
|
// Define a fast expando so that we can access this global script
|
||||||
// defined property w/o going through XPConnect.
|
// defined property w/o going through XPConnect.
|
||||||
|
|
||||||
if (JSVAL_IS_STRING(id)) {
|
|
||||||
JSString *str = JSVAL_TO_STRING(id);
|
JSString *str = JSVAL_TO_STRING(id);
|
||||||
|
|
||||||
::JS_DefineUCProperty(cx, obj, ::JS_GetStringChars(str),
|
::JS_DefineUCProperty(cx, obj, ::JS_GetStringChars(str),
|
||||||
|
|
Загрузка…
Ссылка в новой задаче