From 29510e2913ef85b709eaf47b4f541c32e546ce5d Mon Sep 17 00:00:00 2001 From: "vsevik@chromium.org" Date: Fri, 23 Sep 2011 10:46:54 +0000 Subject: [PATCH] ASSERTION FAILED: documentLoader in WebKit/Source/WebCore/inspector/InspectorInstrumentation.cpp(597) https://bugs.webkit.org/show_bug.cgi?id=68291 Reviewed by Tony Chang. * dom/Document.cpp: (WebCore::Document::finishedParsing): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl): (WebCore::InspectorInstrumentation::loadEventFiredImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::domContentLoadedEventFired): (WebCore::InspectorInstrumentation::loadEventFired): * page/DOMWindow.cpp: (WebCore::DOMWindow::dispatchLoadEvent): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95790 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 18 ++++++++++++++++++ Source/WebCore/dom/Document.cpp | 2 +- Source/WebCore/inspector/InspectorInstrumentation.cpp | 16 +++++----------- Source/WebCore/inspector/InspectorInstrumentation.h | 16 ++++++++-------- Source/WebCore/page/DOMWindow.cpp | 2 +- 5 files changed, 33 insertions(+), 21 deletions(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 84532b1..1c7183d 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,21 @@ +2011-09-23 Vsevolod Vlasov + + ASSERTION FAILED: documentLoader in WebKit/Source/WebCore/inspector/InspectorInstrumentation.cpp(597) + https://bugs.webkit.org/show_bug.cgi?id=68291 + + Reviewed by Tony Chang. + + * dom/Document.cpp: + (WebCore::Document::finishedParsing): + * inspector/InspectorInstrumentation.cpp: + (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl): + (WebCore::InspectorInstrumentation::loadEventFiredImpl): + * inspector/InspectorInstrumentation.h: + (WebCore::InspectorInstrumentation::domContentLoadedEventFired): + (WebCore::InspectorInstrumentation::loadEventFired): + * page/DOMWindow.cpp: + (WebCore::DOMWindow::dispatchLoadEvent): + 2011-09-22 Tony Chang implement -webkit-flex-order diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp index d6a252c..3817806 100644 --- a/Source/WebCore/dom/Document.cpp +++ b/Source/WebCore/dom/Document.cpp @@ -4284,7 +4284,7 @@ void Document::finishedParsing() f->loader()->finishedParsing(); - InspectorInstrumentation::domContentLoadedEventFired(f.get(), url()); + InspectorInstrumentation::domContentLoadedEventFired(f.get()); } } diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp index 49ddfc5..bef6d14 100644 --- a/Source/WebCore/inspector/InspectorInstrumentation.cpp +++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp @@ -570,12 +570,9 @@ void InspectorInstrumentation::didReceiveScriptResponseImpl(InstrumentingAgents* resourceAgent->didReceiveScriptResponse(identifier); } -void InspectorInstrumentation::domContentLoadedEventFiredImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, const KURL& url) +void InspectorInstrumentation::domContentLoadedEventFiredImpl(InstrumentingAgents* instrumentingAgents, Frame* frame) { - DocumentLoader* documentLoader = frame->loader()->documentLoader(); - ASSERT(documentLoader); - - if (frame->page()->mainFrame() != frame || url != documentLoader->requestURL()) + if (frame->page()->mainFrame() != frame) return; if (InspectorAgent* inspectorAgent = instrumentingAgents->inspectorAgent()) @@ -591,15 +588,12 @@ void InspectorInstrumentation::domContentLoadedEventFiredImpl(InstrumentingAgent pageAgent->domContentEventFired(); } -void InspectorInstrumentation::loadEventFiredImpl(InstrumentingAgents* instrumentingAgents, Frame* frame, const KURL& url) +void InspectorInstrumentation::loadEventFiredImpl(InstrumentingAgents* instrumentingAgents, Frame* frame) { - DocumentLoader* documentLoader = frame->loader()->documentLoader(); - ASSERT(documentLoader); - if (InspectorDOMAgent* domAgent = instrumentingAgents->inspectorDOMAgent()) - domAgent->loadEventFired(documentLoader->frame()->document()); + domAgent->loadEventFired(frame->document()); - if (frame->page()->mainFrame() != frame || url != documentLoader->requestURL()) + if (frame->page()->mainFrame() != frame) return; if (InspectorTimelineAgent* timelineAgent = instrumentingAgents->inspectorTimelineAgent()) diff --git a/Source/WebCore/inspector/InspectorInstrumentation.h b/Source/WebCore/inspector/InspectorInstrumentation.h index b698125..ed95015 100644 --- a/Source/WebCore/inspector/InspectorInstrumentation.h +++ b/Source/WebCore/inspector/InspectorInstrumentation.h @@ -138,8 +138,8 @@ public: static void didLoadXHRSynchronously(ScriptExecutionContext*); static void scriptImported(ScriptExecutionContext*, unsigned long identifier, const String& sourceString); static void didReceiveScriptResponse(ScriptExecutionContext*, unsigned long identifier); - static void domContentLoadedEventFired(Frame*, const KURL&); - static void loadEventFired(Frame*, const KURL&); + static void domContentLoadedEventFired(Frame*); + static void loadEventFired(Frame*); static void frameDetachedFromParent(Frame*); static void didCommitLoad(Frame*, DocumentLoader*); static void loaderDetachedFromFrame(Frame*, DocumentLoader*); @@ -272,8 +272,8 @@ private: static void didLoadXHRSynchronouslyImpl(InstrumentingAgents*); static void scriptImportedImpl(InstrumentingAgents*, unsigned long identifier, const String& sourceString); static void didReceiveScriptResponseImpl(InstrumentingAgents*, unsigned long identifier); - static void domContentLoadedEventFiredImpl(InstrumentingAgents*, Frame*, const KURL&); - static void loadEventFiredImpl(InstrumentingAgents*, Frame*, const KURL&); + static void domContentLoadedEventFiredImpl(InstrumentingAgents*, Frame*); + static void loadEventFiredImpl(InstrumentingAgents*, Frame*); static void frameDetachedFromParentImpl(InstrumentingAgents*, Frame*); static void didCommitLoadImpl(InstrumentingAgents*, Page*, DocumentLoader*); static void loaderDetachedFromFrameImpl(InstrumentingAgents*, DocumentLoader*); @@ -867,19 +867,19 @@ inline void InspectorInstrumentation::didReceiveScriptResponse(ScriptExecutionCo #endif } -inline void InspectorInstrumentation::domContentLoadedEventFired(Frame* frame, const KURL& url) +inline void InspectorInstrumentation::domContentLoadedEventFired(Frame* frame) { #if ENABLE(INSPECTOR) if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame)) - domContentLoadedEventFiredImpl(instrumentingAgents, frame, url); + domContentLoadedEventFiredImpl(instrumentingAgents, frame); #endif } -inline void InspectorInstrumentation::loadEventFired(Frame* frame, const KURL& url) +inline void InspectorInstrumentation::loadEventFired(Frame* frame) { #if ENABLE(INSPECTOR) if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame)) - loadEventFiredImpl(instrumentingAgents, frame, url); + loadEventFiredImpl(instrumentingAgents, frame); #endif } diff --git a/Source/WebCore/page/DOMWindow.cpp b/Source/WebCore/page/DOMWindow.cpp index 47cb368..e2c1c2d 100644 --- a/Source/WebCore/page/DOMWindow.cpp +++ b/Source/WebCore/page/DOMWindow.cpp @@ -1580,7 +1580,7 @@ void DOMWindow::dispatchLoadEvent() if (ownerElement) ownerElement->dispatchEvent(Event::create(eventNames().loadEvent, false, false)); - InspectorInstrumentation::loadEventFired(frame(), url()); + InspectorInstrumentation::loadEventFired(frame()); } bool DOMWindow::dispatchEvent(PassRefPtr prpEvent, PassRefPtr prpTarget) -- 2.7.4