| Index: src/vm-state.h
|
| diff --git a/src/vm-state.h b/src/vm-state.h
|
| index b7ecbf8e58b73be55df7f58db1f786a56f26231f..11fc6d67ef5981e0003ae52e6d52f2bbca41ed2a 100644
|
| --- a/src/vm-state.h
|
| +++ b/src/vm-state.h
|
| @@ -36,39 +36,31 @@ namespace internal {
|
| class VMState BASE_EMBEDDED {
|
| #ifdef ENABLE_VMSTATE_TRACKING
|
| public:
|
| - inline VMState(Isolate* isolate, StateTag state);
|
| + inline VMState(Isolate* isolate, StateTag tag);
|
| inline ~VMState();
|
|
|
| - StateTag state() { return state_; }
|
| - void set_external_callback(Address external_callback) {
|
| - external_callback_ = external_callback;
|
| - }
|
| -
|
| - // Used for debug asserts.
|
| - static bool is_outermost_external() {
|
| - return Isolate::Current()->current_vm_state() == 0;
|
| - }
|
| + private:
|
| + Isolate* isolate_;
|
| + StateTag previous_tag_;
|
|
|
| - static StateTag current_state() {
|
| - VMState* state = Isolate::Current()->current_vm_state();
|
| - return state ? state->state() : EXTERNAL;
|
| - }
|
| +#else
|
| + public:
|
| + VMState(Isolate* isolate, StateTag state) {}
|
| +#endif
|
| +};
|
|
|
| - static Address external_callback() {
|
| - VMState* state = Isolate::Current()->current_vm_state();
|
| - return state ? state->external_callback_ : NULL;
|
| - }
|
|
|
| +class ExternalCallbackScope BASE_EMBEDDED {
|
| +#ifdef ENABLE_LOGGING_AND_PROFILING
|
| + public:
|
| + inline ExternalCallbackScope(Isolate* isolate, Address callback);
|
| + inline ~ExternalCallbackScope();
|
| private:
|
| Isolate* isolate_;
|
| - bool disabled_;
|
| - StateTag state_;
|
| - VMState* previous_;
|
| - Address external_callback_;
|
| -
|
| + Address previous_callback_;
|
| #else
|
| public:
|
| - VMState(Isolate* isolate, StateTag state) {}
|
| + ExternalCallbackScope(Isolate* isolate, Address callback) {}
|
| #endif
|
| };
|
|
|
|
|