Commit 1e775d2a authored by Jian Liang's avatar Jian Liang Committed by Simon Hausmann
Browse files

Fix memory leak caused by QV4::ErrorObject


We should destruct QV4::ErrorObject::Data instead of QV4::ErrorObject in
QV4::ErrorObject::destroy() since all the members is stored in
QV4::ErrorObject::Data.

Task-number: QTBUG-42340
Change-Id: Ifff6413c0726591c335a421a5f289c1886f80980
Reviewed-by: default avatarSimon Hausmann <simon.hausmann@digia.com>
parent be9c969b
No related merge requests found
Showing with 1 addition and 1 deletion
......@@ -71,7 +71,7 @@ struct ErrorObject: Object {
static ReturnedValue method_get_stack(CallContext *ctx);
static void markObjects(Managed *that, ExecutionEngine *e);
static void destroy(Managed *that) { static_cast<ErrorObject *>(that)->~ErrorObject(); }
static void destroy(Managed *that) { static_cast<ErrorObject *>(that)->d()->~Data(); }
};
template<>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment