Index: Source/WebCore/bindings/v8/V8Proxy.cpp |
=================================================================== |
--- Source/WebCore/bindings/v8/V8Proxy.cpp (revision 108090) |
+++ Source/WebCore/bindings/v8/V8Proxy.cpp (working copy) |
@@ -378,7 +378,7 @@ |
v8::TryCatch tryCatch; |
tryCatch.SetVerbose(true); |
{ |
- V8RecursionScope recursionScope; |
+ V8RecursionScope recursionScope(frame()->document()); |
result = script->Run(); |
} |
@@ -404,10 +404,10 @@ |
{ |
// Keep Frame (and therefore ScriptController and V8Proxy) alive. |
RefPtr<Frame> protect(frame()); |
- return V8Proxy::instrumentedCallFunction(m_frame->page(), function, receiver, argc, args); |
+ return V8Proxy::instrumentedCallFunction(frame(), function, receiver, argc, args); |
} |
-v8::Local<v8::Value> V8Proxy::instrumentedCallFunction(Page* page, v8::Handle<v8::Function> function, v8::Handle<v8::Object> receiver, int argc, v8::Handle<v8::Value> args[]) |
+v8::Local<v8::Value> V8Proxy::instrumentedCallFunction(Frame* frame, v8::Handle<v8::Function> function, v8::Handle<v8::Object> receiver, int argc, v8::Handle<v8::Value> args[]) |
{ |
V8GCController::checkMemoryUsage(); |
@@ -415,7 +415,7 @@ |
return handleMaxRecursionDepthExceeded(); |
InspectorInstrumentationCookie cookie; |
- if (InspectorInstrumentation::hasFrontends()) { |
+ if (InspectorInstrumentation::hasFrontends() && frame) { |
String resourceName("undefined"); |
int lineNumber = 1; |
v8::ScriptOrigin origin = function->GetScriptOrigin(); |
@@ -423,12 +423,12 @@ |
resourceName = toWebCoreString(origin.ResourceName()); |
lineNumber = function->GetScriptLineNumber() + 1; |
} |
- cookie = InspectorInstrumentation::willCallFunction(page, resourceName, lineNumber); |
+ cookie = InspectorInstrumentation::willCallFunction(frame->page(), resourceName, lineNumber); |
} |
v8::Local<v8::Value> result; |
{ |
- V8RecursionScope recursionScope; |
+ V8RecursionScope recursionScope(frame ? frame->document() : 0); |
result = function->Call(receiver, argc, args); |
} |