This actually could be useful for some of the other work we're doing. A simple-minded version would take str_replace in jsstr.cpp and make one that loops around. It should check that if it got a RegExp, that the global flag were set. This wouldn't be super fast but it would be a working first pass.
This actually could be useful for some of the other work we're doing. A simple-minded version would take
str_replace
injsstr.cpp
and make one that loops around. It should check that if it got aRegExp
, that the global flag were set. This wouldn't be super fast but it would be a working first pass.https://bugzilla.mozilla.org/show_bug.cgi?id=1540021 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll