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

Unified Diff: src/isolate.cc

Issue 1246603002: Don't run the second pass of the pending phantom callbacks if the heap has been torn down. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: update Created 5 years, 5 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 | « src/isolate.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index e39912b00d80d87044d98612c4caebabda2c8edc..8cefdeb0a25483440b6b88532bae492b09661185 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1904,6 +1904,11 @@ void Isolate::Deinit() {
delete basic_block_profiler_;
basic_block_profiler_ = NULL;
+ for (CancelableTask* task : cancelable_tasks_) {
+ task->Cancel();
+ }
+ cancelable_tasks_.clear();
+
heap_.TearDown();
logger_->TearDown();
@@ -2783,6 +2788,18 @@ void Isolate::CheckDetachedContextsAfterGC() {
}
+void Isolate::RegisterCancelableTask(CancelableTask* task) {
+ cancelable_tasks_.insert(task);
+}
+
+
+void Isolate::RemoveCancelableTask(CancelableTask* task) {
+ auto removed = cancelable_tasks_.erase(task);
+ USE(removed);
+ DCHECK(removed == 1);
+}
+
+
bool StackLimitCheck::JsHasOverflowed(uintptr_t gap) const {
StackGuard* stack_guard = isolate_->stack_guard();
#ifdef USE_SIMULATOR
« no previous file with comments | « src/isolate.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698