Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Unified Diff: Source/WebCore/inspector/InspectorResourceAgent.cpp

Issue 7819001: Merge 94078 - Web Inspector: Inspected page sometimes crashes in InspectorResourceAgent::didFailL... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/inspector/InspectorResourceAgent.cpp
===================================================================
--- Source/WebCore/inspector/InspectorResourceAgent.cpp (revision 94213)
+++ Source/WebCore/inspector/InspectorResourceAgent.cpp (working copy)
@@ -300,9 +300,13 @@
void InspectorResourceAgent::didFailLoading(unsigned long identifier, DocumentLoader* loader, const ResourceError& error)
{
String resourceId = IdentifiersFactory::resourceId(identifier);
- if (m_resourcesData->resourceType(resourceId) == InspectorPageAgent::DocumentResource)
- m_resourcesData->addResourceSharedBuffer(resourceId, loader->frameLoader()->documentLoader()->mainResourceData(), loader->frame()->document()->inputEncoding());
+ if (m_resourcesData->resourceType(resourceId) == InspectorPageAgent::DocumentResource) {
+ Frame* frame = loader ? loader->frame() : 0;
+ if (frame && frame->loader()->documentLoader() && frame->document())
+ m_resourcesData->addResourceSharedBuffer(resourceId, frame->loader()->documentLoader()->mainResourceData(), frame->document()->inputEncoding());
+ }
+
m_frontend->loadingFailed(resourceId, currentTime(), error.localizedDescription(), error.isCancellation());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698