Bug 162066

Summary: Web Inspector: make Object.awaitEvent synchronously add an event listener
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 161634    
Attachments:
Description Flags
Patch none

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 BJ 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.