Bug 177643 - Make WSL demo compatible with Microsoft Edge
Summary: Make WSL demo compatible with Microsoft Edge
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords: InRadar
Depends on:
Blocks: 176199
  Show dependency treegraph
 
Reported: 2017-09-28 22:29 PDT by Myles C. Maxfield
Modified: 2018-10-13 19:26 PDT (History)
6 users (show)

See Also:


Attachments
Patch (2.99 KB, patch)
2017-09-28 22:34 PDT, Myles C. Maxfield
saam: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2017-09-28 22:29:50 PDT
Make WSL demo compatible with Microsoft Edge
Comment 1 Myles C. Maxfield 2017-09-28 22:34:28 PDT
Created attachment 322169 [details]
Patch
Comment 2 Saam Barati 2017-09-28 23:35:21 PDT
Comment on attachment 322169 [details]
Patch

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

> Tools/ChangeLog:7
> +        because Microsoft Edge throws an exception when trying to use a for...of loop with it. This patch also hides

Do you know why they throw? Is it just an engine bug on their end?
Comment 3 WebKit Commit Bot 2017-09-29 00:09:50 PDT
Comment on attachment 322169 [details]
Patch

Rejecting attachment 322169 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'validate-changelog', '--check-oops', '--non-interactive', 322169, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in Tools/ChangeLog contains OOPS!.

Full output: http://webkit-queues.webkit.org/results/4696196
Comment 4 Myles C. Maxfield 2017-09-29 00:12:20 PDT
(In reply to Saam Barati from comment #2)
> Comment on attachment 322169 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=322169&action=review
> 
> > Tools/ChangeLog:7
> > +        because Microsoft Edge throws an exception when trying to use a for...of loop with it. This patch also hides
> 
> Do you know why they throw? Is it just an engine bug on their end?

Looks like it's a bug in our own engine because it looks like it's not supposed to work out of the box (and it works out of the box on WebKit). https://stackoverflow.com/questions/22754315/for-loop-for-htmlcollection-elements#answer-22754453 says:

Update for ES6 in 2016
You can now use the ES6 for/of construct with a NodeList and an HTMLCollection by just adding this to your code:
NodeList.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
HTMLCollection.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
Comment 5 Myles C. Maxfield 2017-09-29 00:13:26 PDT
(In reply to Myles C. Maxfield from comment #4)
> (In reply to Saam Barati from comment #2)
> > Comment on attachment 322169 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=322169&action=review
> > 
> > > Tools/ChangeLog:7
> > > +        because Microsoft Edge throws an exception when trying to use a for...of loop with it. This patch also hides
> > 
> > Do you know why they throw? Is it just an engine bug on their end?
> 
> Looks like it's a bug in our own engine because it looks like it's not
> supposed to work out of the box (and it works out of the box on WebKit).
> https://stackoverflow.com/questions/22754315/for-loop-for-htmlcollection-
> elements#answer-22754453 says:
> 
> Update for ES6 in 2016
> You can now use the ES6 for/of construct with a NodeList and an
> HTMLCollection by just adding this to your code:
> NodeList.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
> HTMLCollection.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];

Wait, scratch that - I didn't read far enough in the answer. Seems that Edge just hasn't caught up yet to the rest of the browsers.
Comment 6 Myles C. Maxfield 2017-10-02 23:37:06 PDT
Committed r222770: <http://trac.webkit.org/changeset/222770>
Comment 7 Radar WebKit Bug Importer 2017-10-02 23:37:41 PDT
<rdar://problem/34785032>
Comment 8 Myles C. Maxfield 2018-10-13 19:26:06 PDT
Migrated to https://github.com/gpuweb/WHLSL/issues/171