Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: src/runtime/runtime-debug.cc

Issue 2452543003: Don't wrap roots in Handle just to dereference immediately. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/regexp/jsregexp.cc ('k') | src/runtime/runtime-i18n.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 } 941 }
942 942
943 return Smi::FromInt(n); 943 return Smi::FromInt(n);
944 } 944 }
945 945
946 RUNTIME_FUNCTION(Runtime_GetGeneratorScopeDetails) { 946 RUNTIME_FUNCTION(Runtime_GetGeneratorScopeDetails) {
947 HandleScope scope(isolate); 947 HandleScope scope(isolate);
948 DCHECK(args.length() == 2); 948 DCHECK(args.length() == 2);
949 949
950 if (!args[0]->IsJSGeneratorObject()) { 950 if (!args[0]->IsJSGeneratorObject()) {
951 return *isolate->factory()->undefined_value(); 951 return isolate->heap()->undefined_value();
952 } 952 }
953 953
954 // Check arguments. 954 // Check arguments.
955 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, gen, 0); 955 CONVERT_ARG_HANDLE_CHECKED(JSGeneratorObject, gen, 0);
956 CONVERT_NUMBER_CHECKED(int, index, Int32, args[1]); 956 CONVERT_NUMBER_CHECKED(int, index, Int32, args[1]);
957 957
958 // Find the requested scope. 958 // Find the requested scope.
959 int n = 0; 959 int n = 0;
960 ScopeIterator it(isolate, gen); 960 ScopeIterator it(isolate, gen);
961 for (; !it.Done() && n < index; it.Next()) { 961 for (; !it.Done() && n < index; it.Next()) {
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 Handle<Script> script = Handle<Script>(Script::cast(script_val->value())); 1874 Handle<Script> script = Handle<Script>(Script::cast(script_val->value()));
1875 1875
1876 Handle<wasm::WasmDebugInfo> debug_info = 1876 Handle<wasm::WasmDebugInfo> debug_info =
1877 wasm::GetDebugInfo(handle(script->wasm_instance(), isolate)); 1877 wasm::GetDebugInfo(handle(script->wasm_instance(), isolate));
1878 return *wasm::WasmDebugInfo::DisassembleFunction( 1878 return *wasm::WasmDebugInfo::DisassembleFunction(
1879 debug_info, script->wasm_function_index()); 1879 debug_info, script->wasm_function_index());
1880 } 1880 }
1881 1881
1882 } // namespace internal 1882 } // namespace internal
1883 } // namespace v8 1883 } // namespace v8
OLDNEW
« no previous file with comments | « src/regexp/jsregexp.cc ('k') | src/runtime/runtime-i18n.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698