| 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" | 8 #include "src/promise-utils.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 } | 274 } |
| 275 | 275 |
| 276 DCHECK(reject_reactions->IsFixedArray()); | 276 DCHECK(reject_reactions->IsFixedArray()); |
| 277 return *isolate->factory()->NewJSArrayWithElements( | 277 return *isolate->factory()->NewJSArrayWithElements( |
| 278 Handle<FixedArray>::cast(reject_reactions)); | 278 Handle<FixedArray>::cast(reject_reactions)); |
| 279 } | 279 } |
| 280 | 280 |
| 281 RUNTIME_FUNCTION(Runtime_PromiseMarkAsHandled) { | 281 RUNTIME_FUNCTION(Runtime_PromiseMarkAsHandled) { |
| 282 SealHandleScope shs(isolate); | 282 SealHandleScope shs(isolate); |
| 283 DCHECK(args.length() == 1); | 283 DCHECK(args.length() == 1); |
| 284 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0); | 284 CONVERT_ARG_CHECKED(JSPromise, promise, 0); |
| 285 | 285 |
| 286 promise->set_has_handler(true); | 286 promise->set_has_handler(true); |
| 287 return isolate->heap()->undefined_value(); | 287 return isolate->heap()->undefined_value(); |
| 288 } | 288 } |
| 289 | 289 |
| 290 RUNTIME_FUNCTION(Runtime_PromiseMarkHandledHint) { | 290 RUNTIME_FUNCTION(Runtime_PromiseMarkHandledHint) { |
| 291 SealHandleScope shs(isolate); | 291 SealHandleScope shs(isolate); |
| 292 DCHECK(args.length() == 1); | 292 DCHECK(args.length() == 1); |
| 293 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0); | 293 CONVERT_ARG_CHECKED(JSPromise, promise, 0); |
| 294 | 294 |
| 295 promise->set_handled_hint(true); | 295 promise->set_handled_hint(true); |
| 296 return isolate->heap()->undefined_value(); | 296 return isolate->heap()->undefined_value(); |
| 297 } | 297 } |
| 298 | 298 |
| 299 RUNTIME_FUNCTION(Runtime_PromiseHookInit) { | 299 RUNTIME_FUNCTION(Runtime_PromiseHookInit) { |
| 300 HandleScope scope(isolate); | 300 HandleScope scope(isolate); |
| 301 DCHECK_EQ(2, args.length()); | 301 DCHECK_EQ(2, args.length()); |
| 302 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0); | 302 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0); |
| 303 CONVERT_ARG_HANDLE_CHECKED(Object, parent, 1); | 303 CONVERT_ARG_HANDLE_CHECKED(Object, parent, 1); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 327 HandleScope scope(isolate); | 327 HandleScope scope(isolate); |
| 328 DCHECK_EQ(1, args.length()); | 328 DCHECK_EQ(1, args.length()); |
| 329 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0); | 329 CONVERT_ARG_HANDLE_CHECKED(JSPromise, promise, 0); |
| 330 isolate->RunPromiseHook(PromiseHookType::kAfter, promise, | 330 isolate->RunPromiseHook(PromiseHookType::kAfter, promise, |
| 331 isolate->factory()->undefined_value()); | 331 isolate->factory()->undefined_value()); |
| 332 return isolate->heap()->undefined_value(); | 332 return isolate->heap()->undefined_value(); |
| 333 } | 333 } |
| 334 | 334 |
| 335 } // namespace internal | 335 } // namespace internal |
| 336 } // namespace v8 | 336 } // namespace v8 |
| OLD | NEW |