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-coverage.h" | 9 #include "src/debug/debug-coverage.h" |
10 #include "src/debug/debug-evaluate.h" | 10 #include "src/debug/debug-evaluate.h" |
(...skipping 1917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1928 JSObject::AddProperty(script_obj, id_string, | 1928 JSObject::AddProperty(script_obj, id_string, |
1929 factory->NewNumberFromInt(script.script_id), NONE); | 1929 factory->NewNumberFromInt(script.script_id), NONE); |
1930 JSObject::AddProperty( | 1930 JSObject::AddProperty( |
1931 script_obj, entries_string, | 1931 script_obj, entries_string, |
1932 factory->NewJSArrayWithElements(entries_array, FAST_ELEMENTS), NONE); | 1932 factory->NewJSArrayWithElements(entries_array, FAST_ELEMENTS), NONE); |
1933 scripts_array->set(i, *script_obj); | 1933 scripts_array->set(i, *script_obj); |
1934 } | 1934 } |
1935 return *factory->NewJSArrayWithElements(scripts_array, FAST_ELEMENTS); | 1935 return *factory->NewJSArrayWithElements(scripts_array, FAST_ELEMENTS); |
1936 } | 1936 } |
1937 | 1937 |
| 1938 RUNTIME_FUNCTION(Runtime_DebugTogglePreciseCoverage) { |
| 1939 SealHandleScope shs(isolate); |
| 1940 CONVERT_BOOLEAN_ARG_CHECKED(enable, 0); |
| 1941 if (enable) { |
| 1942 Coverage::EnablePrecise(isolate); |
| 1943 } else { |
| 1944 Coverage::DisablePrecise(isolate); |
| 1945 } |
| 1946 return isolate->heap()->undefined_value(); |
| 1947 } |
| 1948 |
1938 } // namespace internal | 1949 } // namespace internal |
1939 } // namespace v8 | 1950 } // namespace v8 |
OLD | NEW |