Sample initialShape after putProperty call, which may go toDictionaryMode (596128, r=bhackett).

This commit is contained in:
Brendan Eich 2010-09-14 12:07:15 -07:00
Родитель 7e383a400f
Коммит 8c380c404e
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -647,6 +647,14 @@ class SetPropCompiler : public PICStubCompiler
if (!shape)
return false;
/*
* Test after calling putProperty since it can switch obj into
* dictionary mode, specifically if the shape tree ancestor line
* exceeds PropertyTree::MAX_HEIGHT.
*/
if (obj->inDictionaryMode())
return disable("dictionary");
if (!shape->hasDefaultSetter())
return disable("adding non-default setter");
if (!shape->hasSlot())