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

Unified Diff: src/heap-inl.h

Issue 14796014: Parallel compilation fix: the optimizer thread shouldn't change the allow allocation state on Asser… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added TODO for Yang Created 7 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-inl.h
diff --git a/src/heap-inl.h b/src/heap-inl.h
index 18a2cf351b33f1eb2886fe8b8658519159a445b1..b71978baf545b42e3034c96d0c14e514e4cd42a9 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -872,6 +872,8 @@ bool EnterAllocationScope(Isolate* isolate, bool allow_allocation) {
bool active = !isolate->optimizing_compiler_thread()->IsOptimizerThread();
bool last_state = isolate->heap()->IsAllocationAllowed();
if (active) {
+ // TODO(yangguo): Make HandleDereferenceGuard avoid isolate mutation in the
+ // same way if running on the optimizer thread.
isolate->heap()->set_allow_allocation(allow_allocation);
}
return last_state;
@@ -879,7 +881,10 @@ bool EnterAllocationScope(Isolate* isolate, bool allow_allocation) {
void ExitAllocationScope(Isolate* isolate, bool last_state) {
- isolate->heap()->set_allow_allocation(last_state);
+ bool active = !isolate->optimizing_compiler_thread()->IsOptimizerThread();
+ if (active) {
+ isolate->heap()->set_allow_allocation(last_state);
+ }
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698