зеркало из https://github.com/mozilla/pjs.git
Use JS_DefineProperty instead of JS_SetProperty for the additional control over the property we're setting. bug 330773, r+sr=jst
This commit is contained in:
Родитель
f2238ef436
Коммит
6aba6ed88c
|
@ -5508,7 +5508,8 @@ nsWindowSH::GlobalResolve(nsGlobalWindow *aWin, JSContext *cx,
|
|||
|
||||
v = OBJECT_TO_JSVAL(dot_prototype);
|
||||
|
||||
if (!::JS_SetProperty(cx, class_obj, "prototype", &v)) {
|
||||
if (!::JS_DefineProperty(cx, class_obj, "prototype", v, NULL, NULL,
|
||||
JSPROP_ENUMERATE)) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче