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
parent 7abf41753e
commit 032c34a20c

View File

@ -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;
}