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

Unified Diff: src/runtime/runtime-promise.cc

Issue 2628173005: [inspector] merged type and name of async task event (Closed)
Patch Set: addressed comments Created 3 years, 11 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/runtime/runtime-debug.cc ('k') | test/cctest/test-code-stub-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-promise.cc
diff --git a/src/runtime/runtime-promise.cc b/src/runtime/runtime-promise.cc
index 14667114ba9cedbd546c82ee7810859f8f2d8adf..b018fce990189b4464d24d612986acd5dfc759c7 100644
--- a/src/runtime/runtime-promise.cc
+++ b/src/runtime/runtime-promise.cc
@@ -44,8 +44,8 @@ RUNTIME_FUNCTION(Runtime_PromiseRejectEventFromStack) {
// as being a caught exception event.
rejected_promise = isolate->GetPromiseOnStackOnThrow();
isolate->debug()->OnAsyncTaskEvent(
- debug::kDebugEnqueueRecurring,
- isolate->debug()->NextAsyncTaskId(promise), kDebugPromiseReject);
+ debug::kDebugEnqueuePromiseReject,
+ isolate->debug()->NextAsyncTaskId(promise));
}
PromiseRejectEvent(isolate, promise, rejected_promise, value, true);
return isolate->heap()->undefined_value();
@@ -112,20 +112,12 @@ bool GetDebugIdForAsyncFunction(Isolate* isolate,
void SetDebugInfo(Isolate* isolate, Handle<JSPromise> promise,
Handle<PromiseReactionJobInfo> info, int status) {
- int id;
- PromiseDebugActionName name;
-
- if (GetDebugIdForAsyncFunction(isolate, info, &id)) {
- name = kDebugAsyncFunction;
- } else {
+ int id = kDebugPromiseNoID;
+ if (!GetDebugIdForAsyncFunction(isolate, info, &id)) {
id = isolate->debug()->NextAsyncTaskId(promise);
DCHECK(status != v8::Promise::kPending);
- name = status == v8::Promise::kFulfilled ? kDebugPromiseResolve
- : kDebugPromiseReject;
}
-
info->set_debug_id(id);
- info->set_debug_name(name);
}
void EnqueuePromiseReactionJob(Isolate* isolate, Handle<JSPromise> promise,
@@ -153,10 +145,9 @@ void PromiseFulfill(Isolate* isolate, Handle<JSPromise> promise, int status,
Handle<Object> value) {
if (isolate->debug()->is_active()) {
isolate->debug()->OnAsyncTaskEvent(
- debug::kDebugEnqueueRecurring,
- isolate->debug()->NextAsyncTaskId(promise),
- status == v8::Promise::kFulfilled ? kDebugPromiseResolve
- : kDebugPromiseReject);
+ status == v8::Promise::kFulfilled ? debug::kDebugEnqueuePromiseResolve
+ : debug::kDebugEnqueuePromiseReject,
+ isolate->debug()->NextAsyncTaskId(promise));
}
// Check if there are any callbacks.
if (!promise->deferred_promise()->IsUndefined(isolate)) {
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | test/cctest/test-code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698