Chromium Code Reviews| Index: src/compiler.h |
| diff --git a/src/compiler.h b/src/compiler.h |
| index 03c6f8199fe105e0cec8480db71f79fd6cf4143a..fb0dbd73d18b623ea2250cc8f1095201a3d6880d 100644 |
| --- a/src/compiler.h |
| +++ b/src/compiler.h |
| @@ -162,7 +162,8 @@ class CompilationJob { |
| : info_(info), |
| compiler_name_(compiler_name), |
| state_(initial_state), |
| - stack_limit_(isolate->stack_guard()->real_climit()) {} |
| + stack_limit_(isolate->stack_guard()->real_climit()), |
| + executed_on_background_thread_(false) {} |
| virtual ~CompilationJob() {} |
| // Prepare the compile job. Must be called on the main thread. |
| @@ -191,6 +192,11 @@ class CompilationJob { |
| void set_stack_limit(uintptr_t stack_limit) { stack_limit_ = stack_limit; } |
| uintptr_t stack_limit() const { return stack_limit_; } |
| + bool executed_on_background_thread() const { |
| + DCHECK(can_execute_on_background_thread() || |
| + !executed_on_background_thread_); |
|
Camillo Bruni
2016/12/16 09:25:05
DCHECK_IMPLIES(!can_execute_on_background_thread()
rmcilroy
2016/12/16 23:48:05
Done.
|
| + return executed_on_background_thread_; |
| + } |
| State state() const { return state_; } |
| CompilationInfo* info() const { return info_; } |
| Isolate* isolate() const; |
| @@ -213,6 +219,7 @@ class CompilationJob { |
| const char* compiler_name_; |
| State state_; |
| uintptr_t stack_limit_; |
| + bool executed_on_background_thread_; |
| MUST_USE_RESULT Status UpdateState(Status status, State next_state) { |
| if (status == SUCCEEDED) { |