| OLD | NEW |
| 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 "src/api.h" | 5 #include "src/api.h" |
| 6 | 6 |
| 7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
| 8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
| 9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
| 10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
| (...skipping 6770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6781 void Isolate::SetAutorunMicrotasks(bool autorun) { | 6781 void Isolate::SetAutorunMicrotasks(bool autorun) { |
| 6782 reinterpret_cast<i::Isolate*>(this)->set_autorun_microtasks(autorun); | 6782 reinterpret_cast<i::Isolate*>(this)->set_autorun_microtasks(autorun); |
| 6783 } | 6783 } |
| 6784 | 6784 |
| 6785 | 6785 |
| 6786 bool Isolate::WillAutorunMicrotasks() const { | 6786 bool Isolate::WillAutorunMicrotasks() const { |
| 6787 return reinterpret_cast<const i::Isolate*>(this)->autorun_microtasks(); | 6787 return reinterpret_cast<const i::Isolate*>(this)->autorun_microtasks(); |
| 6788 } | 6788 } |
| 6789 | 6789 |
| 6790 | 6790 |
| 6791 bool Isolate::HasPendingMicrotasks() const { |
| 6792 return reinterpret_cast<const i::Isolate*>(this)->HasMoreMicrotasksToRun(); |
| 6793 } |
| 6794 |
| 6795 |
| 6791 void Isolate::SetUseCounterCallback(UseCounterCallback callback) { | 6796 void Isolate::SetUseCounterCallback(UseCounterCallback callback) { |
| 6792 reinterpret_cast<i::Isolate*>(this)->SetUseCounterCallback(callback); | 6797 reinterpret_cast<i::Isolate*>(this)->SetUseCounterCallback(callback); |
| 6793 } | 6798 } |
| 6794 | 6799 |
| 6795 | 6800 |
| 6796 void Isolate::SetCounterFunction(CounterLookupCallback callback) { | 6801 void Isolate::SetCounterFunction(CounterLookupCallback callback) { |
| 6797 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6802 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6798 isolate->stats_table()->SetCounterFunction(callback); | 6803 isolate->stats_table()->SetCounterFunction(callback); |
| 6799 isolate->InitializeLoggingAndCounters(); | 6804 isolate->InitializeLoggingAndCounters(); |
| 6800 isolate->counters()->ResetCounters(); | 6805 isolate->counters()->ResetCounters(); |
| (...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7713 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7718 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7714 Address callback_address = | 7719 Address callback_address = |
| 7715 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7720 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7716 VMState<EXTERNAL> state(isolate); | 7721 VMState<EXTERNAL> state(isolate); |
| 7717 ExternalCallbackScope call_scope(isolate, callback_address); | 7722 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7718 callback(info); | 7723 callback(info); |
| 7719 } | 7724 } |
| 7720 | 7725 |
| 7721 | 7726 |
| 7722 } } // namespace v8::internal | 7727 } } // namespace v8::internal |
| OLD | NEW |