/[jscoverage]/trunk/js/jsscope.cpp
ViewVC logotype

Diff of /trunk/js/jsscope.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 332 by siliconforks, Thu Oct 23 19:03:33 2008 UTC revision 399 by siliconforks, Tue Dec 9 03:37:47 2008 UTC
# Line 809  Line 809 
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) {
# Line 895  Line 896 
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;
# Line 907  Line 914 
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;

Legend:
Removed from v.332  
changed lines
  Added in v.399

  ViewVC Help
Powered by ViewVC 1.1.24