OLD | NEW |
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 #include "src/promise-utils.h" | |
9 | 8 |
10 namespace v8 { | 9 namespace v8 { |
11 namespace internal { | 10 namespace internal { |
12 | 11 |
13 namespace { | 12 namespace { |
14 | 13 |
15 void PromiseRejectEvent(Isolate* isolate, Handle<JSPromise> promise, | 14 void PromiseRejectEvent(Isolate* isolate, Handle<JSPromise> promise, |
16 Handle<Object> rejected_promise, Handle<Object> value, | 15 Handle<Object> rejected_promise, Handle<Object> value, |
17 bool debug_event) { | 16 bool debug_event) { |
18 isolate->RunPromiseHook(PromiseHookType::kResolve, promise, | 17 isolate->RunPromiseHook(PromiseHookType::kResolve, promise, |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 HandleScope scope(isolate); | 238 HandleScope scope(isolate); |
240 DCHECK_EQ(1, args.length()); | 239 DCHECK_EQ(1, args.length()); |
241 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0); | 240 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0); |
242 isolate->RunPromiseHook(PromiseHookType::kAfter, promise, | 241 isolate->RunPromiseHook(PromiseHookType::kAfter, promise, |
243 isolate->factory()->undefined_value()); | 242 isolate->factory()->undefined_value()); |
244 return isolate->heap()->undefined_value(); | 243 return isolate->heap()->undefined_value(); |
245 } | 244 } |
246 | 245 |
247 } // namespace internal | 246 } // namespace internal |
248 } // namespace v8 | 247 } // namespace v8 |
OLD | NEW |