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

Unified Diff: src/isolate.h

Issue 2575313002: [promisehook] Implement PromiseHook (Closed)
Patch Set: rebase + add comments Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/external-reference-table.cc ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index d26d22888209149890330df95a61ff08b595fe44..36c22bbddd18f4342ed42dd3b4d11fccd4dab9f0 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -1125,12 +1125,12 @@ class Isolate {
int GetNextUniqueSharedFunctionInfoId() { return next_unique_sfi_id_++; }
#endif
- Address is_promisehook_enabled_address() {
- return reinterpret_cast<Address>(&is_promisehook_enabled_);
+ Address promise_hook_address() {
+ return reinterpret_cast<Address>(&promise_hook_);
}
- bool IsPromiseHookEnabled() { return is_promisehook_enabled_; }
- void EnablePromiseHook();
- void DisablePromiseHook();
+ void SetPromiseHook(PromiseHook hook);
+ void RunPromiseHook(PromiseHookType type, Handle<JSPromise> promise,
+ Handle<Object> parent);
// Support for dynamically disabling tail call elimination.
Address is_tail_call_elimination_enabled_address() {
@@ -1366,6 +1366,7 @@ class Isolate {
AccessCompilerData* access_compiler_data_;
base::RandomNumberGenerator* random_number_generator_;
base::AtomicValue<RAILMode> rail_mode_;
+ PromiseHook promise_hook_;
base::Mutex rail_mutex_;
double load_start_time_ms_;
@@ -1378,9 +1379,6 @@ class Isolate {
// True if this isolate was initialized from a snapshot.
bool initialized_from_snapshot_;
- // True if PromiseHook feature is enabled.
- bool is_promisehook_enabled_;
-
// True if ES2015 tail call elimination feature is enabled.
bool is_tail_call_elimination_enabled_;
« no previous file with comments | « src/external-reference-table.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698