| 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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
| 6 | 6 |
| 7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
| 8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
| 9 #include "src/debug/debug-evaluate.h" | 9 #include "src/debug/debug-evaluate.h" |
| 10 #include "src/debug/debug-frames.h" | 10 #include "src/debug/debug-frames.h" |
| (...skipping 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1826 } | 1826 } |
| 1827 | 1827 |
| 1828 RUNTIME_FUNCTION(Runtime_DebugPushPromise) { | 1828 RUNTIME_FUNCTION(Runtime_DebugPushPromise) { |
| 1829 DCHECK_EQ(1, args.length()); | 1829 DCHECK_EQ(1, args.length()); |
| 1830 HandleScope scope(isolate); | 1830 HandleScope scope(isolate); |
| 1831 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); | 1831 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); |
| 1832 isolate->PushPromise(promise); | 1832 isolate->PushPromise(promise); |
| 1833 return isolate->heap()->undefined_value(); | 1833 return isolate->heap()->undefined_value(); |
| 1834 } | 1834 } |
| 1835 | 1835 |
| 1836 | |
| 1837 RUNTIME_FUNCTION(Runtime_DebugPopPromise) { | 1836 RUNTIME_FUNCTION(Runtime_DebugPopPromise) { |
| 1838 DCHECK_EQ(0, args.length()); | 1837 DCHECK_EQ(0, args.length()); |
| 1839 SealHandleScope shs(isolate); | 1838 SealHandleScope shs(isolate); |
| 1840 isolate->PopPromise(); | 1839 isolate->PopPromise(); |
| 1841 return isolate->heap()->undefined_value(); | 1840 return isolate->heap()->undefined_value(); |
| 1842 } | 1841 } |
| 1843 | 1842 |
| 1844 RUNTIME_FUNCTION(Runtime_DebugAsyncFunctionPromiseCreated) { | 1843 RUNTIME_FUNCTION(Runtime_DebugAsyncFunctionPromiseCreated) { |
| 1845 DCHECK_EQ(1, args.length()); | 1844 DCHECK_EQ(1, args.length()); |
| 1846 HandleScope scope(isolate); | 1845 HandleScope scope(isolate); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 1873 CONVERT_SMI_ARG_CHECKED(status, 1); | 1872 CONVERT_SMI_ARG_CHECKED(status, 1); |
| 1874 if (isolate->debug()->is_active()) { | 1873 if (isolate->debug()->is_active()) { |
| 1875 isolate->debug()->OnAsyncTaskEvent( | 1874 isolate->debug()->OnAsyncTaskEvent( |
| 1876 status == v8::Promise::kFulfilled ? debug::kDebugEnqueuePromiseResolve | 1875 status == v8::Promise::kFulfilled ? debug::kDebugEnqueuePromiseResolve |
| 1877 : debug::kDebugEnqueuePromiseReject, | 1876 : debug::kDebugEnqueuePromiseReject, |
| 1878 isolate->debug()->NextAsyncTaskId(promise)); | 1877 isolate->debug()->NextAsyncTaskId(promise)); |
| 1879 } | 1878 } |
| 1880 return isolate->heap()->undefined_value(); | 1879 return isolate->heap()->undefined_value(); |
| 1881 } | 1880 } |
| 1882 | 1881 |
| 1882 RUNTIME_FUNCTION(Runtime_DebugMarkPromiseAllOrRace) { |
| 1883 HandleScope scope(isolate); |
| 1884 DCHECK_EQ(1, args.length()); |
| 1885 CONVERT_ARG_HANDLE_CHECKED(JSFunction, func, 0); |
| 1886 func->shared()->set_is_promise_all_or_race(true); |
| 1887 return isolate->heap()->undefined_value(); |
| 1888 } |
| 1889 |
| 1883 RUNTIME_FUNCTION(Runtime_DebugIsActive) { | 1890 RUNTIME_FUNCTION(Runtime_DebugIsActive) { |
| 1884 SealHandleScope shs(isolate); | 1891 SealHandleScope shs(isolate); |
| 1885 return Smi::FromInt(isolate->debug()->is_active()); | 1892 return Smi::FromInt(isolate->debug()->is_active()); |
| 1886 } | 1893 } |
| 1887 | 1894 |
| 1888 | 1895 |
| 1889 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 1896 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { |
| 1890 UNIMPLEMENTED(); | 1897 UNIMPLEMENTED(); |
| 1891 return NULL; | 1898 return NULL; |
| 1892 } | 1899 } |
| 1893 | 1900 |
| 1894 } // namespace internal | 1901 } // namespace internal |
| 1895 } // namespace v8 | 1902 } // namespace v8 |
| OLD | NEW |