Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 89c40c1022b9046b3e31692270cdb01d414cd7fd..c11facb603f6014a2aaa2c2284ea71fe51e160d7 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -13421,6 +13421,16 @@ void Script::InitLineEnds(Handle<Script> script) { |
#define SMI_VALUE(x) (Smi::cast(x)->value()) |
bool Script::GetPositionInfo(int position, PositionInfo* info, |
OffsetFlag offset_flag) { |
+ // For wasm, we do not create an artificial line_ends array, but do the |
+ // translation directly. |
+ if (type() == Script::TYPE_WASM) { |
Yang
2016/11/15 07:42:25
InitLineEnds is called from a number of places, wh
Clemens Hammacher
2016/11/15 15:04:06
I would like to keep wasm's function offset table
|
+ Handle<wasm::WasmCompiledModule> compiled_module( |
+ wasm::WasmCompiledModule::cast(wasm_compiled_module())); |
+ DCHECK_LE(0, position); |
+ return wasm::GetPositionInfo(compiled_module, |
+ static_cast<uint32_t>(position), info); |
+ } |
+ |
Handle<Script> script(this); |
InitLineEnds(script); |