From 3a025d75fd470dfcda5ae67e5b8ece0b00cdc8c9 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 3 Dec 2018 10:46:57 +0100 Subject: Fix line number reporting in scripts when lookups are enabled For regular object property lookups, we correctly store the byte code instruction pointer that allows us to determine the correct line number in case of a reference error. We need to do the same for lookups in the global object. Change-Id: I0f44dd06b5f66df9626576eeaa802b18fa4a26cd Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4vme_moth.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index 5208894934..937a535b83 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -550,6 +550,7 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine, MOTH_END_INSTR(LoadName) MOTH_BEGIN_INSTR(LoadGlobalLookup) + STORE_IP(); QV4::Lookup *l = function->compilationUnit->runtimeLookups + index; acc = l->globalGetter(l, engine); CHECK_EXCEPTION; -- cgit v1.2.3