| 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/debug/debug-evaluate.h" | 8 #include "src/debug/debug-evaluate.h" |
| 9 #include "src/debug/debug-frames.h" | 9 #include "src/debug/debug-frames.h" |
| 10 #include "src/debug/debug-scopes.h" | 10 #include "src/debug/debug-scopes.h" |
| (...skipping 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1885 } | 1885 } |
| 1886 | 1886 |
| 1887 RUNTIME_FUNCTION(Runtime_DebugPushPromise) { | 1887 RUNTIME_FUNCTION(Runtime_DebugPushPromise) { |
| 1888 DCHECK(args.length() == 1); | 1888 DCHECK(args.length() == 1); |
| 1889 HandleScope scope(isolate); | 1889 HandleScope scope(isolate); |
| 1890 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); | 1890 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); |
| 1891 isolate->PushPromise(promise); | 1891 isolate->PushPromise(promise); |
| 1892 return isolate->heap()->undefined_value(); | 1892 return isolate->heap()->undefined_value(); |
| 1893 } | 1893 } |
| 1894 | 1894 |
| 1895 | |
| 1896 RUNTIME_FUNCTION(Runtime_DebugPopPromise) { | 1895 RUNTIME_FUNCTION(Runtime_DebugPopPromise) { |
| 1897 DCHECK(args.length() == 0); | 1896 DCHECK(args.length() == 0); |
| 1898 SealHandleScope shs(isolate); | 1897 SealHandleScope shs(isolate); |
| 1899 isolate->PopPromise(); | 1898 isolate->PopPromise(); |
| 1900 return isolate->heap()->undefined_value(); | 1899 return isolate->heap()->undefined_value(); |
| 1901 } | 1900 } |
| 1902 | 1901 |
| 1903 RUNTIME_FUNCTION(Runtime_DebugNextMicrotaskId) { | 1902 RUNTIME_FUNCTION(Runtime_DebugNextAsyncTaskId) { |
| 1903 DCHECK(args.length() == 1); |
| 1904 HandleScope scope(isolate); | 1904 HandleScope scope(isolate); |
| 1905 DCHECK(args.length() == 0); | 1905 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); |
| 1906 return Smi::FromInt(isolate->GetNextDebugMicrotaskId()); | 1906 return *isolate->debug()->NextAsyncTaskId(promise); |
| 1907 } | 1907 } |
| 1908 | 1908 |
| 1909 RUNTIME_FUNCTION(Runtime_DebugAsyncTaskEvent) { | 1909 RUNTIME_FUNCTION(Runtime_DebugEnqueueRecurringAsyncTaskEvent) { |
| 1910 DCHECK(args.length() == 3); | 1910 DCHECK(args.length() == 2); |
| 1911 HandleScope scope(isolate); | 1911 HandleScope scope(isolate); |
| 1912 CONVERT_ARG_HANDLE_CHECKED(String, type, 0); | 1912 CONVERT_ARG_HANDLE_CHECKED(JSObject, promise, 0); |
| 1913 CONVERT_ARG_HANDLE_CHECKED(Object, id, 1); | 1913 CONVERT_ARG_HANDLE_CHECKED(String, name, 1); |
| 1914 CONVERT_ARG_HANDLE_CHECKED(String, name, 2); | 1914 isolate->debug()->OnAsyncTaskEvent(debug::EnqueueRecurring, |
| 1915 isolate->debug()->OnAsyncTaskEvent(type, id, name); | 1915 isolate->debug()->NextAsyncTaskId(promise), |
| 1916 name); |
| 1916 return isolate->heap()->undefined_value(); | 1917 return isolate->heap()->undefined_value(); |
| 1917 } | 1918 } |
| 1918 | 1919 |
| 1919 | 1920 |
| 1920 RUNTIME_FUNCTION(Runtime_DebugIsActive) { | 1921 RUNTIME_FUNCTION(Runtime_DebugIsActive) { |
| 1921 SealHandleScope shs(isolate); | 1922 SealHandleScope shs(isolate); |
| 1922 return Smi::FromInt(isolate->debug()->is_active()); | 1923 return Smi::FromInt(isolate->debug()->is_active()); |
| 1923 } | 1924 } |
| 1924 | 1925 |
| 1925 | 1926 |
| 1926 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 1927 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { |
| 1927 UNIMPLEMENTED(); | 1928 UNIMPLEMENTED(); |
| 1928 return NULL; | 1929 return NULL; |
| 1929 } | 1930 } |
| 1930 | 1931 |
| 1931 } // namespace internal | 1932 } // namespace internal |
| 1932 } // namespace v8 | 1933 } // namespace v8 |
| OLD | NEW |