| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 RUNTIME_FUNCTION(Runtime_ThrowIteratorResultNotAnObject) { | 96 RUNTIME_FUNCTION(Runtime_ThrowIteratorResultNotAnObject) { |
| 97 HandleScope scope(isolate); | 97 HandleScope scope(isolate); |
| 98 DCHECK(args.length() == 1); | 98 DCHECK(args.length() == 1); |
| 99 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); | 99 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); |
| 100 THROW_NEW_ERROR_RETURN_FAILURE( | 100 THROW_NEW_ERROR_RETURN_FAILURE( |
| 101 isolate, | 101 isolate, |
| 102 NewTypeError(MessageTemplate::kIteratorResultNotAnObject, value)); | 102 NewTypeError(MessageTemplate::kIteratorResultNotAnObject, value)); |
| 103 } | 103 } |
| 104 | 104 |
| 105 | 105 |
| 106 RUNTIME_FUNCTION(Runtime_ThrowStrongModeImplicitConversion) { |
| 107 HandleScope scope(isolate); |
| 108 DCHECK(args.length() == 0); |
| 109 THROW_NEW_ERROR_RETURN_FAILURE( |
| 110 isolate, NewTypeError(MessageTemplate::kStrongImplicitConversion)); |
| 111 } |
| 112 |
| 113 |
| 106 RUNTIME_FUNCTION(Runtime_PromiseRejectEvent) { | 114 RUNTIME_FUNCTION(Runtime_PromiseRejectEvent) { |
| 107 DCHECK(args.length() == 3); | 115 DCHECK(args.length() == 3); |
| 108 HandleScope scope(isolate); | 116 HandleScope scope(isolate); |
| 109 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); | 117 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); |
| 110 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); | 118 CONVERT_ARG_HANDLE_CHECKED(Object, value, 1); |
| 111 CONVERT_BOOLEAN_ARG_CHECKED(debug_event, 2); | 119 CONVERT_BOOLEAN_ARG_CHECKED(debug_event, 2); |
| 112 if (debug_event) isolate->debug()->OnPromiseReject(promise, value); | 120 if (debug_event) isolate->debug()->OnPromiseReject(promise, value); |
| 113 Handle<Symbol> key = isolate->factory()->promise_has_handler_symbol(); | 121 Handle<Symbol> key = isolate->factory()->promise_has_handler_symbol(); |
| 114 // Do not report if we actually have a handler. | 122 // Do not report if we actually have a handler. |
| 115 if (JSReceiver::GetDataProperty(promise, key)->IsUndefined()) { | 123 if (JSReceiver::GetDataProperty(promise, key)->IsUndefined()) { |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 RUNTIME_FUNCTION(Runtime_GetCallerJSFunction) { | 462 RUNTIME_FUNCTION(Runtime_GetCallerJSFunction) { |
| 455 SealHandleScope shs(isolate); | 463 SealHandleScope shs(isolate); |
| 456 StackFrameIterator it(isolate); | 464 StackFrameIterator it(isolate); |
| 457 RUNTIME_ASSERT(it.frame()->type() == StackFrame::STUB); | 465 RUNTIME_ASSERT(it.frame()->type() == StackFrame::STUB); |
| 458 it.Advance(); | 466 it.Advance(); |
| 459 RUNTIME_ASSERT(it.frame()->type() == StackFrame::JAVA_SCRIPT); | 467 RUNTIME_ASSERT(it.frame()->type() == StackFrame::JAVA_SCRIPT); |
| 460 return JavaScriptFrame::cast(it.frame())->function(); | 468 return JavaScriptFrame::cast(it.frame())->function(); |
| 461 } | 469 } |
| 462 } // namespace internal | 470 } // namespace internal |
| 463 } // namespace v8 | 471 } // namespace v8 |
| OLD | NEW |