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
..
2016-06-27 17:13:27 -07:00
2016-06-27 17:13:27 -07:00
2016-11-23 07:58:39 -08:00
2016-11-23 07:58:39 -08:00
2015-06-25 09:17:01 -08:00
2015-09-04 07:00:21 -08:00
2016-11-23 07:58:39 -08:00
2016-01-07 12:03:17 -08:00
2015-12-01 09:00:28 -08:00
2016-08-10 13:13:34 -07:00
2016-11-23 07:58:39 -08:00
2017-07-11 12:31:15 -07:00
2016-11-23 07:58:39 -08:00
2015-06-25 09:15:21 -08:00
2017-01-26 18:28:53 -08:00
2017-03-24 18:15:42 -07:00
2015-09-02 06:11:24 -08:00
2015-09-02 06:11:24 -08:00
2016-11-23 07:58:39 -08:00
2016-04-26 04:21:39 -07:00
2016-11-23 07:58:39 -08:00
2017-07-24 08:33:04 -07:00
2017-07-11 15:05:57 -07:00
2017-07-11 15:05:57 -07:00
2017-07-11 15:05:57 -07:00
2017-07-11 15:05:57 -07:00
2017-06-20 19:22:57 -07:00
2017-06-20 19:22:57 -07:00
2016-09-27 06:28:33 -07:00
2017-04-01 03:34:41 -07:00
2017-06-20 19:22:57 -07:00
2017-06-20 19:22:57 -07:00
2016-11-23 07:58:39 -08:00
2016-11-18 14:43:31 -08:00
2016-11-23 07:58:39 -08:00
2016-05-06 03:18:20 -07:00
2016-11-23 07:58:39 -08:00
2016-09-08 17:58:50 -07:00
2016-11-23 07:58:39 -08:00
2016-09-08 17:58:50 -07:00
2016-11-23 07:58:39 -08:00
2017-03-23 11:36:17 -07:00
2016-11-23 07:58:39 -08:00
2016-08-05 12:44:21 -07:00
2015-03-26 02:42:24 -08:00
2016-11-23 07:58:39 -08:00
2016-09-27 06:28:33 -07:00
2016-11-23 07:58:39 -08:00
2017-02-17 15:16:01 -08:00
2016-11-23 07:58:39 -08:00
2016-04-16 15:15:25 -07:00
2017-02-19 23:19:47 -08:00
2017-03-08 19:00:14 -08:00
2017-01-27 10:13:29 -08:00
2017-02-02 09:58:30 -08:00
2017-02-02 09:58:30 -08:00
2017-02-02 09:58:30 -08:00
2017-02-02 09:58:30 -08:00
2017-07-24 00:32:17 -07:00
2017-07-26 13:32:41 -07:00
2016-11-23 07:58:39 -08:00
2017-07-26 13:32:41 -07:00
2016-11-23 07:58:39 -08:00
2015-11-03 14:49:30 -08:00
2016-11-23 07:58:39 -08:00
2016-04-26 04:21:39 -07:00
2017-06-20 17:16:46 -07:00
2017-06-20 17:16:46 -07:00
2017-07-14 18:26:04 -07:00
2017-07-14 18:26:04 -07:00
2017-05-08 11:31:20 -07:00
2017-05-08 11:31:20 -07:00
2016-11-23 07:58:39 -08:00
2017-02-19 18:33:49 -08:00
2016-11-23 07:58:39 -08:00
2015-12-21 10:30:39 -08:00
2016-11-23 07:58:39 -08:00
2015-03-26 02:42:24 -08:00
2016-11-23 07:58:39 -08:00
2015-09-02 06:11:24 -08:00
2016-05-03 05:40:29 -07:00
2016-12-19 06:28:40 -08:00
2017-02-15 02:17:17 -08:00
2017-02-22 12:04:10 -08:00
2016-11-23 07:58:39 -08:00
2016-12-19 06:28:40 -08:00
2016-11-23 07:58:39 -08:00
2016-11-29 12:28:55 -08:00
2015-07-07 06:15:20 -08:00
2016-12-19 06:28:40 -08:00
2017-03-23 11:36:17 -07:00
2017-05-28 21:45:32 -07:00
2017-06-02 14:19:57 -07:00
2015-03-26 02:42:24 -08:00
2016-11-23 07:58:39 -08:00
2017-06-20 19:01:27 -07:00
2017-01-06 20:29:02 -08:00
2017-07-28 11:35:25 -07:00
2016-11-23 07:58:39 -08:00
2017-01-06 20:29:02 -08:00
2016-11-23 07:58:39 -08:00
2016-09-27 06:28:33 -07:00
2017-05-28 21:45:32 -07:00
2017-06-20 19:01:27 -07:00
2017-06-20 19:01:27 -07:00