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

Unified Diff: src/isolate.cc

Issue 2581503003: [promisehook] Store promise in PromiseReactionJob (Closed)
Patch Set: rebase correctly 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
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index d875ec2a358ec16363799afd1833c3a2f3d3b6d1..8979a7b479312fe0797c5bfefcc1015029f44750 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -3227,6 +3227,7 @@ void Isolate::PromiseReactionJob(Handle<PromiseReactionJobInfo> info,
MaybeHandle<Object>* maybe_exception) {
PromiseDebugEventScope helper(this, info->debug_id(), info->debug_name());
+ Handle<JSPromise> promise(info->promise(), this);
Handle<Object> value(info->value(), this);
Handle<Object> tasks(info->tasks(), this);
Handle<JSFunction> promise_handle_fn = promise_handle();
@@ -3238,7 +3239,7 @@ void Isolate::PromiseReactionJob(Handle<PromiseReactionJobInfo> info,
Handle<FixedArray> deferred_arr = Handle<FixedArray>::cast(deferred);
Handle<FixedArray> tasks_arr = Handle<FixedArray>::cast(tasks);
for (int i = 0; i < deferred_arr->length(); i++) {
- Handle<Object> argv[] = {value, handle(tasks_arr->get(i), this),
+ Handle<Object> argv[] = {promise, value, handle(tasks_arr->get(i), this),
handle(deferred_arr->get(i), this)};
*result = Execution::TryCall(this, promise_handle_fn, undefined,
arraysize(argv), argv, maybe_exception);
@@ -3248,7 +3249,7 @@ void Isolate::PromiseReactionJob(Handle<PromiseReactionJobInfo> info,
}
}
} else {
- Handle<Object> argv[] = {value, tasks, deferred};
+ Handle<Object> argv[] = {promise, value, tasks, deferred};
*result = Execution::TryCall(this, promise_handle_fn, undefined,
arraysize(argv), argv, maybe_exception);
}
« src/builtins/builtins-promise.cc ('K') | « src/factory.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698