Don't assert when ServiceWorker::from is passed an empty promise
If the document gets detached before Service Worker registration completes, the CallbackPromiseAdapter promise gets cleared. Then when registration completes, ServiceWorker::from is passed the resolver with the empty promise. Before this patch, an assert would then occur because ScriptPromise::then bails before adopting its fulfilled/rejected arguments. This patch fixes an overly aggressive assert in V8GarbageCollected and also makes ServiceWorker creation skip waiting on an empty promise. BUG=384498 Review URL: https://codereview.chromium.org/337053004 git-svn-id: svn://svn.chromium.org/blink/trunk@176282 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment