New issue
Advanced search Search tips

Issue 630203 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

BroadcastChannel data is sometimes null

Project Member Reported by jakearchibald@chromium.org, Jul 21 2016

Issue description

Open 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)
 

Comment 1 by mek@chromium.org, Jul 21 2016

Is that first link the right link? It doesn't seem to do anything with broadcastchannel, it just prints random numbers...

Comment 2 by mek@chromium.org, Jul 21 2016

Status: Started (was: Untriaged)
Ah, figured out what's causing this.
Project Member

Comment 3 by bugdroid1@chromium.org, 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

Comment 4 by mek@chromium.org, Jul 22 2016

Cc: -mek@chromium.org
Owner: mek@chromium.org
Status: Fixed (was: Started)

Sign in to add a comment