Reorder SharedFunctionInfo setup in lazy compile, quick fix for crbug.com/49099
authorricow@chromium.org <ricow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 19 Jul 2010 06:29:30 +0000 (06:29 +0000)
committerricow@chromium.org <ricow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 19 Jul 2010 06:29:30 +0000 (06:29 +0000)
commit5caa11dafbcb6d2bc3553629dc810f6f07984b82
tree018da5aeb8f8ee1b17e4067a62a37ca0cd993fa1
parent49573265210c672dfee5576e8a4bb21ff4acb195
Reorder SharedFunctionInfo setup in lazy compile, quick fix for crbug.com/49099

This fixes issue 49099 (http://crbug.com/49099) that makes chromium
crash if a gc is triggered by setting the scopeinfo in CompileLazy. If
this gc triggers code flushing the compiled function could be flushed,
causing the ASSERT(shared->is_compiled()) to fail. By reordering the
two methods we make sure that no allocation happens before the end of
the method.

Review URL: http://codereview.chromium.org/3035006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/compiler.cc