mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix a crash due to m_resource being released while SubresourceLoader::didFinishLoading is executing (issue #439).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@398 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
15
patch/patches/webcore_subresloader.patch
Normal file
15
patch/patches/webcore_subresloader.patch
Normal file
@ -0,0 +1,15 @@
|
||||
Index: SubresourceLoader.cpp
|
||||
===================================================================
|
||||
--- SubresourceLoader.cpp (revision 100508)
|
||||
+++ SubresourceLoader.cpp (working copy)
|
||||
@@ -239,6 +239,10 @@
|
||||
LOG(ResourceLoading, "Received '%s'.", m_resource->url().string().latin1().data());
|
||||
|
||||
RefPtr<SubresourceLoader> protect(this);
|
||||
+ // If a load is canceled m_resource might be released in the call hierarchy originating
|
||||
+ // from m_resource->data(). This causes the subsequent call to m_reosurce->finish() to crash
|
||||
+ // unless m_resource is protected.
|
||||
+ CachedResourceHandle<CachedResource> protect_res(m_resource);
|
||||
m_state = Finishing;
|
||||
m_resource->setLoadFinishTime(finishTime);
|
||||
m_resource->data(resourceData(), true);
|
Reference in New Issue
Block a user