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

Unified Diff: third_party/WebKit/Source/platform/scheduler/child/idle_helper.h

Issue 2487343004: Make sure scheduler shutdown prevents idle tasks from running (Closed)
Patch Set: Added a test which fails without the patch. Created 4 years, 1 month 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 | third_party/WebKit/Source/platform/scheduler/child/idle_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/scheduler/child/idle_helper.h
diff --git a/third_party/WebKit/Source/platform/scheduler/child/idle_helper.h b/third_party/WebKit/Source/platform/scheduler/child/idle_helper.h
index 5cf7199f90084b38de7d92eea4f7482754818e96..5f0ccd7a182598f7c092feb79723a7680045d453 100644
--- a/third_party/WebKit/Source/platform/scheduler/child/idle_helper.h
+++ b/third_party/WebKit/Source/platform/scheduler/child/idle_helper.h
@@ -94,6 +94,9 @@ class BLINK_PLATFORM_EXPORT IdleHelper
base::TimeDelta required_quiescence_duration_before_long_idle_period);
~IdleHelper() override;
+ // Prevents any further idle tasks from running.
+ void Shutdown();
+
// Returns the idle task runner. Tasks posted to this runner may be reordered
// relative to other task types and may be starved for an arbitrarily long
// time if no idle time is available.
@@ -229,6 +232,8 @@ class BLINK_PLATFORM_EXPORT IdleHelper
const char* disabled_by_default_tracing_category_;
+ bool is_shutdown_;
+
base::WeakPtr<IdleHelper> weak_idle_helper_ptr_;
base::WeakPtrFactory<IdleHelper> weak_factory_;
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/child/idle_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698