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

Unified Diff: third_party/WebKit/Source/platform/heap/Heap.cpp

Issue 1502093002: Improve ScriptForbiddenScope handling in cross-threaded code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased up past r363426 Created 5 years 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: third_party/WebKit/Source/platform/heap/Heap.cpp
diff --git a/third_party/WebKit/Source/platform/heap/Heap.cpp b/third_party/WebKit/Source/platform/heap/Heap.cpp
index 0dc2f08ce9bda691f1909f4c577d5ea738496b5f..d1d40cecd69a74a6b92aa011b29b09f28e4ea7be 100644
--- a/third_party/WebKit/Source/platform/heap/Heap.cpp
+++ b/third_party/WebKit/Source/platform/heap/Heap.cpp
@@ -396,9 +396,7 @@ void Heap::collectGarbage(BlinkGC::StackState stackState, BlinkGC::GCType gcType
// Resume all parked threads upon leaving this scope.
ResumeThreadScope resumeThreads(gcType);
-
- if (state->isMainThread())
- ScriptForbiddenScope::enter();
+ ScriptForbiddenIfMainThreadScope scriptForbidden;
TRACE_EVENT2("blink_gc", "Heap::collectGarbage",
"lazySweeping", gcType == BlinkGC::GCWithoutSweep,
@@ -461,9 +459,6 @@ void Heap::collectGarbage(BlinkGC::StackState stackState, BlinkGC::GCType gcType
s_gcGeneration = 1;
}
#endif
-
- if (state->isMainThread())
- ScriptForbiddenScope::exit();
}
void Heap::collectGarbageForTerminatingThread(ThreadState* state)
« no previous file with comments | « third_party/WebKit/Source/platform/ScriptForbiddenScope.cpp ('k') | third_party/WebKit/Source/platform/heap/HeapPage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698