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

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

Issue 2789073002: [inspector] store stack frame in struct instead of JSObject (Closed)
Patch Set: gcmole should be happy Created 3 years, 8 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 | « src/objects-printer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/assembler.h" 8 #include "src/assembler.h"
9 #include "src/compiler/wasm-compiler.h" 9 #include "src/compiler/wasm-compiler.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 // Patch the detailed stack trace (array of JSObjects with various 98 // Patch the detailed stack trace (array of JSObjects with various
99 // properties). 99 // properties).
100 Handle<Object> detailed_stack_trace_obj = JSReceiver::GetDataProperty( 100 Handle<Object> detailed_stack_trace_obj = JSReceiver::GetDataProperty(
101 error, isolate->factory()->detailed_stack_trace_symbol()); 101 error, isolate->factory()->detailed_stack_trace_symbol());
102 if (detailed_stack_trace_obj->IsJSArray()) { 102 if (detailed_stack_trace_obj->IsJSArray()) {
103 Handle<FixedArray> stack_elements( 103 Handle<FixedArray> stack_elements(
104 FixedArray::cast(JSArray::cast(*detailed_stack_trace_obj)->elements())); 104 FixedArray::cast(JSArray::cast(*detailed_stack_trace_obj)->elements()));
105 DCHECK_GE(stack_elements->length(), 1); 105 DCHECK_GE(stack_elements->length(), 1);
106 Handle<JSObject> top_frame(JSObject::cast(stack_elements->get(0))); 106 Handle<StackFrameInfo> top_frame(
107 Handle<String> wasm_offset_key = 107 StackFrameInfo::cast(stack_elements->get(0)));
108 isolate->factory()->InternalizeOneByteString( 108 if (top_frame->column_number()) {
109 STATIC_CHAR_VECTOR("column")); 109 top_frame->set_column_number(byte_offset + 1);
110 LookupIterator it(top_frame, wasm_offset_key, top_frame,
111 LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR);
112 if (it.IsFound()) {
113 DCHECK(JSReceiver::GetDataProperty(&it)->IsSmi());
114 // Make column number 1-based here.
115 Maybe<bool> data_set = JSReceiver::SetDataProperty(
116 &it, handle(Smi::FromInt(byte_offset + 1), isolate));
117 DCHECK(data_set.IsJust() && data_set.FromJust() == true);
118 USE(data_set);
119 } 110 }
120 } 111 }
121 112
122 return isolate->Throw(*error_obj); 113 return isolate->Throw(*error_obj);
123 } 114 }
124 115
125 RUNTIME_FUNCTION(Runtime_ThrowWasmErrorFromTrapIf) { 116 RUNTIME_FUNCTION(Runtime_ThrowWasmErrorFromTrapIf) {
126 DCHECK_EQ(1, args.length()); 117 DCHECK_EQ(1, args.length());
127 CONVERT_SMI_ARG_CHECKED(message_id, 0); 118 CONVERT_SMI_ARG_CHECKED(message_id, 0);
128 return ThrowRuntimeError(isolate, message_id, 0, false); 119 return ThrowRuntimeError(isolate, message_id, 0, false);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 244
254 RUNTIME_FUNCTION(Runtime_WasmCompileLazy) { 245 RUNTIME_FUNCTION(Runtime_WasmCompileLazy) {
255 DCHECK(args.length() == 0); 246 DCHECK(args.length() == 0);
256 HandleScope scope(isolate); 247 HandleScope scope(isolate);
257 248
258 return *wasm::CompileLazy(isolate); 249 return *wasm::CompileLazy(isolate);
259 } 250 }
260 251
261 } // namespace internal 252 } // namespace internal
262 } // namespace v8 253 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698