[Webkit-unassigned] [Bug 216149] New: Promises created from async functions don't resolve when document is detached.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 3 15:27:10 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=216149

            Bug ID: 216149
           Summary: Promises created from async functions don't resolve
                    when document is detached.
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: john.david.dalton at gmail.com

The following snippet works in Chrome:

(async () => {
  var i = document.createElement('iframe');
  document.body.appendChild(i);
  var a = i.contentWindow.eval('(async () => await 1)');
  i.remove(); // someone removes the iframe
  const v = await a();
  console.log(v);
})();

Our use case has code that works when wired up and then someone removes the iframe and `await` no longer resolves.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200903/a89fe1eb/attachment.htm>


More information about the webkit-unassigned mailing list