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

Side by Side Diff: src/v8.cc

Issue 263933002: Introduce a microtask suppression scope and move microtask methods to isolate (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/v8.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "assembler.h" 7 #include "assembler.h"
8 #include "isolate.h" 8 #include "isolate.h"
9 #include "elements.h" 9 #include "elements.h"
10 #include "bootstrapper.h" 10 #include "bootstrapper.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 #endif 80 #endif
81 } 81 }
82 82
83 83
84 void V8::SetReturnAddressLocationResolver( 84 void V8::SetReturnAddressLocationResolver(
85 ReturnAddressLocationResolver resolver) { 85 ReturnAddressLocationResolver resolver) {
86 StackFrame::SetReturnAddressLocationResolver(resolver); 86 StackFrame::SetReturnAddressLocationResolver(resolver);
87 } 87 }
88 88
89 89
90 void V8::RunMicrotasks(Isolate* isolate) {
91 if (!isolate->microtask_pending())
92 return;
93
94 HandleScopeImplementer* handle_scope_implementer =
95 isolate->handle_scope_implementer();
96 ASSERT(handle_scope_implementer->CallDepthIsZero());
97
98 // Increase call depth to prevent recursive callbacks.
99 handle_scope_implementer->IncrementCallDepth();
100 Execution::RunMicrotasks(isolate);
101 handle_scope_implementer->DecrementCallDepth();
102 }
103
104
105 void V8::InitializeOncePerProcessImpl() { 90 void V8::InitializeOncePerProcessImpl() {
106 FlagList::EnforceFlagImplications(); 91 FlagList::EnforceFlagImplications();
107 Serializer::InitializeOncePerProcess(); 92 Serializer::InitializeOncePerProcess();
108 93
109 if (FLAG_predictable && FLAG_random_seed == 0) { 94 if (FLAG_predictable && FLAG_random_seed == 0) {
110 // Avoid random seeds in predictable mode. 95 // Avoid random seeds in predictable mode.
111 FLAG_random_seed = 12347; 96 FLAG_random_seed = 12347;
112 } 97 }
113 98
114 if (FLAG_stress_compaction) { 99 if (FLAG_stress_compaction) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 platform_ = NULL; 135 platform_ = NULL;
151 } 136 }
152 137
153 138
154 v8::Platform* V8::GetCurrentPlatform() { 139 v8::Platform* V8::GetCurrentPlatform() {
155 ASSERT(platform_); 140 ASSERT(platform_);
156 return platform_; 141 return platform_;
157 } 142 }
158 143
159 } } // namespace v8::internal 144 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/v8.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698