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

Side by Side Diff: src/runtime/runtime-promise.cc

Issue 2643023002: [async-await] Move remaining async-await code to TF (Closed)
Patch Set: Typo 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 #include "src/runtime/runtime-utils.h" 4 #include "src/runtime/runtime-utils.h"
5 5
6 #include "src/debug/debug.h" 6 #include "src/debug/debug.h"
7 #include "src/elements.h" 7 #include "src/elements.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 RUNTIME_FUNCTION(Runtime_PromiseMarkAsHandled) { 192 RUNTIME_FUNCTION(Runtime_PromiseMarkAsHandled) {
193 SealHandleScope shs(isolate); 193 SealHandleScope shs(isolate);
194 DCHECK_EQ(1, args.length()); 194 DCHECK_EQ(1, args.length());
195 CONVERT_ARG_CHECKED(JSPromise, promise, 0); 195 CONVERT_ARG_CHECKED(JSPromise, promise, 0);
196 196
197 promise->set_has_handler(true); 197 promise->set_has_handler(true);
198 return isolate->heap()->undefined_value(); 198 return isolate->heap()->undefined_value();
199 } 199 }
200 200
201 RUNTIME_FUNCTION(Runtime_PromiseMarkHandledHint) {
202 SealHandleScope shs(isolate);
203 DCHECK_EQ(1, args.length());
204 CONVERT_ARG_CHECKED(JSPromise, promise, 0);
205
206 promise->set_handled_hint(true);
207 return isolate->heap()->undefined_value();
208 }
209
210 RUNTIME_FUNCTION(Runtime_PromiseHookInit) { 201 RUNTIME_FUNCTION(Runtime_PromiseHookInit) {
211 HandleScope scope(isolate); 202 HandleScope scope(isolate);
212 DCHECK_EQ(2, args.length()); 203 DCHECK_EQ(2, args.length());
213 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0); 204 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0);
214 CONVERT_ARG_HANDLE_CHECKED(Object, parent, 1); 205 CONVERT_ARG_HANDLE_CHECKED(Object, parent, 1);
215 isolate->RunPromiseHook(PromiseHookType::kInit, promise, parent); 206 isolate->RunPromiseHook(PromiseHookType::kInit, promise, parent);
216 return isolate->heap()->undefined_value(); 207 return isolate->heap()->undefined_value();
217 } 208 }
218 209
219 RUNTIME_FUNCTION(Runtime_PromiseHookResolve) { 210 RUNTIME_FUNCTION(Runtime_PromiseHookResolve) {
(...skipping 18 matching lines...) Expand all
238 HandleScope scope(isolate); 229 HandleScope scope(isolate);
239 DCHECK_EQ(1, args.length()); 230 DCHECK_EQ(1, args.length());
240 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0); 231 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0);
241 isolate->RunPromiseHook(PromiseHookType::kAfter, promise, 232 isolate->RunPromiseHook(PromiseHookType::kAfter, promise,
242 isolate->factory()->undefined_value()); 233 isolate->factory()->undefined_value());
243 return isolate->heap()->undefined_value(); 234 return isolate->heap()->undefined_value();
244 } 235 }
245 236
246 } // namespace internal 237 } // namespace internal
247 } // namespace v8 238 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698