Make ScriptPromiseResolver a ContextLifecycleObserver

Pausing and Resuming wasn't necessary for the ScriptPromiseResolver
because it uses the microtask queue to schedule tasks for later.

If a task is resolved during paused state it instead schedules a task
for the micro task queue.


Change-Id: I6f292200bb7ec6045f2ead2292006d2a0beee723
Reviewed-by: Kentaro Hara <>
Reviewed-by: Alexander Timin <>
Commit-Queue: Dave Tapuska <>
Cr-Commit-Position: refs/heads/master@{#618255}
7 files changed