Let's write the function in builtin JS.
It looks like this was addressed by: [ES6] Make RegExp.prototype.toString spec compliant https://bugs.webkit.org/show_bug.cgi?id=155341 http://trac.webkit.org/changeset/197999 It could probably still be written as a builtin, but the actual issue here ("source" and "flags" property accesses) has been fixed. *** This bug has been marked as a duplicate of bug 155341 ***