Bug 159868 - [Streams API] Make ReadableStream properties not enumerable
Summary: [Streams API] Make ReadableStream properties not enumerable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords:
Depends on:
Blocks: 138561
  Show dependency treegraph
 
Reported: 2016-07-18 00:16 PDT by youenn fablet
Modified: 2016-07-19 01:00 PDT (History)
6 users (show)

See Also:


Attachments
Patch (10.88 KB, patch)
2016-07-18 00:26 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (10.96 KB, patch)
2016-07-18 00:29 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (10.96 KB, patch)
2016-07-19 00:28 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2016-07-18 00:16:50 PDT
According wpt tests, ReadableStream et al interfaces are not perfectly aligned with the test/spec
Comment 1 youenn fablet 2016-07-18 00:26:15 PDT
Created attachment 283886 [details]
Patch
Comment 2 youenn fablet 2016-07-18 00:29:01 PDT
Created attachment 283887 [details]
Patch
Comment 3 Darin Adler 2016-07-18 09:57:12 PDT
Comment on attachment 283887 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=283887&action=review

It’s surprising none of these are enumerable. Is this some kind of new trend in modern DOM APIs?

> Source/WebCore/Modules/streams/ReadableStream.js:108
> +    const options = (arguments.length > 1) ? arguments[1] : @undefined;

How is this different from:

    const options = arguments[1];

I don’t understand how the explicit length check has any effect.
Comment 4 youenn fablet 2016-07-19 00:27:14 PDT
(In reply to comment #3)
> Comment on attachment 283887 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=283887&action=review
> 
> It’s surprising none of these are enumerable. Is this some kind of new trend
> in modern DOM APIs?

WebIDL is prescribing enumerable attributes/functions.
JavaScript APIs are mostly not-enumerable AFAIK. This is the case for promises and arrays for instance.
I also think that JS classes functions are not enumerable as well.


> > Source/WebCore/Modules/streams/ReadableStream.js:108
> > +    const options = (arguments.length > 1) ? arguments[1] : @undefined;
> 
> How is this different from:
> 
>     const options = arguments[1];
> 
> I don’t understand how the explicit length check has any effect.

Right, I removed the check.
Comment 5 youenn fablet 2016-07-19 00:28:19 PDT
Created attachment 283983 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2016-07-19 01:00:00 PDT
Comment on attachment 283983 [details]
Patch for landing

Clearing flags on attachment: 283983

Committed r203402: <http://trac.webkit.org/changeset/203402>
Comment 7 WebKit Commit Bot 2016-07-19 01:00:05 PDT
All reviewed patches have been landed.  Closing bug.