New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 692629 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

navigator.presentation.receiver is undefined in presentation frame

Project Member Reported by mfo...@chromium.org, Feb 15 2017

Issue description

Chrome Version:  58.0.3013.0 canary (64-bit)
OS: Mac OS X Sierra 10.12

What steps will reproduce the problem?
(1) Serve the files below in Chrome from an HTTP server (update IP addresses if necessary)
(2) Load controller.html
(3) Click Start and pick a Cast device


What is the expected result?
Presentation starts and Object/PresentationReceiver is displayed on the Cast device

What happens instead?
undefined is printed

Please use labels and text to provide additional information.
Reported in https://github.com/w3c/presentation-api/issues/266#issuecomment-279902053

 

Comment 1 by mfo...@chromium.org, Feb 15 2017

Attaching files

controller.html:

<!DOCTYPE html>
<meta charset="utf-8">
<html>
<head>
<script type="text/javascript">
  startPresentation = () => new PresentationRequest("http://172.17.32.168:8087/presentation.html").start();
</script>
</head>
<body>
  <button name="start" onclick="startPresentation()">
    Start
  </button>
</body>
</html>

presentation.html:

<!DOCTYPE html>
<meta charset="utf-8">
<script>
window.onload = () => {
  document.body.innerHTML += navigator.presentation.receiver;
};
</script>

controller.html
310 bytes View Download
presentation.html
147 bytes View Download

Comment 2 by sko...@chromium.org, Feb 16 2017

Status: Assigned (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/00db1bcf1a71b903e3a03ce5e277c4d5d1b49a88

commit 00db1bcf1a71b903e3a03ce5e277c4d5d1b49a88
Author: zhaobin <zhaobin@chromium.org>
Date: Wed Feb 22 21:36:06 2017

[Presentation API] return valid WebPresentationConnection object in PresentationReceiver

PresentationReceiver::onReceiverConnectionAvailable() returns nullptr if receiver.connectionList property is not accessed, causing PresentationConnectionProxy holding invalid source_connection_ and may crash render process.

BUG= 692629 

Review-Url: https://codereview.chromium.org/2706453002
Cr-Commit-Position: refs/heads/master@{#452213}

[add] https://crrev.com/00db1bcf1a71b903e3a03ce5e277c4d5d1b49a88/third_party/WebKit/LayoutTests/presentation/presentation-onreceiverconnection.html
[modify] https://crrev.com/00db1bcf1a71b903e3a03ce5e277c4d5d1b49a88/third_party/WebKit/LayoutTests/presentation/resources/presentation-service-mock.js
[modify] https://crrev.com/00db1bcf1a71b903e3a03ce5e277c4d5d1b49a88/third_party/WebKit/Source/modules/presentation/PresentationReceiver.cpp
[modify] https://crrev.com/00db1bcf1a71b903e3a03ce5e277c4d5d1b49a88/third_party/WebKit/Source/modules/presentation/PresentationReceiverTest.cpp

Status: Fixed (was: Assigned)
Closing as I believe this has been fixed.  Bin, please reopen if there is more work to do here.

Sign in to add a comment