react-native/React
Tom Clarkson 42f7b9e717 Improved window.postMessage implementation
Summary:
Adds a queue to postMessage so that messages sent close together are not lost.

Setting location="a";location="b" results in only "b" reaching shouldStartLoadWithRequest. Making the second update asynchronous with setTimeout does not fix the issue unless a delay is added.

With this update, postMessage queues "b" until it gets a "message:received" event that confirms "a" has already been processed.

The included test sends two messages from a webview and checks that both are received. It fails against the preexisting code with the first message being dropped.
Closes https://github.com/facebook/react-native/pull/11304

Differential Revision: D5481385

Pulled By: hramos

fbshipit-source-id: 9b6af195eeff8f20c820e2fcdac997c90763e840
2017-07-28 11:35:25 -07:00
..
Base ios: allow application/javascript and text/javascript for packager bundle mime type 2017-07-26 11:48:47 -07:00
CxxBridge in RCT_DEBUG mode, make the js stack bigger 2017-07-20 12:16:21 -07:00
CxxModule Replace exported method registration with statically allocated struct 2017-07-24 07:01:53 -07:00
CxxUtils More efficient dynamic->NSString conversion. 2017-07-26 18:31:12 -07:00
DevSupport Add blob implementation with WebSocket integration 2017-07-26 08:23:20 -07:00
Executors Add more information to `__fbBatchedBridge is undefined` error 2017-07-26 11:21:59 -07:00
Inspector Debugger channel messages should be processed only on a background thread 2017-07-24 06:45:26 -07:00
Modules Fix crash for unsupported device orientation events 2017-07-28 03:02:25 -07:00
Profiler Mark non-extern strings static 2017-07-25 04:49:46 -07:00
React.xcodeproj Add blob implementation with WebSocket integration 2017-07-26 08:23:20 -07:00
ReactLegacy.xcodeproj Fix missing files in OSS build 2017-07-26 05:47:22 -07:00
Views Improved window.postMessage implementation 2017-07-28 11:35:25 -07:00
third-party.xcconfig More attempts to fix Travis CI runs 2017-05-10 04:32:54 -07:00