From 4a156157940f51b91eadd76f6c86f862ec0a1da0 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Thu, 6 Jan 2011 21:36:31 +0000 Subject: Merge WebKit at Chromium 9.0.597.55: trivial merge by git Change-Id: I2c6f2ebc4431d15ac82b5b1a9f08159e1731bc57 --- WebCore/bindings/v8/ScriptDebugServer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'WebCore/bindings/v8/ScriptDebugServer.cpp') 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 context = proxy->mainWorldContext(); - + V8DOMWindowShell* shell = proxy->windowShell(); + if (!shell->isContextInitialized()) + return; + v8::Handle context = shell->context(); v8::Handle getScriptsFunction = v8::Local::Cast(m_debuggerScript.get()->Get(v8::String::New("getScripts"))); v8::Handle argv[] = { context->GetData() }; v8::Handle value = getScriptsFunction->Call(m_debuggerScript.get(), 1, argv); -- cgit v1.1