Oilpan: handle delayed removal of PromiseTracker promises.

When a PromiseTracker is disabled as part of shutting down, it clears
its ID -> vector(PromiseData) map. However, once the unfulfilled
promises in that cleared map later on have their weak callbacks
invoked, we weren't prepared for the map being empty. Add the required
empty map check.

A further twist for Oilpan is that the ScopedPersistents held on the
PromiseData objects need to be cleared out eagerly to prevent v8
assuming that these objects will leak -- they won't, but will only be
cleared at the next Oilpan GC. Be more eager, and promptly clear out
the references.

R=haraken
BUG=414163

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

git-svn-id: svn://svn.chromium.org/blink/trunk@181979 bbb929c8-8fbe-4397-9dbb-9b2b20218538
1 file changed
tree: 5ce4878ff63d92642b1086f86c275a1be11a1231
  1. third_party/