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.

Review URL:
Review URL:

git-svn-id: ce2b1a6d-e550-0410-aec6-3dcde31c8c00
6 files changed