New issue
Advanced search Search tips

Issue 654701 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

Unlocking stream seems to throw an error in a promise

Project Member Reported by jakearchibald@chromium.org, Oct 11 2016

Issue description

http://jsbin.com/heqocus/quiet - see the console

The demo appears to work fine, but seems like an error is thrown in a promise, but I can't figure out where that's coming from.
 
The error message

"This readable stream reader has been released and cannot be used to monitor the stream's state"

is defined In ReadableStream.js as errReleasedReaderClosedPromise. It's saying you can't use |reader.closed| from now on as |reader| detached. WAI? Or should we suppress the uncaught-rejection somehow?

I guess we should suppress it. We can just do

thenPromise(reader[readableStreamReaderClosedPromise], undefined, () => {})

to do this, or maybe add a simpler API to V8 extras that sets [[PromiseIsHandled]]. Maybe we should do this more generally, with a spec change. I will open a spec issue.

Comment 4 by ricea@chromium.org, Nov 3 2016

Status: ExternalDependency (was: Untriaged)
Waiting for resolution in the Streams Standard.
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/2f060955e881aad0e6d5124c533403d3b172bb3b

commit 2f060955e881aad0e6d5124c533403d3b172bb3b
Author: domenic <domenic@chromium.org>
Date: Tue Nov 15 21:24:58 2016

Add markPromiseAsHandled V8 extra util

This will allow V8 extra consumers to mark a promise as handled without
adding redundant empty onRejected handlers. This is needed by streams as
discussed in https://github.com/whatwg/streams/issues/547.

BUG= chromium:654701 

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

[modify] https://crrev.com/2f060955e881aad0e6d5124c533403d3b172bb3b/src/js/promise.js
[modify] https://crrev.com/2f060955e881aad0e6d5124c533403d3b172bb3b/test/cctest/test-api.cc
[modify] https://crrev.com/2f060955e881aad0e6d5124c533403d3b172bb3b/test/cctest/test-extra.js

Comment 6 by ricea@chromium.org, Nov 18 2016

Owner: ricea@chromium.org
Status: Assigned (was: ExternalDependency)
Resolved in the Streams standard. Taking ownership. I need to fix this before the change to testharness.js which makes unhandled promises an error.
Project Member

Comment 7 by bugdroid1@chromium.org, Nov 18 2016

Labels: merge-merged-5.6
The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/2f060955e881aad0e6d5124c533403d3b172bb3b

commit 2f060955e881aad0e6d5124c533403d3b172bb3b
Author: domenic <domenic@chromium.org>
Date: Tue Nov 15 21:24:58 2016

Add markPromiseAsHandled V8 extra util

This will allow V8 extra consumers to mark a promise as handled without
adding redundant empty onRejected handlers. This is needed by streams as
discussed in https://github.com/whatwg/streams/issues/547.

BUG= chromium:654701 

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

[modify] https://crrev.com/2f060955e881aad0e6d5124c533403d3b172bb3b/src/js/promise.js
[modify] https://crrev.com/2f060955e881aad0e6d5124c533403d3b172bb3b/test/cctest/test-api.cc
[modify] https://crrev.com/2f060955e881aad0e6d5124c533403d3b172bb3b/test/cctest/test-extra.js

Cc: -domenic@chromium.org ricea@chromium.org
Owner: domenic@chromium.org
Status: Fixed (was: Assigned)
Project Member

Comment 10 by bugdroid1@chromium.org, Dec 21 2016

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

commit 88ec71ef1d62b1719e0e7dc35e18ae21e02d2f8c
Author: domenic <domenic@chromium.org>
Date: Wed Dec 21 15:13:19 2016

Mark readable stream closed promise as handled

This matches the spec update at https://github.com/whatwg/streams/commit/0745219ca7b7f02ef104145b78ebebd99c0fd12c for readable streams. The remaining work for writable streams will be performed as part of https://bugs.chromium.org/p/chromium/issues/detail?id=671958.

BUG= 654701 
TEST=will be tested by the updated expectations in https://codereview.chromium.org/2500133002

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

[modify] https://crrev.com/88ec71ef1d62b1719e0e7dc35e18ae21e02d2f8c/third_party/WebKit/Source/core/streams/ReadableStream.js

Sign in to add a comment