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

Side by Side Diff: src/api.cc

Issue 620673005: Introduce HasPendingMicrotasks API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« 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 6770 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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