Closed Bug 1468989 Opened 4 years ago Closed 4 years ago

Filtering throws when output has a longString exception

Categories

(DevTools :: Console, defect, P1)

defect

Tracking

(firefox63 fixed)

RESOLVED FIXED
Firefox 63
Tracking Status
firefox63 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

Attachments

(3 files)

**Steps to reproduce**
1. Go to data:text/html,<meta charset=utf8>Hello<script>throw "aa".repeat(10000)</script>
2. Open the console
3. In the filter field, enter "b"


**Expected results**

I can see the letter I just typed, and the error message in the output is hidden

**Actual results**

The letter isn't rendered in the input field, and the output isn't filtered

---

In the browser console, there's an exception: 

> TypeError: messageText.toLocaleLowerCase is not a function - messages.js:850:10

which comes from https://searchfox.org/mozilla-central/rev/42930ab9634ebf3f62aed60f7d1c1bf25c0bf00c/devtools/client/webconsole/reducers/messages.js#850.
Basically, if the error message is a longString, we try to call toLocaleLowerCase on an object, which is wrong.
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Priority: -- → P1
Comment on attachment 8985679 [details]
Bug 1468989 - Add a longString exception in filter tests; .

https://reviewboard.mozilla.org/r/251222/#review257960
Attachment #8985679 - Flags: review?(odvarko) → review+
Comment on attachment 8985680 [details]
Bug 1468989 - Fix isTextInMessageText for longStrings; .

https://reviewboard.mozilla.org/r/251224/#review257962

Looks good and the issue is fixed now.

R+ assuming try is green.

Thanks Nicolas!

Honza
Attachment #8985680 - Flags: review?(odvarko) → review+
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1574b9c9989f
Fix mocha tests; r=Honza.
https://hg.mozilla.org/integration/autoland/rev/01714a3a8206
Add a longString exception in filter tests; r=Honza.
https://hg.mozilla.org/integration/autoland/rev/e95567b7138d
Fix isTextInMessageText for longStrings; r=Honza.
https://hg.mozilla.org/mozilla-central/rev/1574b9c9989f
https://hg.mozilla.org/mozilla-central/rev/01714a3a8206
https://hg.mozilla.org/mozilla-central/rev/e95567b7138d
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
You need to log in before you can comment on or make changes to this bug.