When String.prototype.replace is passed a function as a second parameter it is incorrectly applying "special replacement patterns" to the returned results var a="ABC"; a.replace("B", function(){ return "$$" }); // Should be "A$$C" - in Safari 10.1 and 10.2 it is "A$C"
<rdar://problem/31315899>
I'll take look to this issue.
I'll upload patch soon, just need to make more proper tests
Created attachment 305864 [details] Patch Fix
Comment on attachment 305864 [details] Patch r=me
Comment on attachment 305864 [details] Patch Attachment 305864 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/3442729 New failing tests: js/string_replace_function.html js/string_replace_regexp.html
Created attachment 305903 [details] Archive of layout-test-results from ews107 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Comment on attachment 305864 [details] Patch Attachment 305864 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3442751 New failing tests: js/string_replace_function.html js/string_replace_regexp.html
Created attachment 305906 [details] Archive of layout-test-results from ews112 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 305864 [details] Patch Attachment 305864 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/3442798 New failing tests: js/string_replace_function.html js/string_replace_regexp.html
Created attachment 305907 [details] Archive of layout-test-results from ews102 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 305864 [details] Patch Attachment 305864 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3442825 New failing tests: js/string_replace_function.html js/string_replace_regexp.html
Created attachment 305911 [details] Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Created attachment 305952 [details] Patch Rebased version to check builds
Patch landed https://trac.webkit.org/changeset/214662
(In reply to GSkachkov from comment #15) > Patch landed https://trac.webkit.org/changeset/214662 Please close out the bugs when landing fixes. Also, no need for r? on any patches once things have landed.
(In reply to Saam Barati from comment #16) > (In reply to GSkachkov from comment #15) > > Patch landed https://trac.webkit.org/changeset/214662 > > Please close out the bugs when landing fixes. Also, no need for r? on any > patches once things have landed. Sorry, but I don't have permissions to do this, I only can close bugs that I created. Yeah for this bugs I've have been waiting until webkit nightly starts works to ask authors to check fix and close the issue.
(In reply to GSkachkov from comment #17) > (In reply to Saam Barati from comment #16) > > (In reply to GSkachkov from comment #15) > > > Patch landed https://trac.webkit.org/changeset/214662 > > > > Please close out the bugs when landing fixes. Also, no need for r? on any > > patches once things have landed. > > Sorry, but I don't have permissions to do this, I only can close bugs that > I created. Yeah for this bugs I've have been waiting until webkit nightly > starts works to ask authors to check fix and close the issue. Ah, ok. Let me try to get you edit bugs privileges so you can close bugs you didn't create.