Index: Source/bindings/core/v8/PageScriptDebugServer.cpp |
diff --git a/Source/bindings/core/v8/PageScriptDebugServer.cpp b/Source/bindings/core/v8/PageScriptDebugServer.cpp |
index 309cc2afcca12499c017cdb6693f299916f0d791..68a89ca5ce978f1c3dbd948074cbde141b227f50 100644 |
--- a/Source/bindings/core/v8/PageScriptDebugServer.cpp |
+++ b/Source/bindings/core/v8/PageScriptDebugServer.cpp |
@@ -40,6 +40,7 @@ |
#include "bindings/core/v8/WindowProxy.h" |
#include "core/frame/FrameConsole.h" |
#include "core/frame/FrameHost.h" |
+#include "core/frame/FrameProtector.h" |
#include "core/frame/LocalFrame.h" |
#include "core/frame/UseCounter.h" |
#include "core/inspector/InspectorInstrumentation.h" |
@@ -171,7 +172,7 @@ void PageScriptDebugServer::setClientMessageLoop(PassOwnPtr<ClientMessageLoop> c |
void PageScriptDebugServer::compileScript(ScriptState* scriptState, const String& expression, const String& sourceURL, String* scriptId, String* exceptionDetailsText, int* lineNumber, int* columnNumber, RefPtrWillBeRawPtr<ScriptCallStack>* stackTrace) |
{ |
ExecutionContext* executionContext = scriptState->executionContext(); |
- RefPtr<LocalFrame> protect = toDocument(executionContext)->frame(); |
+ FrameProtector protect(toDocument(executionContext)->frame()); |
ScriptDebugServer::compileScript(scriptState, expression, sourceURL, scriptId, exceptionDetailsText, lineNumber, columnNumber, stackTrace); |
if (!scriptId->isNull()) |
m_compiledScriptURLs.set(*scriptId, sourceURL); |
@@ -196,7 +197,7 @@ void PageScriptDebugServer::runScript(ScriptState* scriptState, const String& sc |
if (frame) |
cookie = InspectorInstrumentation::willEvaluateScript(frame, sourceURL, TextPosition::minimumPosition().m_line.oneBasedInt()); |
- RefPtr<LocalFrame> protect = frame; |
+ FrameProtector protect(frame); |
ScriptDebugServer::runScript(scriptState, scriptId, result, wasThrown, exceptionDetailsText, lineNumber, columnNumber, stackTrace); |
if (frame) |