| 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/ast/prettyprinter.h" | 8 #include "src/ast/prettyprinter.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 FixedArray::cast(JSArray::cast(*detailed_stack_trace_obj)->elements())); | 134 FixedArray::cast(JSArray::cast(*detailed_stack_trace_obj)->elements())); |
| 135 DCHECK_GE(stack_elements->length(), 1); | 135 DCHECK_GE(stack_elements->length(), 1); |
| 136 Handle<JSObject> top_frame(JSObject::cast(stack_elements->get(0))); | 136 Handle<JSObject> top_frame(JSObject::cast(stack_elements->get(0))); |
| 137 Handle<String> wasm_offset_key = | 137 Handle<String> wasm_offset_key = |
| 138 isolate->factory()->InternalizeOneByteString( | 138 isolate->factory()->InternalizeOneByteString( |
| 139 STATIC_CHAR_VECTOR("column")); | 139 STATIC_CHAR_VECTOR("column")); |
| 140 LookupIterator it(top_frame, wasm_offset_key, top_frame, | 140 LookupIterator it(top_frame, wasm_offset_key, top_frame, |
| 141 LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); | 141 LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR); |
| 142 if (it.IsFound()) { | 142 if (it.IsFound()) { |
| 143 DCHECK(JSReceiver::GetDataProperty(&it)->IsSmi()); | 143 DCHECK(JSReceiver::GetDataProperty(&it)->IsSmi()); |
| 144 // Make column number 1-based here. |
| 144 Maybe<bool> data_set = JSReceiver::SetDataProperty( | 145 Maybe<bool> data_set = JSReceiver::SetDataProperty( |
| 145 &it, handle(Smi::FromInt(byte_offset), isolate)); | 146 &it, handle(Smi::FromInt(byte_offset + 1), isolate)); |
| 146 DCHECK(data_set.IsJust() && data_set.FromJust() == true); | 147 DCHECK(data_set.IsJust() && data_set.FromJust() == true); |
| 147 USE(data_set); | 148 USE(data_set); |
| 148 } | 149 } |
| 149 } | 150 } |
| 150 | 151 |
| 151 return isolate->Throw(*error_obj); | 152 return isolate->Throw(*error_obj); |
| 152 } | 153 } |
| 153 | 154 |
| 154 RUNTIME_FUNCTION(Runtime_UnwindAndFindExceptionHandler) { | 155 RUNTIME_FUNCTION(Runtime_UnwindAndFindExceptionHandler) { |
| 155 SealHandleScope shs(isolate); | 156 SealHandleScope shs(isolate); |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 HandleScope scope(isolate); | 620 HandleScope scope(isolate); |
| 620 DCHECK_EQ(1, args.length()); | 621 DCHECK_EQ(1, args.length()); |
| 621 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 622 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
| 622 bool is_wasm_object = object->IsJSObject() && | 623 bool is_wasm_object = object->IsJSObject() && |
| 623 wasm::IsWasmObject(Handle<JSObject>::cast(object)); | 624 wasm::IsWasmObject(Handle<JSObject>::cast(object)); |
| 624 return *isolate->factory()->ToBoolean(is_wasm_object); | 625 return *isolate->factory()->ToBoolean(is_wasm_object); |
| 625 } | 626 } |
| 626 | 627 |
| 627 } // namespace internal | 628 } // namespace internal |
| 628 } // namespace v8 | 629 } // namespace v8 |
| OLD | NEW |