[JSC] Minor TypedArray fixes
Created attachment 282399 [details] Patch
Comment on attachment 282399 [details] Patch Attachment 282399 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/1597439 Number of test failures exceeded the failure limit.
Created attachment 282403 [details] Archive of layout-test-results from ews114 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 282399 [details] Patch Attachment 282399 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/1597451 New failing tests: js/dom/constructor-length.html
Created attachment 282404 [details] Archive of layout-test-results from ews102 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 282399 [details] Patch Attachment 282399 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/1597464 New failing tests: js/dom/constructor-length.html
Created attachment 282406 [details] Archive of layout-test-results from ews104 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Comment on attachment 282399 [details] Patch Attachment 282399 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/1597467 New failing tests: js/dom/constructor-length.html
Created attachment 282408 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.4
Comment on attachment 282399 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=282399&action=review r=me with comment. Assuming the other failing test is just a rebaseline. > Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp:77 > JSArrayBufferView* thisObject = jsDynamicCast<JSArrayBufferView*>(exec->argument(0)); > - if (!thisObject) > + if (!thisObject || thisObject->mode() == DataViewMode) > return throwVMError(exec, createTypeError(exec, "Receiver should be a typed array view")); I think this would be better as: if (!exec->argument(0).isCell() || !isTypedView(exec->argument(0).asCell()->type())) return throwVMError(exec, createTypeError(exec, "Receiver should be a typed array view")); JSArrayBufferView* thisObject = jsCast<JSArrayBufferView*>(exec->argument(0));
Comment on attachment 282399 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=282399&action=review >> Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp:77 >> return throwVMError(exec, createTypeError(exec, "Receiver should be a typed array view")); > > I think this would be better as: > > if (!exec->argument(0).isCell() || !isTypedView(exec->argument(0).asCell()->type())) > return throwVMError(exec, createTypeError(exec, "Receiver should be a typed array view")); > > JSArrayBufferView* thisObject = jsCast<JSArrayBufferView*>(exec->argument(0)); actually I think the return can be: return throwVMTypeError(exec, "Receiver should be a typed array view");
Created attachment 282411 [details] Patch for landing
Comment on attachment 282411 [details] Patch for landing WTF WebKit-patch :(
Created attachment 282412 [details] Patch
Comment on attachment 282412 [details] Patch Clearing flags on attachment: 282412 Committed r202667: <http://trac.webkit.org/changeset/202667>
All reviewed patches have been landed. Closing bug.
Comment on attachment 282412 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=282412&action=review > LayoutTests/platform/mac/js/dom/constructor-length-expected.txt:45 > -PASS Uint16Array.length is 3 > -PASS Uint32Array.length is 3 > -PASS Uint8Array.length is 3 > -PASS Uint8ClampedArray.length is 3 > +FAIL Uint16Array.length should be 3. Was 0. > +FAIL Uint32Array.length should be 3. Was 0. > +FAIL Uint8Array.length should be 3. Was 0. > +FAIL Uint8ClampedArray.length should be 3. Was 0. These are FAILs. Probably should update the test to expect 0?
(In reply to comment #17) > These are FAILs. Probably should update the test to expect 0? Duh! I did a rebaseline without looking at the result. I'll fix that.
Follow up: http://trac.webkit.org/changeset/202672
(In reply to comment #15) > Comment on attachment 282412 [details] > Patch > > Clearing flags on attachment: 282412 > > Committed r202667: <http://trac.webkit.org/changeset/202667> This patch ( or bug159285 ) made many JSC tests assert: https://build.webkit.org/builders/Apple%20El%20Capitan%20Debug%20JSC%20%28Tests%29/builds/3307
Just to document, fixed by https://trac.webkit.org/changeset/202673