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

Side by Side Diff: src/isolate.h

Issue 600723005: Introduce PromiseRejectCallback. (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
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 "include/v8-debug.h" 8 #include "include/v8-debug.h"
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 #include "src/assert-scope.h" 10 #include "src/assert-scope.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 V(bool, autorun_microtasks, true) \ 378 V(bool, autorun_microtasks, true) \
379 V(HStatistics*, hstatistics, NULL) \ 379 V(HStatistics*, hstatistics, NULL) \
380 V(HStatistics*, tstatistics, NULL) \ 380 V(HStatistics*, tstatistics, NULL) \
381 V(HTracer*, htracer, NULL) \ 381 V(HTracer*, htracer, NULL) \
382 V(CodeTracer*, code_tracer, NULL) \ 382 V(CodeTracer*, code_tracer, NULL) \
383 V(bool, fp_stubs_generated, false) \ 383 V(bool, fp_stubs_generated, false) \
384 V(int, max_available_threads, 0) \ 384 V(int, max_available_threads, 0) \
385 V(uint32_t, per_isolate_assert_data, 0xFFFFFFFFu) \ 385 V(uint32_t, per_isolate_assert_data, 0xFFFFFFFFu) \
386 V(InterruptCallback, api_interrupt_callback, NULL) \ 386 V(InterruptCallback, api_interrupt_callback, NULL) \
387 V(void*, api_interrupt_callback_data, NULL) \ 387 V(void*, api_interrupt_callback_data, NULL) \
388 V(PromiseRejectCallback, promise_reject_callback, NULL) \
388 ISOLATE_INIT_SIMULATOR_LIST(V) 389 ISOLATE_INIT_SIMULATOR_LIST(V)
389 390
390 #define THREAD_LOCAL_TOP_ACCESSOR(type, name) \ 391 #define THREAD_LOCAL_TOP_ACCESSOR(type, name) \
391 inline void set_##name(type v) { thread_local_top_.name##_ = v; } \ 392 inline void set_##name(type v) { thread_local_top_.name##_ = v; } \
392 inline type name() const { return thread_local_top_.name##_; } 393 inline type name() const { return thread_local_top_.name##_; }
393 394
394 395
395 class Isolate { 396 class Isolate {
396 // These forward declarations are required to make the friend declarations in 397 // These forward declarations are required to make the friend declarations in
397 // PerIsolateThreadData work on some older versions of gcc. 398 // PerIsolateThreadData work on some older versions of gcc.
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 return id; 1096 return id;
1096 } 1097 }
1097 1098
1098 // Get (and lazily initialize) the registry for per-isolate symbols. 1099 // Get (and lazily initialize) the registry for per-isolate symbols.
1099 Handle<JSObject> GetSymbolRegistry(); 1100 Handle<JSObject> GetSymbolRegistry();
1100 1101
1101 void AddCallCompletedCallback(CallCompletedCallback callback); 1102 void AddCallCompletedCallback(CallCompletedCallback callback);
1102 void RemoveCallCompletedCallback(CallCompletedCallback callback); 1103 void RemoveCallCompletedCallback(CallCompletedCallback callback);
1103 void FireCallCompletedCallback(); 1104 void FireCallCompletedCallback();
1104 1105
1106 void SetPromiseRejectCallback(PromiseRejectCallback callback);
1107 void ReportPromiseReject(Handle<JSObject> promise, Handle<Object> value,
1108 v8::PromiseRejectEvent event);
1109
1105 void EnqueueMicrotask(Handle<Object> microtask); 1110 void EnqueueMicrotask(Handle<Object> microtask);
1106 void RunMicrotasks(); 1111 void RunMicrotasks();
1107 1112
1108 void SetUseCounterCallback(v8::Isolate::UseCounterCallback callback); 1113 void SetUseCounterCallback(v8::Isolate::UseCounterCallback callback);
1109 void CountUsage(v8::Isolate::UseCounterFeature feature); 1114 void CountUsage(v8::Isolate::UseCounterFeature feature);
1110 1115
1111 BasicBlockProfiler* GetOrCreateBasicBlockProfiler(); 1116 BasicBlockProfiler* GetOrCreateBasicBlockProfiler();
1112 BasicBlockProfiler* basic_block_profiler() { return basic_block_profiler_; } 1117 BasicBlockProfiler* basic_block_profiler() { return basic_block_profiler_; }
1113 1118
1114 static Isolate* NewForTesting() { return new Isolate(); } 1119 static Isolate* NewForTesting() { return new Isolate(); }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 void MarkCompactEpilogue(bool is_compacting, 1214 void MarkCompactEpilogue(bool is_compacting,
1210 ThreadLocalTop* archived_thread_data); 1215 ThreadLocalTop* archived_thread_data);
1211 1216
1212 void FillCache(); 1217 void FillCache();
1213 1218
1214 // Propagate pending exception message to the v8::TryCatch. 1219 // Propagate pending exception message to the v8::TryCatch.
1215 // If there is no external try-catch or message was successfully propagated, 1220 // If there is no external try-catch or message was successfully propagated,
1216 // then return true. 1221 // then return true.
1217 bool PropagatePendingExceptionToExternalTryCatch(); 1222 bool PropagatePendingExceptionToExternalTryCatch();
1218 1223
1224 Handle<JSMessageObject> CreateMessage(Handle<Object> exception,
1225 MessageLocation* location);
1226
1219 // Traverse prototype chain to find out whether the object is derived from 1227 // Traverse prototype chain to find out whether the object is derived from
1220 // the Error object. 1228 // the Error object.
1221 bool IsErrorObject(Handle<Object> obj); 1229 bool IsErrorObject(Handle<Object> obj);
1222 1230
1223 base::Atomic32 id_; 1231 base::Atomic32 id_;
1224 EntryStackItem* entry_stack_; 1232 EntryStackItem* entry_stack_;
1225 int stack_trace_nesting_level_; 1233 int stack_trace_nesting_level_;
1226 StringStream* incomplete_message_; 1234 StringStream* incomplete_message_;
1227 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT 1235 Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT
1228 Bootstrapper* bootstrapper_; 1236 Bootstrapper* bootstrapper_;
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 } 1562 }
1555 1563
1556 EmbeddedVector<char, 128> filename_; 1564 EmbeddedVector<char, 128> filename_;
1557 FILE* file_; 1565 FILE* file_;
1558 int scope_depth_; 1566 int scope_depth_;
1559 }; 1567 };
1560 1568
1561 } } // namespace v8::internal 1569 } } // namespace v8::internal
1562 1570
1563 #endif // V8_ISOLATE_H_ 1571 #endif // V8_ISOLATE_H_
OLDNEW
« include/v8.h ('K') | « src/heap/heap.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698