809 |
JSScopeProperty *sprop; |
JSScopeProperty *sprop; |
810 |
PropTreeKidsChunk *chunk; |
PropTreeKidsChunk *chunk; |
811 |
uintN i, n; |
uintN i, n; |
812 |
|
uint32 shape; |
813 |
|
|
814 |
rt = cx->runtime; |
rt = cx->runtime; |
815 |
if (!parent) { |
if (!parent) { |
896 |
} |
} |
897 |
|
|
898 |
locked_not_found: |
locked_not_found: |
899 |
|
/* |
900 |
|
* Call js_GenerateShape before the allocation to prevent collecting the |
901 |
|
* new property when the shape generation triggers the GC. |
902 |
|
*/ |
903 |
|
shape = js_GenerateShape(cx, JS_TRUE, NULL); |
904 |
|
|
905 |
sprop = NewScopeProperty(rt); |
sprop = NewScopeProperty(rt); |
906 |
if (!sprop) |
if (!sprop) |
907 |
goto out_of_memory; |
goto out_of_memory; |
914 |
sprop->flags = child->flags; |
sprop->flags = child->flags; |
915 |
sprop->shortid = child->shortid; |
sprop->shortid = child->shortid; |
916 |
sprop->parent = sprop->kids = NULL; |
sprop->parent = sprop->kids = NULL; |
917 |
sprop->shape = js_GenerateShape(cx, JS_TRUE); |
sprop->shape = shape; |
918 |
|
|
919 |
if (!parent) { |
if (!parent) { |
920 |
entry->child = sprop; |
entry->child = sprop; |