summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-09-25 13:02:02 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-09-25 13:02:02 +0200
commit715be629d51174233403237bfc563cf150087dc8 (patch)
tree4cff72df808db977624338b0a38d8b6d1bd73c57 /Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
parentdc6262b587c71c14e30d93e57ed812e36a79a33e (diff)
downloadqtwebkit-715be629d51174233403237bfc563cf150087dc8.tar.gz
Imported WebKit commit ce614b0924ba46f78d4435e28ff93c8525fbb7cc (http://svn.webkit.org/repository/webkit/trunk@129485)
New snapshot that includes MingW build fixes
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp')
-rw-r--r--Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp8
1 files changed, 4 insertions, 4 deletions
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<JSGlobalObject*>(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<JSGlobalObject*>(unwrappedObject));
+ JSObject* error = eval->compile(exec, calleeGlobalObject);
if (error)
return throwVMError(exec, error);
- return JSValue::encode(exec->interpreter()->execute(eval, exec, thisObject, jsCast<JSGlobalObject*>(unwrappedObject)));
+ return JSValue::encode(exec->interpreter()->execute(eval, exec, thisObject, calleeGlobalObject));
}
EncodedJSValue JSC_HOST_CALL globalFuncParseInt(ExecState* exec)