Fixing bug 420603. Don't run scripts while wrapping DOM objects. r=mrbkap@gmail.com, sr=peterv@propagandism.org

This commit is contained in:
jst@mozilla.org 2008-03-17 14:19:25 -07:00
Родитель 8526e3080d
Коммит 0e83f61a8d
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -3775,7 +3775,7 @@ nsDOMClassInfo::ResolveConstructor(JSContext *cx, JSObject *obj,
jsval val;
JSAutoRequest ar(cx);
if (!::JS_GetProperty(cx, global, mData->mName, &val)) {
if (!::JS_LookupProperty(cx, global, mData->mName, &val)) {
return NS_ERROR_UNEXPECTED;
}
@ -5426,14 +5426,14 @@ nsWindowSH::GlobalResolve(nsGlobalWindow *aWin, JSContext *cx,
if (class_parent_name) {
jsval val;
if (!::JS_GetProperty(cx, obj, CutPrefix(class_parent_name), &val)) {
if (!::JS_LookupProperty(cx, obj, CutPrefix(class_parent_name), &val)) {
return NS_ERROR_UNEXPECTED;
}
JSObject *tmp = JSVAL_IS_OBJECT(val) ? JSVAL_TO_OBJECT(val) : nsnull;
if (tmp) {
if (!::JS_GetProperty(cx, tmp, "prototype", &val)) {
if (!::JS_LookupProperty(cx, tmp, "prototype", &val)) {
return NS_ERROR_UNEXPECTED;
}