OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/debug.h" | 9 #include "src/debug.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 RUNTIME_FUNCTION(Runtime_ThrowIteratorResultNotAnObject) { | 58 RUNTIME_FUNCTION(Runtime_ThrowIteratorResultNotAnObject) { |
59 HandleScope scope(isolate); | 59 HandleScope scope(isolate); |
60 DCHECK(args.length() == 1); | 60 DCHECK(args.length() == 1); |
61 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); | 61 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); |
62 THROW_NEW_ERROR_RETURN_FAILURE( | 62 THROW_NEW_ERROR_RETURN_FAILURE( |
63 isolate, | 63 isolate, |
64 NewTypeError("iterator_result_not_an_object", HandleVector(&value, 1))); | 64 NewTypeError("iterator_result_not_an_object", HandleVector(&value, 1))); |
65 } | 65 } |
66 | 66 |
67 | 67 |
68 RUNTIME_FUNCTION(Runtime_ThrowIteratorResultNotAnObject) { | |
69 HandleScope scope(isolate); | |
70 DCHECK(args.length() == 1); | |
71 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); | |
72 THROW_NEW_ERROR_RETURN_FAILURE( | |
73 isolate, | |
74 NewTypeError("iterator_result_not_an_object", HandleVector(&value, 1))); | |
75 } | |
76 | |
77 | |
78 RUNTIME_FUNCTION(Runtime_PromiseRejectEvent) { | 68 RUNTIME_FUNCTION(Runtime_PromiseRejectEvent) { |
79 DCHECK(args.length() == 3); | 69 DCHECK(args.length() == 3); |
80 HandleScope scope(isolate); | 70 HandleScope scope(isolate); |
81 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); | 71 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); |
82 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); | 72 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); |
83 CONVERT_BOOLEAN_ARG_CHECKED(debug_event, 2); | 73 CONVERT_BOOLEAN_ARG_CHECKED(debug_event, 2); |
84 if (debug_event) isolate->debug()->OnPromiseReject(promise, value); | 74 if (debug_event) isolate->debug()->OnPromiseReject(promise, value); |
85 Handle<Symbol> key = isolate->factory()->promise_has_handler_symbol(); | 75 Handle<Symbol> key = isolate->factory()->promise_has_handler_symbol(); |
86 // Do not report if we actually have a handler. | 76 // Do not report if we actually have a handler. |
87 if (JSObject::GetDataProperty(promise, key)->IsUndefined()) { | 77 if (JSObject::GetDataProperty(promise, key)->IsUndefined()) { |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 316 |
327 RUNTIME_FUNCTION(RuntimeReference_GetFromCache) { | 317 RUNTIME_FUNCTION(RuntimeReference_GetFromCache) { |
328 HandleScope scope(isolate); | 318 HandleScope scope(isolate); |
329 DCHECK(args.length() == 2); | 319 DCHECK(args.length() == 2); |
330 CONVERT_SMI_ARG_CHECKED(id, 0); | 320 CONVERT_SMI_ARG_CHECKED(id, 0); |
331 args[0] = isolate->native_context()->jsfunction_result_caches()->get(id); | 321 args[0] = isolate->native_context()->jsfunction_result_caches()->get(id); |
332 return __RT_impl_Runtime_GetFromCache(args, isolate); | 322 return __RT_impl_Runtime_GetFromCache(args, isolate); |
333 } | 323 } |
334 } | 324 } |
335 } // namespace v8::internal | 325 } // namespace v8::internal |
OLD | NEW |