Chromium Code Reviews
Description[Extensions Bindings] Return result from event dispatch
The JS bindings return an array of results from a call to dispatch(),
containing the results returned by each listener. This is primarily
used, it seems, to detect whether or not a message port will be used
asynchronously through the onMessage event. Because of this, it is
(for now) necessary to also support in native bindings.
Add functionality to return the results from a JS dispatch() call on an
event. Since this is called directly from JS, we should know that
running JS synchronously from that point is safe.
Add tests for returning the result of dispatch() as well as end-to-end
tests for asynchronously responding to a message.
BUG=653596
Review-Url: https://codereview.chromium.org/2921013002
Cr-Commit-Position: refs/heads/master@{#478838}
Committed: https://chromium.googlesource.com/chromium/src/+/a3c4e75c6feb70b9af379067bf2daa7c9ef92b62
Patch Set 1 #Patch Set 2 : . #Patch Set 3 : . #
Total comments: 16
Patch Set 4 : jbroman's #
Total comments: 2
Patch Set 5 : add listener count todo #Messages
Total messages: 31 (22 generated)
|