Infinite loop in codemirror.js:973

RESOLVED FIXED in Firefox 27

Status

()

Firefox
Developer Tools: Source Editor
P1
normal
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: paul, Assigned: anton)

Tracking

({regression})

Trunk
Firefox 28
x86
All
regression
Points:
---

Firefox Tracking Flags

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

Details

(Whiteboard: [qa-])

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
Created attachment 8335313 [details]
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.
(Assignee)

Comment 1

5 years ago
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
(Assignee)

Comment 2

5 years ago
Created attachment 8338197 [details] [diff] [review]
Add default value for col in selectStyleSheet

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)
(Assignee)

Updated

5 years ago
status-firefox25: --- → unaffected
status-firefox26: --- → unaffected
status-firefox27: --- → affected
status-firefox28: --- → affected
(Reporter)

Updated

5 years ago
Attachment #8338197 - Flags: review?(paul) → review+
https://hg.mozilla.org/mozilla-central/rev/10a42de21755
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 28
(Assignee)

Updated

5 years ago
status-firefox28: affected → fixed
(Assignee)

Comment 5

5 years ago
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?

Updated

5 years ago
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-]
You need to log in before you can comment on or make changes to this bug.