From 715be629d51174233403237bfc563cf150087dc8 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 25 Sep 2012 13:02:02 +0200 Subject: Imported WebKit commit ce614b0924ba46f78d4435e28ff93c8525fbb7cc (http://svn.webkit.org/repository/webkit/trunk@129485) New snapshot that includes MingW build fixes --- Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp') diff --git a/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp b/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp index e9a3e2836..c85965060 100644 --- a/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp +++ b/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp @@ -498,8 +498,8 @@ static double parseFloat(const String& s) EncodedJSValue JSC_HOST_CALL globalFuncEval(ExecState* exec) { JSObject* thisObject = exec->hostThisValue().toThisObject(exec); - JSObject* unwrappedObject = thisObject->unwrappedObject(); - if (!unwrappedObject->isGlobalObject() || jsCast(unwrappedObject)->evalFunction() != exec->callee()) + JSGlobalObject* calleeGlobalObject = exec->callee()->globalObject(); + if (thisObject != exec->callee()->globalObject()->globalThis()) return throwVMError(exec, createEvalError(exec, ASCIILiteral("The \"this\" value passed to eval must be the global object from which eval originated"))); JSValue x = exec->argument(0); @@ -519,11 +519,11 @@ EncodedJSValue JSC_HOST_CALL globalFuncEval(ExecState* exec) } EvalExecutable* eval = EvalExecutable::create(exec, makeSource(s), false); - JSObject* error = eval->compile(exec, jsCast(unwrappedObject)); + JSObject* error = eval->compile(exec, calleeGlobalObject); if (error) return throwVMError(exec, error); - return JSValue::encode(exec->interpreter()->execute(eval, exec, thisObject, jsCast(unwrappedObject))); + return JSValue::encode(exec->interpreter()->execute(eval, exec, thisObject, calleeGlobalObject)); } EncodedJSValue JSC_HOST_CALL globalFuncParseInt(ExecState* exec) -- cgit v1.2.1