| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 82e4c54ba517e606257d0e5a73c27890d6348f51..24795c3fd91f39b4dd045d341d44ad0f84a96878 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -6455,21 +6455,17 @@ void V8::RemoveMemoryAllocationCallback(MemoryAllocationCallback callback) {
|
|
|
|
|
| void V8::RunMicrotasks(Isolate* isolate) {
|
| - i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
|
| - i::HandleScope scope(i_isolate);
|
| - i::V8::RunMicrotasks(i_isolate);
|
| + isolate->RunMicrotasks();
|
| }
|
|
|
|
|
| void V8::EnqueueMicrotask(Isolate* isolate, Handle<Function> microtask) {
|
| - i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
|
| - ENTER_V8(i_isolate);
|
| - i::Execution::EnqueueMicrotask(i_isolate, Utils::OpenHandle(*microtask));
|
| + isolate->EnqueueMicrotask(microtask);
|
| }
|
|
|
|
|
| void V8::SetAutorunMicrotasks(Isolate* isolate, bool autorun) {
|
| - reinterpret_cast<i::Isolate*>(isolate)->set_autorun_microtasks(autorun);
|
| + isolate->SetAutorunMicrotasks(autorun);
|
| }
|
|
|
|
|
| @@ -6593,6 +6589,20 @@ Isolate::AllowJavascriptExecutionScope::~AllowJavascriptExecutionScope() {
|
| }
|
|
|
|
|
| +Isolate::SuppressMicrotaskExecutionScope::SuppressMicrotaskExecutionScope(
|
| + Isolate* isolate) {
|
| + i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
|
| + i_isolate->handle_scope_implementer()->IncrementCallDepth();
|
| + internal_ = i_isolate;
|
| +}
|
| +
|
| +
|
| +Isolate::SuppressMicrotaskExecutionScope::~SuppressMicrotaskExecutionScope() {
|
| + i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(internal_);
|
| + i_isolate->handle_scope_implementer()->DecrementCallDepth();
|
| +}
|
| +
|
| +
|
| void Isolate::GetHeapStatistics(HeapStatistics* heap_statistics) {
|
| i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
|
| if (!isolate->IsInitialized()) {
|
| @@ -6632,6 +6642,25 @@ void Isolate::RemoveCallCompletedCallback(CallCompletedCallback callback) {
|
| }
|
|
|
|
|
| +void Isolate::RunMicrotasks() {
|
| + i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(this);
|
| + i::HandleScope scope(i_isolate);
|
| + i_isolate->RunMicrotasks();
|
| +}
|
| +
|
| +
|
| +void Isolate::EnqueueMicrotask(Handle<Function> microtask) {
|
| + i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(this);
|
| + ENTER_V8(i_isolate);
|
| + i::Execution::EnqueueMicrotask(i_isolate, Utils::OpenHandle(*microtask));
|
| +}
|
| +
|
| +
|
| +void Isolate::SetAutorunMicrotasks(bool autorun) {
|
| + reinterpret_cast<i::Isolate*>(this)->set_autorun_microtasks(autorun);
|
| +}
|
| +
|
| +
|
| String::Utf8Value::Utf8Value(v8::Handle<v8::Value> obj)
|
| : str_(NULL), length_(0) {
|
| i::Isolate* isolate = i::Isolate::Current();
|
|
|