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

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

Issue 2604483002: [promises] Move PromiseHasUserDefinedRejectHandler to c++ (Closed)
Patch Set: Remove js check 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
« src/isolate.cc ('K') | « src/runtime/runtime.h ('k') | no next file » | 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 d8e3dcaad3ee1fb21eab756a55a66d3e938739dd..3ded2e3cff88110d2e4f3fc0aed99a119ca58ea4 100644
--- a/src/runtime/runtime-promise.cc
+++ b/src/runtime/runtime-promise.cc
@@ -287,6 +287,15 @@ RUNTIME_FUNCTION(Runtime_PromiseMarkAsHandled) {
return isolate->heap()->undefined_value();
}
+RUNTIME_FUNCTION(Runtime_PromiseMarkHandledHint) {
+ HandleScope scope(isolate);
Yang 2016/12/23 08:40:08 No need to create a handle scope here. And above a
gsathya 2016/12/23 17:59:44 Done.
+ DCHECK(args.length() == 1);
+ CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0);
+
+ promise->set_handled_hint(true);
+ return isolate->heap()->undefined_value();
+}
+
RUNTIME_FUNCTION(Runtime_PromiseHookInit) {
HandleScope scope(isolate);
DCHECK_EQ(2, args.length());
« src/isolate.cc ('K') | « src/runtime/runtime.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698