Bug 172717 - [Readable Streams API] Fix filling of descriptor from queue
Summary: [Readable Streams API] Fix filling of descriptor from queue
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: Romain Bellessort
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-05-30 07:55 PDT by Romain Bellessort
Modified: 2017-12-16 11:00 PST (History)
6 users (show)

See Also:


Attachments
Patch (12.00 KB, patch)
2017-07-05 09:06 PDT, Romain Bellessort
no flags Details | Formatted Diff | Diff
Patch (16.15 KB, patch)
2017-12-15 01:37 PST, Romain Bellessort
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews117 for mac-elcapitan (3.01 MB, application/zip)
2017-12-15 04:27 PST, EWS Watchlist
no flags Details
Patch (16.15 KB, patch)
2017-12-15 05:35 PST, Romain Bellessort
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews114 for mac-elcapitan (3.27 MB, application/zip)
2017-12-15 08:16 PST, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Romain Bellessort 2017-05-30 07:55:14 PDT
Filling of pullIntoDescriptor from queue is broken.
Comment 1 Romain Bellessort 2017-07-05 09:06:47 PDT
Created attachment 314608 [details]
Patch
Comment 2 youenn fablet 2017-07-07 12:32:26 PDT
Comment on attachment 314608 [details]
Patch

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

> Source/WebCore/Modules/streams/ReadableByteStreamInternals.js:509
> +        new @Uint8Array(pullIntoDescriptor.buffer).set(new @Uint8Array(headOfQueue.buffer, headOfQueue.byteOffset, bytesToCopy), destStart);

Is set safe to use? If Uint8Array prototype is modified, we probably cannot use set directly.
We could probably do something like @Uint8Array.prototype.@set.@call(...)
Comment 3 youenn fablet 2017-12-14 09:11:16 PST
Comment on attachment 314608 [details]
Patch

Can you verify UInt8Array.set and fix it if necessary
Comment 4 Romain Bellessort 2017-12-15 01:30:05 PST
(In reply to youenn fablet from comment #3)
> Comment on attachment 314608 [details]
> Patch
> 
> Can you verify UInt8Array.set and fix it if necessary

I checked @Uint8Array.prototype.@set.@call(...) but it doesn't work, @set cannot be resolved. I tried to fix it in different ways but couldn't, initialization of @Uint8Array and public/private methods wasn't clear to me.

As discussed with you, I will land the patch with a FIXME and file a corresponding bug.
Comment 5 Romain Bellessort 2017-12-15 01:37:12 PST
Created attachment 329475 [details]
Patch
Comment 6 EWS Watchlist 2017-12-15 04:27:23 PST
Comment on attachment 329475 [details]
Patch

Attachment 329475 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/5672230

New failing tests:
webgl/1.0.2/conformance/context/context-release-with-workers.html
webgl/1.0.2/conformance/context/context-release-upon-reload.html
Comment 7 EWS Watchlist 2017-12-15 04:27:25 PST
Created attachment 329485 [details]
Archive of layout-test-results from ews117 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 8 Romain Bellessort 2017-12-15 05:35:34 PST
Created attachment 329487 [details]
Patch
Comment 9 Romain Bellessort 2017-12-15 07:58:46 PST
Failure on mac-debug does not seem to be related to this patch.
Comment 10 EWS Watchlist 2017-12-15 08:16:56 PST
Comment on attachment 329487 [details]
Patch

Attachment 329487 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/5673590

New failing tests:
webgl/1.0.2/conformance/context/context-release-with-workers.html
Comment 11 EWS Watchlist 2017-12-15 08:16:58 PST
Created attachment 329489 [details]
Archive of layout-test-results from ews114 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 12 youenn fablet 2017-12-15 08:44:06 PST
(In reply to Romain Bellessort from comment #9)
> Failure on mac-debug does not seem to be related to this patch.

Indeed!
Comment 13 WebKit Commit Bot 2017-12-15 09:04:16 PST
Comment on attachment 329487 [details]
Patch

Rejecting attachment 329487 [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', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 329487, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
ted/w3c/ChangeLog
fatal: multiple stage entries for merged file 'LayoutTests/imported/w3c'

Failed to run "['git', 'commit', '--all', '-F', '-']" exit_code: 128 cwd: /Volumes/Data/EWS/WebKit

You have both LayoutTests/imported/w3c and LayoutTests/imported/w3c/ChangeLog
fatal: multiple stage entries for merged file 'LayoutTests/imported/w3c'

Failed to run "['git', 'commit', '--all', '-F', '-']" exit_code: 128 cwd: /Volumes/Data/EWS/WebKit
Updating OpenSource
Current branch master is up to date.

Full output: http://webkit-queues.webkit.org/results/5674118
Comment 14 WebKit Commit Bot 2017-12-16 10:59:32 PST
Comment on attachment 329487 [details]
Patch

Clearing flags on attachment: 329487

Committed r226005: <https://trac.webkit.org/changeset/226005>
Comment 15 WebKit Commit Bot 2017-12-16 10:59:34 PST
All reviewed patches have been landed.  Closing bug.
Comment 16 Radar WebKit Bug Importer 2017-12-16 11:00:59 PST
<rdar://problem/36091533>