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

Unified Diff: chrome/browser/renderer_host/async_resource_handler.cc

Issue 21222: Fix a browser crash when the async resource handler keeps an... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « base/shared_memory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/async_resource_handler.cc
===================================================================
--- chrome/browser/renderer_host/async_resource_handler.cc (revision 9407)
+++ chrome/browser/renderer_host/async_resource_handler.cc (working copy)
@@ -103,6 +103,8 @@
// it's killing our read_buffer_, and we don't want that when we pause
// the request.
rdh_->OnDataReceivedACK(render_process_host_id_, request_id);
+ // We just unmapped the memory.
+ read_buffer_ = NULL;
return false;
}
// We just unmapped the memory.
@@ -130,5 +132,8 @@
// static
void AsyncResourceHandler::GlobalCleanup() {
- spare_read_buffer_ = NULL;
+ if (spare_read_buffer_) {
+ spare_read_buffer_->Release();
+ spare_read_buffer_ = NULL;
+ }
}
« no previous file with comments | « base/shared_memory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698