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

Unified Diff: content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc

Issue 100963005: [Pepper] Handle plugin crash on QuotaReservation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +comment Created 6 years, 11 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
Index: content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
diff --git a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
index 2bc00423d7128975470d13cac3101f9f09878f61..4b13f43e456ee4ea4266c1fe92295c791c060455 100644
--- a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
+++ b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
@@ -64,6 +64,14 @@ PepperFileSystemBrowserHost::PepperFileSystemBrowserHost(BrowserPpapiHost* host,
}
PepperFileSystemBrowserHost::~PepperFileSystemBrowserHost() {
+ // If |files_| is not empty, the plugin failed to close some files. It must
+ // have crashed.
+ if (!files_.empty()) {
+ file_system_context_->default_file_task_runner()->PostTask(
+ FROM_HERE,
+ base::Bind(&QuotaReservation::OnClientCrash, quota_reservation_));
+ }
+
// All FileRefs and FileIOs that reference us must have been destroyed. Cancel
// all pending file system operations.
if (file_system_operation_runner_)
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_file_io_host.cc ('k') | content/browser/renderer_host/pepper/quota_reservation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698