OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <stdlib.h> | 5 #include <stdlib.h> |
6 #include <limits> | 6 #include <limits> |
7 | 7 |
8 #include "v8.h" | 8 #include "v8.h" |
9 | 9 |
10 #include "accessors.h" | 10 #include "accessors.h" |
(...skipping 5624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5635 HandleScope scope(isolate); | 5635 HandleScope scope(isolate); |
5636 // When leaving the callback, step out has been activated, but not performed | 5636 // When leaving the callback, step out has been activated, but not performed |
5637 // if we do not leave the builtin. To be able to step into the callback | 5637 // if we do not leave the builtin. To be able to step into the callback |
5638 // again, we need to clear the step out at this point. | 5638 // again, we need to clear the step out at this point. |
5639 debug->ClearStepOut(); | 5639 debug->ClearStepOut(); |
5640 debug->FloodWithOneShot(callback); | 5640 debug->FloodWithOneShot(callback); |
5641 return isolate->heap()->undefined_value(); | 5641 return isolate->heap()->undefined_value(); |
5642 } | 5642 } |
5643 | 5643 |
5644 | 5644 |
5645 // Notify the debugger if an expcetion in a promise is not caught (yet). | 5645 // The argument is a closure that is kept until the epilogue is called. |
5646 RUNTIME_FUNCTION(Runtime_DebugPendingExceptionInPromise) { | 5646 // On exception, the closure is called, which returns the promise if the |
5647 ASSERT(args.length() == 2); | 5647 // exception is considered uncaught, or undefined otherwise. |
| 5648 RUNTIME_FUNCTION(Runtime_DebugPromiseHandlePrologue) { |
| 5649 ASSERT(args.length() == 1); |
5648 HandleScope scope(isolate); | 5650 HandleScope scope(isolate); |
5649 CONVERT_ARG_HANDLE_CHECKED(Object, exception, 0); | 5651 CONVERT_ARG_HANDLE_CHECKED(JSFunction, promise_getter, 0); |
5650 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 1); | 5652 isolate->debug()->PromiseHandlePrologue(promise_getter); |
5651 isolate->debugger()->OnException(exception, true, promise); | |
5652 return isolate->heap()->undefined_value(); | 5653 return isolate->heap()->undefined_value(); |
5653 } | 5654 } |
5654 | 5655 |
| 5656 |
| 5657 RUNTIME_FUNCTION(Runtime_DebugPromiseHandleEpilogue) { |
| 5658 ASSERT(args.length() == 0); |
| 5659 SealHandleScope shs(isolate); |
| 5660 isolate->debug()->PromiseHandleEpilogue(); |
| 5661 return isolate->heap()->undefined_value(); |
| 5662 } |
| 5663 |
5655 | 5664 |
5656 // Set a local property, even if it is READ_ONLY. If the property does not | 5665 // Set a local property, even if it is READ_ONLY. If the property does not |
5657 // exist, it will be added with attributes NONE. | 5666 // exist, it will be added with attributes NONE. |
5658 RUNTIME_FUNCTION(Runtime_IgnoreAttributesAndSetProperty) { | 5667 RUNTIME_FUNCTION(Runtime_IgnoreAttributesAndSetProperty) { |
5659 HandleScope scope(isolate); | 5668 HandleScope scope(isolate); |
5660 RUNTIME_ASSERT(args.length() == 3 || args.length() == 4); | 5669 RUNTIME_ASSERT(args.length() == 3 || args.length() == 4); |
5661 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); | 5670 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); |
5662 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1); | 5671 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1); |
5663 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); | 5672 CONVERT_ARG_HANDLE_CHECKED(Object, value, 2); |
5664 // Compute attributes. | 5673 // Compute attributes. |
(...skipping 9475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15140 } | 15149 } |
15141 return NULL; | 15150 return NULL; |
15142 } | 15151 } |
15143 | 15152 |
15144 | 15153 |
15145 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15154 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15146 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15155 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15147 } | 15156 } |
15148 | 15157 |
15149 } } // namespace v8::internal | 15158 } } // namespace v8::internal |
OLD | NEW |