BroadcastChannel data is sometimes null |
|||
Issue descriptionOpen http://output.jsbin.com/tonawe/quiet in one window - this displays messages received, or a red box if a blank message is received Open http://output.jsbin.com/ludoto/quiet in another - this posts a random number every frame Make sure both are visible so requestAnimationFrame fires. The first window frequently receives messages where event.data is null, but I don't think any messages are being sent like that. Spotted on OSX 54.0.2803.0 canary (64-bit)
,
Jul 21 2016
Ah, figured out what's causing this.
,
Jul 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/af71dd08b3a335dd78e541e03c379e99a83f57a7 commit af71dd08b3a335dd78e541e03c379e99a83f57a7 Author: mek <mek@chromium.org> Date: Fri Jul 22 03:51:20 2016 Use array<uint8> rather than string to pass BroadcastChannel messages. Even though SerializedScriptValue normally serializes values to a WTF::String, the string isn't actually a valid unicode string. Because of that it can't be safely passed over mojo as a string (invalid strings get silently converted to null). This changes the mojo interface to use array<uint8> instead, thereby making sure arbitrary values get passed across correctly. BUG= 630203 Review-Url: https://codereview.chromium.org/2171843002 Cr-Commit-Position: refs/heads/master@{#407048} [modify] https://crrev.com/af71dd08b3a335dd78e541e03c379e99a83f57a7/content/browser/broadcast_channel/broadcast_channel_provider.cc [modify] https://crrev.com/af71dd08b3a335dd78e541e03c379e99a83f57a7/content/browser/broadcast_channel/broadcast_channel_provider.h [modify] https://crrev.com/af71dd08b3a335dd78e541e03c379e99a83f57a7/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp [modify] https://crrev.com/af71dd08b3a335dd78e541e03c379e99a83f57a7/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.h [modify] https://crrev.com/af71dd08b3a335dd78e541e03c379e99a83f57a7/third_party/WebKit/public/platform/modules/broadcastchannel/broadcast_channel.mojom
,
Jul 22 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by mek@chromium.org
, Jul 21 2016