From bd4064eabf79a6166805c877ee622931df6fb172 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 6 Sep 2018 13:38:23 +0200 Subject: Throw a type error when trying to destructure null or undefined Change-Id: Id1bba1a729124bccb8a90dcf40252fe5c69d27a3 Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4instr_moth.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/qml/compiler/qv4instr_moth.cpp') diff --git a/src/qml/compiler/qv4instr_moth.cpp b/src/qml/compiler/qv4instr_moth.cpp index b09f1d09d0..00a1e8470b 100644 --- a/src/qml/compiler/qv4instr_moth.cpp +++ b/src/qml/compiler/qv4instr_moth.cpp @@ -702,6 +702,9 @@ void dumpBytecode(const char *code, int len, int nLocals, int nFormals, int /*st d << dumpRegister(firstReg, nFormals) << ", " << count; MOTH_END_INSTR(InitializeBlockDeadTemporalZone) + MOTH_BEGIN_INSTR(ThrowOnNullOrUndefined) + MOTH_END_INSTR(ThrowOnNullOrUndefined) + MOTH_BEGIN_INSTR(LoadQmlContext) d << dumpRegister(result, nFormals); MOTH_END_INSTR(LoadQmlContext) -- cgit v1.2.3