Closed Bug 941018 Opened 6 years ago Closed 6 years ago

Infinite loop in codemirror.js:973

Categories

(DevTools :: Source Editor, defect, P1)

x86
All
defect

Tracking

(firefox25 unaffected, firefox26 unaffected, firefox27 fixed, firefox28 fixed)

RESOLVED FIXED
Firefox 28
Tracking Status
firefox25 --- unaffected
firefox26 --- unaffected
firefox27 --- fixed
firefox28 --- fixed

People

(Reporter: paul, Assigned: anton)

References

Details

(Keywords: regression, Whiteboard: [qa-])

Attachments

(2 files)

Attached image screenshot
While using the style editor with the split console, firefox got stuck. I think it happened when I clicked on the CSS filename in the webconsole, but I'm not sure (see screenshot).

The same thing happened a bit later when closing a Firefox window with an opened Style Editor.

No obvious STR.
STR:

1. Open any tool other than StyleEditor.
2. Open console, enable CSS messages.
3. Click on the file-name link.

Firefox now freezes. After a while, a slow script dialog pointing to the measureChar function pops up.
Assignee: nobody → anton
Status: NEW → ASSIGNED
Priority: -- → P1
This bug was caused by the selectStyleSheet function not expecting undefined as a value for its third formal parameter (col). It then tried to subtract from undefined which produced NaN which was passed, incorrectly, to the Editor instance. My patch fixes that.
Attachment #8338197 - Flags: review?(paul)
Attachment #8338197 - Flags: review?(paul) → review+
https://hg.mozilla.org/mozilla-central/rev/10a42de21755
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 28
Comment on attachment 8338197 [details] [diff] [review]
Add default value for col in selectStyleSheet

[Approval Request Comment]
Bug caused by (feature/regressing bug #): N/A
User impact if declined: In some cases, opening a stylesheet from the console will freeze the browser.
Testing completed (on m-c, etc.): m-c, local.
Risk to taking this patch (and alternatives if risky): None. The patch simply adds a default value to a parameter + regression test case.
String or IDL/UUID changes made by this patch: N/A
Attachment #8338197 - Flags: approval-mozilla-aurora?
Blocks: 919978
Keywords: regression
Comment on attachment 8338197 [details] [diff] [review]
Add default value for col in selectStyleSheet

low risk patch for a Fx27 regression, approving on aurora
Attachment #8338197 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Whiteboard: [qa-]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.