We get an assertion compiling this regular expression: /|[x\B-\u00b5]/i; <rdar://problem/5646361>
The issue is specific to the use of the "\B" escape sequence inside a character class. It's supposed to be an error to do that.
Created attachment 17924 [details] patch
I haven't looked at the spec yet, but in Firefox, javascript:alert(/|[x\B-\u00b5]/) doesn't raise an error. Perhaps the test and/or ChangeLog should mention that this is an intentional difference in behavior.
(In reply to comment #3) > I haven't looked at the spec yet, but in Firefox, > javascript:alert(/|[x\B-\u00b5]/) doesn't raise an error. Perhaps the test > and/or ChangeLog should mention that this is an intentional difference in > behavior. We could also have \B mean just "B" in character classes if that matches the other browsers. That's a simple change.
Comment on attachment 17924 [details] patch Marking r- per Alexey's comment - it would be better to match other browsers for this case. (If that's hard to do right away, we can file a follow-up bug.)
Created attachment 17942 [details] patch, this time matching behavior of Gecko rather than the ECMAScript spec
(In reply to comment #5) > it would be better to match other browsers > for this case. (If that's hard to do right away, we can file a follow-up bug.) It was easy to do. I haven't tested IE yet, though.
Comment on attachment 17942 [details] patch, this time matching behavior of Gecko rather than the ECMAScript spec r=me
Committed revision 28785. Committed revision 28787.