From 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 9 Feb 2012 14:16:12 +0100 Subject: Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223) --- Source/JavaScriptCore/interpreter/Interpreter.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Source/JavaScriptCore/interpreter/Interpreter.cpp') diff --git a/Source/JavaScriptCore/interpreter/Interpreter.cpp b/Source/JavaScriptCore/interpreter/Interpreter.cpp index 51843f2d2..d42e869f1 100644 --- a/Source/JavaScriptCore/interpreter/Interpreter.cpp +++ b/Source/JavaScriptCore/interpreter/Interpreter.cpp @@ -885,6 +885,8 @@ JSValue Interpreter::execute(ProgramExecutable* program, CallFrame* callFrame, S Vector JSONPData; bool parseResult; const UString programSource = program->source().toString(); + if (programSource.isNull()) + return jsUndefined(); if (programSource.is8Bit()) { LiteralParser literalParser(callFrame, programSource.characters8(), programSource.length(), JSONP); parseResult = literalParser.tryJSONPParse(JSONPData, scopeChain->globalObject->globalObjectMethodTable()->supportsRichSourceInfo(scopeChain->globalObject.get())); @@ -5126,11 +5128,12 @@ JSValue Interpreter::retrieveCallerFromVMCode(CallFrame* callFrame, JSFunction* CallFrame* functionCallFrame = findFunctionCallFrameFromVMCode(callFrame, function); if (!functionCallFrame) return jsNull(); - - CallFrame* callerFrame = functionCallFrame->callerFrame(); - if (callerFrame->hasHostCallFrameFlag()) + + if (functionCallFrame->callerFrame()->hasHostCallFrameFlag()) return jsNull(); + CallFrame* callerFrame = functionCallFrame->trueCallerFrame(); + JSValue caller = callerFrame->callee(); if (!caller) return jsNull(); -- cgit v1.2.1