Closed
Bug 1112040
Opened 10 years ago
Closed 10 years ago
No error logged anymore for invalid regular expression in 'pattern' attribute
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
mozilla39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: sebo, Assigned: mrbkap)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
(deleted),
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
The test case for bug 901841[1] should cause an error to be logged to the console about the invalid regular expression using within the 'pattern' attribute of the <input> field.
mozregression gives this:
mozilla-central:
Last good revision: 58c5a3427997 (2014-05-16)
First bad revision: 2893f60d5903 (2014-05-17)
Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=58c5a3427997&tocha
nge=2893f60d5903
mozilla-inbound:
Last good revision: cf89b5d018f8
First bad revision: 2893f60d5903
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=cf89b5
d018f8&tochange=2893f60d5903
Without knowing the code I assume this is related to bug 976446, so I CCed Brian.
Sebastian
[1] https://bugzilla.mozilla.org/attachment.cgi?id=786154
Updated•10 years ago
|
Flags: needinfo?(bhackett1024)
Comment 1•10 years ago
|
||
The JS engine is reporting the error in the regexp correctly, but nsContentUtils::IsPatternMatching ignores that failure, clears the pending exception and pretends the result was a match.
Flags: needinfo?(bhackett1024)
Assignee | ||
Comment 3•10 years ago
|
||
I'm surprised this regressed, looking at the code, though I think bholley cleaned up at least some of the error reporting stuff somewhat recently. I don't think there's any reason we couldn't just report the error, though...
Flags: needinfo?(mrbkap)
Assignee | ||
Comment 4•10 years ago
|
||
This seems to do the trick. There's no page-visible exception because we do everything in the junk scope (so we simply report a message to the console).
Attachment #8577524 -
Flags: review?(bobbyholley)
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8577525 -
Flags: review?(bobbyholley)
Comment 6•10 years ago
|
||
Thank you!
Updated•10 years ago
|
Attachment #8577525 -
Flags: review?(bobbyholley) → review+
Updated•10 years ago
|
Attachment #8577524 -
Flags: review?(bobbyholley) → review+
Assignee | ||
Comment 7•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/93c8e1dfed14
https://hg.mozilla.org/integration/mozilla-inbound/rev/f017644da2e2
Assignee: nobody → mrbkap
Comment 8•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/93c8e1dfed14
https://hg.mozilla.org/mozilla-central/rev/f017644da2e2
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Reporter | ||
Comment 9•9 years ago
|
||
I just realized that I never verified this. It's working fine for me in Firefox 46.0.1 with a little nit, which I filed now as bug 1272297.
Sebastian
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•