Merge r10215 from the bleeding_edge to the 3.6 branch.

Ensure that non-optimized code objects are not flushed for inlined functions.

Collector was flushing them if optimized code was reachable only through the stack (not through the JSFunction object) which happens when you have a pending lazy deoptimization.

Also prevent v8::Script::New from leaking internal objects allocated by the compiler into outer HandleScope.

R=kmillikin@chromium.org
BUG=http://crbug.com/97116
TEST=test/mjsunit/regress/regress-97116.js

Review URL: http://codereview.chromium.org/8888011
------------------------------------------------------------------------
Review URL: http://codereview.chromium.org/8889046

git-svn-id: http://v8.googlecode.com/svn/branches/3.6@10224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
6 files changed