Remove a now-unnecessary eval hack. bug 420642, r+sr=jst a=beltzner

This commit is contained in:
mrbkap@gmail.com 2008-03-06 12:01:26 -08:00
parent fd77553679
commit ca37844efe
2 changed files with 0 additions and 21 deletions

View File

@ -381,13 +381,6 @@ WrapSameOriginProp(JSContext *cx, JSObject *outerObj, jsval *vp)
return XPC_XOW_WrapObject(cx, STOBJ_GET_PARENT(outerObj), vp);
}
if (JS_ObjectIsFunction(cx, wrappedObj) &&
JS_GetFunctionNative(cx, reinterpret_cast<JSFunction *>
(xpc_GetJSPrivate(wrappedObj))) ==
XPCWrapper::sEvalNative) {
return XPC_XOW_WrapFunction(cx, outerObj, wrappedObj, vp);
}
return JS_TRUE;
}

View File

@ -353,20 +353,6 @@ XPCWrapper::NewResolve(JSContext *cx, JSObject *wrapperObj,
OBJ_DROP_PROPERTY(cx, innerObjp, prop);
// Hack alert: we only do this for same-origin calls on XOWs: we want
// to preserve 'eval' function wrapper on the wrapper object itself
// to preserve eval's identity.
if (!preserveVal && isXOW && !JSVAL_IS_PRIMITIVE(v)) {
JSObject *obj = JSVAL_TO_OBJECT(v);
if (JS_ObjectIsFunction(cx, obj)) {
JSFunction *fun = reinterpret_cast<JSFunction *>(xpc_GetJSPrivate(obj));
if (JS_GetFunctionNative(cx, fun) == sEvalNative &&
!WrapFunction(cx, wrapperObj, obj, &v, JS_FALSE)) {
return JS_FALSE;
}
}
}
jsval oldSlotVal;
if (!::JS_GetReservedSlot(cx, wrapperObj, sResolvingSlot, &oldSlotVal) ||
!::JS_SetReservedSlot(cx, wrapperObj, sResolvingSlot, JSVAL_TRUE)) {