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