Revert of Pending tasks in a message loop should be deleted before shutting down...
commitb55766f336448e0010c2953654f4a940409f549b
authorreveman <reveman@chromium.org>
Fri, 26 Sep 2014 20:26:05 +0000 (26 13:26 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 26 Sep 2014 20:26:20 +0000 (26 20:26 +0000)
treeb6028f16c594d6986b67b3af8b154f29e8ad945b
parentfedbbb0aa762826ba2fc85a2b934dc9660639aa7
Revert of Pending tasks in a message loop should be deleted before shutting down Blink (patchset #7 id:120001 of https://codereview.chromium.org/583043005/)

Reason for revert:
Speculative revert. Likely cause of crbug.com/418206

Original issue's description:
> Pending tasks in a message loop should be deleted before shutting down Blink
>
> Currently Blink is shut down before all the pending tasks in the message loop are deleted. This is problematic in Oilpan because a destructor of the pending tasks can touch Oilpan objects. Because Oilpan is already detached from the renderer thread at that point, touching Oilpan objects in the destructor leads to a crash. (See the bug report for a concrete scenario.)
>
> To prevent Blink objects from getting accessed after Blink is shut down, this CL deletes all pending tasks in a message loop before shutting down Blink.
>
> BUG=411026
> TEST=None. I cannot reproduce the crash.
>
> Committed: https://crrev.com/fdd5612c20f777e1279efd7c1e99d82ed04afaaf
> Cr-Commit-Position: refs/heads/master@{#296697}

TBR=tkent@chromium.org,jochen@chromium.org,jamesr@chromium.org,ager@chromium.org,jar@chromium.org,haraken@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=411026

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

Cr-Commit-Position: refs/heads/master@{#297022}
content/renderer/render_thread_impl.cc
content/renderer/render_thread_impl.h
content/renderer/renderer_main.cc