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

Side by Side Diff: src/execution.h

Issue 1021523002: Check for GC interrupt in JSON parser. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add comment Created 5 years, 9 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
« no previous file with comments | « no previous file | src/execution.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #ifndef V8_EXECUTION_H_ 5 #ifndef V8_EXECUTION_H_
6 #define V8_EXECUTION_H_ 6 #define V8_EXECUTION_H_
7 7
8 #include "src/handles.h" 8 #include "src/handles.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 return reinterpret_cast<Address>(&thread_local_.jslimit_); 190 return reinterpret_cast<Address>(&thread_local_.jslimit_);
191 } 191 }
192 Address address_of_real_jslimit() { 192 Address address_of_real_jslimit() {
193 return reinterpret_cast<Address>(&thread_local_.real_jslimit_); 193 return reinterpret_cast<Address>(&thread_local_.real_jslimit_);
194 } 194 }
195 195
196 // If the stack guard is triggered, but it is not an actual 196 // If the stack guard is triggered, but it is not an actual
197 // stack overflow, then handle the interruption accordingly. 197 // stack overflow, then handle the interruption accordingly.
198 Object* HandleInterrupts(); 198 Object* HandleInterrupts();
199 199
200 bool InterruptRequested() { return GetCurrentStackPosition() < climit(); }
201
202 void CheckAndHandleGCInterrupt();
203
200 private: 204 private:
201 StackGuard(); 205 StackGuard();
202 206
203 bool CheckInterrupt(InterruptFlag flag); 207 bool CheckInterrupt(InterruptFlag flag);
204 void RequestInterrupt(InterruptFlag flag); 208 void RequestInterrupt(InterruptFlag flag);
205 void ClearInterrupt(InterruptFlag flag); 209 void ClearInterrupt(InterruptFlag flag);
206 bool CheckAndClearInterrupt(InterruptFlag flag); 210 bool CheckAndClearInterrupt(InterruptFlag flag);
207 211
208 // You should hold the ExecutionAccess lock when calling this method. 212 // You should hold the ExecutionAccess lock when calling this method.
209 bool has_pending_interrupts(const ExecutionAccess& lock) { 213 bool has_pending_interrupts(const ExecutionAccess& lock) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 friend class Isolate; 272 friend class Isolate;
269 friend class StackLimitCheck; 273 friend class StackLimitCheck;
270 friend class PostponeInterruptsScope; 274 friend class PostponeInterruptsScope;
271 275
272 DISALLOW_COPY_AND_ASSIGN(StackGuard); 276 DISALLOW_COPY_AND_ASSIGN(StackGuard);
273 }; 277 };
274 278
275 } } // namespace v8::internal 279 } } // namespace v8::internal
276 280
277 #endif // V8_EXECUTION_H_ 281 #endif // V8_EXECUTION_H_
OLDNEW
« no previous file with comments | « no previous file | src/execution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698