summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/v8/ScriptDebugServer.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-01-06 21:36:31 +0000
committerBen Murdoch <benm@google.com>2011-01-07 10:36:05 +0000
commit4a156157940f51b91eadd76f6c86f862ec0a1da0 (patch)
treeee905fa007e14522848f571215c1054734db9269 /WebCore/bindings/v8/ScriptDebugServer.cpp
parent21d8d81a756ca7e60b5131e5f1006f52799179b0 (diff)
downloadexternal_webkit-4a156157940f51b91eadd76f6c86f862ec0a1da0.zip
external_webkit-4a156157940f51b91eadd76f6c86f862ec0a1da0.tar.gz
external_webkit-4a156157940f51b91eadd76f6c86f862ec0a1da0.tar.bz2
Merge WebKit at Chromium 9.0.597.55: trivial merge by git
Change-Id: I2c6f2ebc4431d15ac82b5b1a9f08159e1731bc57
Diffstat (limited to 'WebCore/bindings/v8/ScriptDebugServer.cpp')
-rw-r--r--WebCore/bindings/v8/ScriptDebugServer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/WebCore/bindings/v8/ScriptDebugServer.cpp b/WebCore/bindings/v8/ScriptDebugServer.cpp
index 7a8dbf7..9dfca55 100644
--- a/WebCore/bindings/v8/ScriptDebugServer.cpp
+++ b/WebCore/bindings/v8/ScriptDebugServer.cpp
@@ -113,8 +113,10 @@ void ScriptDebugServer::addListener(ScriptDebugListener* listener, Page* page)
}
m_listenersMap.set(page, listener);
- v8::Local<v8::Context> context = proxy->mainWorldContext();
-
+ V8DOMWindowShell* shell = proxy->windowShell();
+ if (!shell->isContextInitialized())
+ return;
+ v8::Handle<v8::Context> context = shell->context();
v8::Handle<v8::Function> getScriptsFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("getScripts")));
v8::Handle<v8::Value> argv[] = { context->GetData() };
v8::Handle<v8::Value> value = getScriptsFunction->Call(m_debuggerScript.get(), 1, argv);