summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium/src/WebDevToolsFrontendImpl.cpp')
-rw-r--r--WebKit/chromium/src/WebDevToolsFrontendImpl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp b/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
index 905bc6d..ea59ab6 100644
--- a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
@@ -92,7 +92,6 @@ WebDevToolsFrontendImpl::WebDevToolsFrontendImpl(
: m_webViewImpl(webViewImpl)
, m_client(client)
, m_applicationLocale(applicationLocale)
- , m_loaded(false)
{
InspectorController* ic = m_webViewImpl->page()->inspectorController();
ic->setInspectorFrontendClient(new InspectorFrontendClientImpl(m_webViewImpl->page(), m_client, this));
@@ -113,7 +112,9 @@ void WebDevToolsFrontendImpl::dispatchOnInspectorFrontend(const WebString& messa
v8::Handle<v8::Context> frameContext = V8Proxy::context(frame->frame());
v8::Context::Scope contextScope(frameContext);
v8::Handle<v8::Value> dispatchFunction = frameContext->Global()->Get(v8::String::New("WebInspector_syncDispatch"));
- ASSERT(dispatchFunction->IsFunction());
+ // The frame might have navigated away from the front-end page (which is still weird).
+ if (!dispatchFunction->IsFunction())
+ return;
v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(dispatchFunction);
Vector< v8::Handle<v8::Value> > args;
args.append(ToV8String(message));