Bug 162066 - Web Inspector: make Object.awaitEvent synchronously add an event listener
Summary: Web Inspector: make Object.awaitEvent synchronously add an event listener
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks: 161634
  Show dependency treegraph
 
Reported: 2016-09-16 10:40 PDT by Devin Rousso
Modified: 2016-09-16 13:51 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.40 KB, patch)
2016-09-16 10:46 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2016-09-16 10:40:06 PDT
From http://webkit.org/b/161634:
> Currently, Object.awaitEvent adds a listener inside the promise constructor
> function argument, which is evaluated on the next tick. This means that if
> two awaitEvents are chained together, and the event we expect is dispatched
> synchronously, then the second event will likely be dispatched before the
> Promise is evaluated and adds its singleFireEventListener.
Comment 1 Radar WebKit Bug Importer 2016-09-16 10:40:26 PDT
<rdar://problem/28339804>
Comment 2 Devin Rousso 2016-09-16 10:46:01 PDT
Created attachment 289074 [details]
Patch
Comment 3 Brian Burg 2016-09-16 13:29:10 PDT
Comment on attachment 289074 [details]
Patch

r=me
Comment 4 WebKit Commit Bot 2016-09-16 13:51:26 PDT
Comment on attachment 289074 [details]
Patch

Clearing flags on attachment: 289074

Committed r206046: <http://trac.webkit.org/changeset/206046>
Comment 5 WebKit Commit Bot 2016-09-16 13:51:29 PDT
All reviewed patches have been landed.  Closing bug.