[JSC] Array.prototype.join() fails some conformance tests
Created attachment 283367 [details] Patch
Comment on attachment 283367 [details] Patch Attachment 283367 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/1665731 New failing tests: sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A2_T2.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T1.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T3.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T2.html
Created attachment 283374 [details] Archive of layout-test-results from ews101 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 283367 [details] Patch Attachment 283367 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/1665739 New failing tests: sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A2_T2.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T1.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T3.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T2.html
Created attachment 283375 [details] Archive of layout-test-results from ews105 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Comment on attachment 283367 [details] Patch Attachment 283367 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/1665744 New failing tests: sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A2_T2.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T1.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T3.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T2.html
Created attachment 283376 [details] Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.5
Comment on attachment 283367 [details] Patch Attachment 283367 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/1665753 New failing tests: sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A2_T2.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T1.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T3.html sputnik/Conformance/15_Native_Objects/15.4_Array/15.4.4/15.4.4.5_Array_prototype_join/S15.4.4.5_A4_T2.html
Created attachment 283377 [details] Archive of layout-test-results from ews116 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-yosemite Platform: Mac OS X 10.10.5
Created attachment 283380 [details] Patch
Created attachment 283382 [details] Patch
Comment on attachment 283382 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=283382&action=review > Source/JavaScriptCore/runtime/ArrayPrototype.cpp:533 > + r = JSRopeString::create(vm, r, separator, next); Can this allocation fail? > Source/JavaScriptCore/runtime/ArrayPrototype.cpp:622 > { Suggestion: It might be worth caching a VM in a local variable for exception checks.
Comment on attachment 283382 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=283382&action=review > LayoutTests/js/script-tests/array-join.js:76 > +var calleeObject = { > + toString: () => { callSequence.push("callee.toString"); return "FAIL!"; }, > + valueOf: () => { callSequence.push("calle.valueOf"); return "FAIL!"; }, > + get length () { callSequence.push("calle.length"); return lengthObject; }, > + get 0 () { callSequence.push("calle.get 0"); return index0Object; }, > + get 1 () { callSequence.push("calle.get 1"); return index1Object; } > +}; FWIW, it's quite easy to write these styles of tests using a Proxy object because a single trap will intercept all property accesses.
Comment on attachment 283382 [details] Patch (In reply to comment #12) > Comment on attachment 283382 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=283382&action=review > > > Source/JavaScriptCore/runtime/ArrayPrototype.cpp:533 > > + r = JSRopeString::create(vm, r, separator, next); > > Can this allocation fail? I am pretty sure we'd crash. > > Source/JavaScriptCore/runtime/ArrayPrototype.cpp:622 > > { > > Suggestion: It might be worth caching a VM in a local variable for exception > checks. I don't think that buys up a lot here. The function would have to keep exec and vm live around the function calls. It is not the hot part anyway. (In reply to comment #13) > Comment on attachment 283382 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=283382&action=review > > > LayoutTests/js/script-tests/array-join.js:76 > > +var calleeObject = { > > + toString: () => { callSequence.push("callee.toString"); return "FAIL!"; }, > > + valueOf: () => { callSequence.push("calle.valueOf"); return "FAIL!"; }, > > + get length () { callSequence.push("calle.length"); return lengthObject; }, > > + get 0 () { callSequence.push("calle.get 0"); return index0Object; }, > > + get 1 () { callSequence.push("calle.get 1"); return index1Object; } > > +}; > > FWIW, it's quite easy to write these styles of tests using a Proxy object > because a single trap will intercept all property accesses. I should really spend some time learning Proxy then!
Comment on attachment 283382 [details] Patch Clearing flags on attachment: 283382 Committed r203131: <http://trac.webkit.org/changeset/203131>
All reviewed patches have been landed. Closing bug.
This change appears to have caused fast/history/replacestate-nocrash.html to time out on Mac and ios-sim debug testers https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Fhistory%2Freplacestate-nocrash.html
Re-opened since this is blocked by bug 159698
Committed r203147: <http://trac.webkit.org/changeset/203147>