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

Unified Diff: src/factory.cc

Issue 2606093002: [promises] Refactor debug code (Closed)
Patch Set: fix stuff Created 3 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/factory.h ('k') | src/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 094ada8ecbd976fb9d68b9fa66edc20c6f044abb..0aafa62b20014e631de22dfcc95eecb5e1892616 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1013,9 +1013,8 @@ Handle<Struct> Factory::NewStruct(InstanceType type) {
Handle<PromiseResolveThenableJobInfo> Factory::NewPromiseResolveThenableJobInfo(
Handle<JSReceiver> thenable, Handle<JSReceiver> then,
- Handle<JSFunction> resolve, Handle<JSFunction> reject,
- Handle<Object> debug_id, Handle<Object> debug_name,
- Handle<Context> context) {
+ Handle<JSFunction> resolve, Handle<JSFunction> reject, int debug_id,
+ int debug_name, Handle<Context> context) {
Handle<PromiseResolveThenableJobInfo> result =
Handle<PromiseResolveThenableJobInfo>::cast(
NewStruct(PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE));
@@ -1023,8 +1022,8 @@ Handle<PromiseResolveThenableJobInfo> Factory::NewPromiseResolveThenableJobInfo(
result->set_then(*then);
result->set_resolve(*resolve);
result->set_reject(*reject);
- result->set_debug_id(*debug_id);
- result->set_debug_name(*debug_name);
+ result->set_debug_id(debug_id);
+ result->set_debug_name(debug_name);
result->set_context(*context);
return result;
}
@@ -1041,8 +1040,8 @@ Handle<PromiseReactionJobInfo> Factory::NewPromiseReactionJobInfo(
result->set_deferred_promise(*deferred_promise);
result->set_deferred_on_resolve(*deferred_on_resolve);
result->set_deferred_on_reject(*deferred_on_reject);
- result->set_debug_id(isolate()->heap()->undefined_value());
- result->set_debug_name(isolate()->heap()->undefined_value());
+ result->set_debug_id(kDebugPromiseFirstID);
+ result->set_debug_name(kDebugNotActive);
result->set_context(*context);
return result;
}
« no previous file with comments | « src/factory.h ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698