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

Side by Side Diff: src/isolate.h

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 | « src/api.cc ('k') | src/isolate.cc » ('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 #ifndef V8_ISOLATE_H_ 5 #ifndef V8_ISOLATE_H_
6 #define V8_ISOLATE_H_ 6 #define V8_ISOLATE_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 10
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 Handle<JSObject> GetSymbolRegistry(); 1054 Handle<JSObject> GetSymbolRegistry();
1055 1055
1056 void AddCallCompletedCallback(CallCompletedCallback callback); 1056 void AddCallCompletedCallback(CallCompletedCallback callback);
1057 void RemoveCallCompletedCallback(CallCompletedCallback callback); 1057 void RemoveCallCompletedCallback(CallCompletedCallback callback);
1058 void FireCallCompletedCallback(); 1058 void FireCallCompletedCallback();
1059 1059
1060 void AddBeforeCallEnteredCallback(BeforeCallEnteredCallback callback); 1060 void AddBeforeCallEnteredCallback(BeforeCallEnteredCallback callback);
1061 void RemoveBeforeCallEnteredCallback(BeforeCallEnteredCallback callback); 1061 void RemoveBeforeCallEnteredCallback(BeforeCallEnteredCallback callback);
1062 void FireBeforeCallEnteredCallback(); 1062 void FireBeforeCallEnteredCallback();
1063 1063
1064 void AddMicrotasksCompletedCallback(MicrotasksCompletedCallback callback);
1065 void RemoveMicrotasksCompletedCallback(MicrotasksCompletedCallback callback);
1066 void FireMicrotasksCompletedCallback();
1067
1064 void SetPromiseRejectCallback(PromiseRejectCallback callback); 1068 void SetPromiseRejectCallback(PromiseRejectCallback callback);
1065 void ReportPromiseReject(Handle<JSObject> promise, Handle<Object> value, 1069 void ReportPromiseReject(Handle<JSObject> promise, Handle<Object> value,
1066 v8::PromiseRejectEvent event); 1070 v8::PromiseRejectEvent event);
1067 1071
1068 void EnqueueMicrotask(Handle<Object> microtask); 1072 void EnqueueMicrotask(Handle<Object> microtask);
1069 void RunMicrotasks(); 1073 void RunMicrotasks();
1070 1074
1071 void SetUseCounterCallback(v8::Isolate::UseCounterCallback callback); 1075 void SetUseCounterCallback(v8::Isolate::UseCounterCallback callback);
1072 void CountUsage(v8::Isolate::UseCounterFeature feature); 1076 void CountUsage(v8::Isolate::UseCounterFeature feature);
1073 1077
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 1206
1203 // Propagate pending exception message to the v8::TryCatch. 1207 // Propagate pending exception message to the v8::TryCatch.
1204 // If there is no external try-catch or message was successfully propagated, 1208 // If there is no external try-catch or message was successfully propagated,
1205 // then return true. 1209 // then return true.
1206 bool PropagatePendingExceptionToExternalTryCatch(); 1210 bool PropagatePendingExceptionToExternalTryCatch();
1207 1211
1208 // Remove per-frame stored materialized objects when we are unwinding 1212 // Remove per-frame stored materialized objects when we are unwinding
1209 // the frame. 1213 // the frame.
1210 void RemoveMaterializedObjectsOnUnwind(StackFrame* frame); 1214 void RemoveMaterializedObjectsOnUnwind(StackFrame* frame);
1211 1215
1216 void RunMicrotasksInternal();
1217
1212 base::Atomic32 id_; 1218 base::Atomic32 id_;
1213 EntryStackItem* entry_stack_; 1219 EntryStackItem* entry_stack_;
1214 int stack_trace_nesting_level_; 1220 int stack_trace_nesting_level_;
1215 StringStream* incomplete_message_; 1221 StringStream* incomplete_message_;
1216 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT 1222 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT
1217 Bootstrapper* bootstrapper_; 1223 Bootstrapper* bootstrapper_;
1218 RuntimeProfiler* runtime_profiler_; 1224 RuntimeProfiler* runtime_profiler_;
1219 CompilationCache* compilation_cache_; 1225 CompilationCache* compilation_cache_;
1220 Counters* counters_; 1226 Counters* counters_;
1221 CodeRange* code_range_; 1227 CodeRange* code_range_;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 #if TRACE_MAPS 1329 #if TRACE_MAPS
1324 int next_unique_sfi_id_; 1330 int next_unique_sfi_id_;
1325 #endif 1331 #endif
1326 1332
1327 // List of callbacks before a Call starts execution. 1333 // List of callbacks before a Call starts execution.
1328 List<BeforeCallEnteredCallback> before_call_entered_callbacks_; 1334 List<BeforeCallEnteredCallback> before_call_entered_callbacks_;
1329 1335
1330 // List of callbacks when a Call completes. 1336 // List of callbacks when a Call completes.
1331 List<CallCompletedCallback> call_completed_callbacks_; 1337 List<CallCompletedCallback> call_completed_callbacks_;
1332 1338
1339 // List of callbacks after microtasks were run.
1340 List<MicrotasksCompletedCallback> microtasks_completed_callbacks_;
1341
1333 v8::Isolate::UseCounterCallback use_counter_callback_; 1342 v8::Isolate::UseCounterCallback use_counter_callback_;
1334 BasicBlockProfiler* basic_block_profiler_; 1343 BasicBlockProfiler* basic_block_profiler_;
1335 1344
1336 List<Object*> partial_snapshot_cache_; 1345 List<Object*> partial_snapshot_cache_;
1337 1346
1338 v8::ArrayBuffer::Allocator* array_buffer_allocator_; 1347 v8::ArrayBuffer::Allocator* array_buffer_allocator_;
1339 1348
1340 FutexWaitListNode futex_wait_list_node_; 1349 FutexWaitListNode futex_wait_list_node_;
1341 1350
1342 CancelableTaskManager* cancelable_task_manager_; 1351 CancelableTaskManager* cancelable_task_manager_;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 1575
1567 EmbeddedVector<char, 128> filename_; 1576 EmbeddedVector<char, 128> filename_;
1568 FILE* file_; 1577 FILE* file_;
1569 int scope_depth_; 1578 int scope_depth_;
1570 }; 1579 };
1571 1580
1572 } // namespace internal 1581 } // namespace internal
1573 } // namespace v8 1582 } // namespace v8
1574 1583
1575 #endif // V8_ISOLATE_H_ 1584 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698