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 "api.h" | 5 #include "api.h" |
6 | 6 |
7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
8 #include <cmath> // For isnan. | 8 #include <cmath> // For isnan. |
9 #include "../include/v8-debug.h" | 9 #include "../include/v8-debug.h" |
10 #include "../include/v8-profiler.h" | 10 #include "../include/v8-profiler.h" |
(...skipping 6608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6619 } | 6619 } |
6620 | 6620 |
6621 | 6621 |
6622 void Isolate::RemoveCallCompletedCallback(CallCompletedCallback callback) { | 6622 void Isolate::RemoveCallCompletedCallback(CallCompletedCallback callback) { |
6623 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6623 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
6624 isolate->RemoveCallCompletedCallback(callback); | 6624 isolate->RemoveCallCompletedCallback(callback); |
6625 } | 6625 } |
6626 | 6626 |
6627 | 6627 |
6628 void Isolate::RunMicrotasks() { | 6628 void Isolate::RunMicrotasks() { |
6629 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(this); | 6629 reinterpret_cast<i::Isolate*>(this)->RunMicrotasks(); |
6630 i::HandleScope scope(i_isolate); | |
6631 i_isolate->RunMicrotasks(); | |
6632 } | 6630 } |
6633 | 6631 |
6634 | 6632 |
6635 void Isolate::EnqueueMicrotask(Handle<Function> microtask) { | 6633 void Isolate::EnqueueMicrotask(Handle<Function> microtask) { |
6636 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(this); | 6634 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
6637 ENTER_V8(i_isolate); | 6635 isolate->EnqueueMicrotask(Utils::OpenHandle(*microtask)); |
6638 i::Execution::EnqueueMicrotask(i_isolate, Utils::OpenHandle(*microtask)); | |
6639 } | 6636 } |
6640 | 6637 |
6641 | 6638 |
6642 void Isolate::SetAutorunMicrotasks(bool autorun) { | 6639 void Isolate::SetAutorunMicrotasks(bool autorun) { |
6643 reinterpret_cast<i::Isolate*>(this)->set_autorun_microtasks(autorun); | 6640 reinterpret_cast<i::Isolate*>(this)->set_autorun_microtasks(autorun); |
6644 } | 6641 } |
6645 | 6642 |
6646 | 6643 |
6647 bool Isolate::WillAutorunMicrotasks() const { | 6644 bool Isolate::WillAutorunMicrotasks() const { |
6648 return reinterpret_cast<const i::Isolate*>(this)->autorun_microtasks(); | 6645 return reinterpret_cast<const i::Isolate*>(this)->autorun_microtasks(); |
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7541 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7538 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7542 Address callback_address = | 7539 Address callback_address = |
7543 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7540 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7544 VMState<EXTERNAL> state(isolate); | 7541 VMState<EXTERNAL> state(isolate); |
7545 ExternalCallbackScope call_scope(isolate, callback_address); | 7542 ExternalCallbackScope call_scope(isolate, callback_address); |
7546 callback(info); | 7543 callback(info); |
7547 } | 7544 } |
7548 | 7545 |
7549 | 7546 |
7550 } } // namespace v8::internal | 7547 } } // namespace v8::internal |
OLD | NEW |