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

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

Issue 2163823004: [runtime] cleanup: use the factory() for handlified values (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 months 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 | « no previous file | src/runtime/runtime-generator.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 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1575 } else { 1575 } else {
1576 return Smi::cast(line_ends_array->get(line)); 1576 return Smi::cast(line_ends_array->get(line));
1577 } 1577 }
1578 } 1578 }
1579 1579
1580 static Handle<Object> GetJSPositionInfo(Handle<Script> script, int position, 1580 static Handle<Object> GetJSPositionInfo(Handle<Script> script, int position,
1581 Script::OffsetFlag offset_flag, 1581 Script::OffsetFlag offset_flag,
1582 Isolate* isolate) { 1582 Isolate* isolate) {
1583 Script::PositionInfo info; 1583 Script::PositionInfo info;
1584 if (!script->GetPositionInfo(position, &info, offset_flag)) { 1584 if (!script->GetPositionInfo(position, &info, offset_flag)) {
1585 return handle(isolate->heap()->null_value(), isolate); 1585 return isolate->factory()->null_value();
1586 } 1586 }
1587 1587
1588 Handle<String> source = handle(String::cast(script->source()), isolate); 1588 Handle<String> source = handle(String::cast(script->source()), isolate);
1589 Handle<String> sourceText = script->type() == Script::TYPE_WASM 1589 Handle<String> sourceText = script->type() == Script::TYPE_WASM
1590 ? isolate->factory()->empty_string() 1590 ? isolate->factory()->empty_string()
1591 : isolate->factory()->NewSubString( 1591 : isolate->factory()->NewSubString(
1592 source, info.line_start, info.line_end); 1592 source, info.line_start, info.line_end);
1593 1593
1594 Handle<JSObject> jsinfo = 1594 Handle<JSObject> jsinfo =
1595 isolate->factory()->NewJSObject(isolate->object_function()); 1595 isolate->factory()->NewJSObject(isolate->object_function());
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 Handle<Script> script = Handle<Script>(Script::cast(script_val->value())); 1815 Handle<Script> script = Handle<Script>(Script::cast(script_val->value()));
1816 1816
1817 Handle<wasm::WasmDebugInfo> debug_info = 1817 Handle<wasm::WasmDebugInfo> debug_info =
1818 wasm::GetDebugInfo(handle(script->wasm_object(), isolate)); 1818 wasm::GetDebugInfo(handle(script->wasm_object(), isolate));
1819 return *wasm::WasmDebugInfo::DisassembleFunction( 1819 return *wasm::WasmDebugInfo::DisassembleFunction(
1820 debug_info, script->wasm_function_index()); 1820 debug_info, script->wasm_function_index());
1821 } 1821 }
1822 1822
1823 } // namespace internal 1823 } // namespace internal
1824 } // namespace v8 1824 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/runtime/runtime-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698