Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: src/api.cc

Issue 1731773005: Introduce MicrotasksCompletedCallback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: DCHECK Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/v8.h ('k') | src/isolate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7442 matching lines...) Expand 10 before | Expand all | Expand 10 after
7453 void Isolate::SetAutorunMicrotasks(bool autorun) { 7453 void Isolate::SetAutorunMicrotasks(bool autorun) {
7454 reinterpret_cast<i::Isolate*>(this)->set_autorun_microtasks(autorun); 7454 reinterpret_cast<i::Isolate*>(this)->set_autorun_microtasks(autorun);
7455 } 7455 }
7456 7456
7457 7457
7458 bool Isolate::WillAutorunMicrotasks() const { 7458 bool Isolate::WillAutorunMicrotasks() const {
7459 return reinterpret_cast<const i::Isolate*>(this)->autorun_microtasks(); 7459 return reinterpret_cast<const i::Isolate*>(this)->autorun_microtasks();
7460 } 7460 }
7461 7461
7462 7462
7463 void Isolate::AddMicrotasksCompletedCallback(
7464 MicrotasksCompletedCallback callback) {
7465 DCHECK(callback);
7466 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7467 isolate->AddMicrotasksCompletedCallback(callback);
7468 }
7469
7470
7471 void Isolate::RemoveMicrotasksCompletedCallback(
7472 MicrotasksCompletedCallback callback) {
7473 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7474 isolate->RemoveMicrotasksCompletedCallback(callback);
7475 }
7476
7477
7463 void Isolate::SetUseCounterCallback(UseCounterCallback callback) { 7478 void Isolate::SetUseCounterCallback(UseCounterCallback callback) {
7464 reinterpret_cast<i::Isolate*>(this)->SetUseCounterCallback(callback); 7479 reinterpret_cast<i::Isolate*>(this)->SetUseCounterCallback(callback);
7465 } 7480 }
7466 7481
7467 7482
7468 void Isolate::SetCounterFunction(CounterLookupCallback callback) { 7483 void Isolate::SetCounterFunction(CounterLookupCallback callback) {
7469 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 7484 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7470 isolate->stats_table()->SetCounterFunction(callback); 7485 isolate->stats_table()->SetCounterFunction(callback);
7471 isolate->InitializeLoggingAndCounters(); 7486 isolate->InitializeLoggingAndCounters();
7472 isolate->counters()->ResetCounters(); 7487 isolate->counters()->ResetCounters();
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after
8591 Address callback_address = 8606 Address callback_address =
8592 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8607 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8593 VMState<EXTERNAL> state(isolate); 8608 VMState<EXTERNAL> state(isolate);
8594 ExternalCallbackScope call_scope(isolate, callback_address); 8609 ExternalCallbackScope call_scope(isolate, callback_address);
8595 callback(info); 8610 callback(info);
8596 } 8611 }
8597 8612
8598 8613
8599 } // namespace internal 8614 } // namespace internal
8600 } // namespace v8 8615 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698