Fix |RunMicrotasks()| leaking reference to the last context being run on.
authorharaken@chromium.org <haraken@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 2 May 2014 08:00:47 +0000 (08:00 +0000)
committerharaken@chromium.org <haraken@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 2 May 2014 08:00:47 +0000 (08:00 +0000)
commit570fd74fc09a7021ca93b7dc99522d6bfeee2e0c
tree1d3a793009f5999dd7503fc6b9d4ae5a0f070e1e
parent59e5c97ec0f6e625d4a31e591a3527f5324b5249
Fix |RunMicrotasks()| leaking reference to the last context being run on.

RunMicrotasks() executes pending tasks and swaps the old array with a new array. However, the new array contains the reference to the current context as its creation context. This prevents the context from gc-ed until RunMicrotasks() is executed in the different context.

BUG=crbug.com/367016
LOG=y
R=rafaelw@chromium.org, rossberg@chromium.org

Review URL: https://codereview.chromium.org/250883002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/bootstrapper.cc
src/contexts.h
src/execution.cc
src/object-observe.js
src/promise.js
src/v8natives.js