aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4jscall_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-08-28 15:52:02 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-08-28 13:57:39 +0000
commitec6996bcbed583177952f81f5bfaf1d67eb573ad (patch)
treed500d3c773794a2c49307e81a6cc91f75c6e353a /src/qml/jsruntime/qv4jscall_p.h
parent188e115c4d975c6e30ff6d3885ec91aa3b8be24d (diff)
Fix crash when running with aggressive gc
The CallData is allocated on the JS stack explicitly uninitialized. So it's important to initialize all fields (including the new newTarget) to avoid dangling pointers. Task-number: QTBUG-70205 Change-Id: Id3511fa5e32a75b3cb16f39cc0805dc2ebf42f71 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4jscall_p.h')
-rw-r--r--src/qml/jsruntime/qv4jscall_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4jscall_p.h b/src/qml/jsruntime/qv4jscall_p.h
index 55cedf50aa..31689b1ba1 100644
--- a/src/qml/jsruntime/qv4jscall_p.h
+++ b/src/qml/jsruntime/qv4jscall_p.h
@@ -86,6 +86,7 @@ struct JSCallData {
ptr->context = Encode::undefined();
ptr->accumulator = Encode::undefined();
ptr->thisObject = thisObject->asReturnedValue();
+ ptr->newTarget = Encode::undefined();
ptr->setArgc(argc);
if (argc)
memcpy(ptr->args, args, argc*sizeof(Value));