Fix a crash in JSON
authorLars Knoll <lars.knoll@digia.com>
Tue, 12 Feb 2013 20:46:01 +0000 (21:46 +0100)
committerSimon Hausmann <simon.hausmann@digia.com>
Tue, 12 Feb 2013 21:48:30 +0000 (22:48 +0100)
Fully initialize the property descriptor when parsing
JSON.

Change-Id: Ia43ac2dae573c5d5050cb02ca8f177c363262a05
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/v4/qv4jsonobject.cpp
tests/TestExpectations

index 74b25f3..40f7338 100644 (file)
@@ -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;
index 30aad20..22cb397 100644 (file)
@@ -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