[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}
Showing
Please register or sign in to comment