From 149459788a577756a35a9908f79b4e9df09a0f1d Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 12 Feb 2013 21:46:01 +0100 Subject: [PATCH] Fix a crash in JSON Fully initialize the property descriptor when parsing JSON. Change-Id: Ia43ac2dae573c5d5050cb02ca8f177c363262a05 Reviewed-by: Simon Hausmann --- src/v4/qv4jsonobject.cpp | 4 ++++ tests/TestExpectations | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/v4/qv4jsonobject.cpp b/src/v4/qv4jsonobject.cpp index 74b25f3..40f7338 100644 --- a/src/v4/qv4jsonobject.cpp +++ b/src/v4/qv4jsonobject.cpp @@ -282,6 +282,10 @@ bool Parser::parseMember(Object *o) return false; PropertyDescriptor *p = o->insertMember(context->engine->newIdentifier(key)); + p->type = PropertyDescriptor::Data; + p->writable = PropertyDescriptor::Enabled; + p->enumberable = PropertyDescriptor::Enabled; + p->configurable = PropertyDescriptor::Enabled; p->value = val; END; diff --git a/tests/TestExpectations b/tests/TestExpectations index 30aad20..22cb397 100644 --- a/tests/TestExpectations +++ b/tests/TestExpectations @@ -17,7 +17,6 @@ S13.2.3_A1 failing S14_A2 failing 14.1-5-s failing 15.1.1.3-3 failing -S15.12.2_A1 failing 15.4.4.14-9-a-10 failing 15.4.4.14-9-a-17 failing 15.4.4.14-9-a-7 failing -- 2.7.4