Close console after completion causes error "inputValue is undefined"

RESOLVED FIXED

Status

()

Firefox
Developer Tools
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: Julian Viereck, Assigned: Julian Viereck)

Tracking

Trunk
x86
All
Points:
---

Firefox Tracking Flags

(blocking2.0 final+)

Details

(Whiteboard: [kd4b4])

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

8 years ago
This is a follow up bug of bug 568649.

Taken from bug 568649:

> I'm getting some errors after executing some text (with tab-completion) on 
the console.
>
> 10:06 < robcee> Error: inputValue is undefined
> 10:06 < robcee> Source File: resource://gre/modules/HUDService.jsm
> 10:06 < robcee> Line: 2683

Addition: This error only happens when you did some completion and then close 
the console again.
(Assignee)

Comment 1

8 years ago
Created attachment 458411 [details] [diff] [review]
Patch
Assignee: nobody → jviereck
Status: NEW → ASSIGNED

Updated

8 years ago
OS: Other → All
Hardware: Other → x86
Version: unspecified → Trunk
(Assignee)

Updated

8 years ago
Attachment #458411 - Flags: feedback?(ddahl)

Updated

8 years ago
Attachment #458411 - Flags: feedback?(ddahl) → feedback+
(Assignee)

Updated

8 years ago
Attachment #458411 - Flags: review?(dtownsend)
blocking2.0: --- → ?
Comment on attachment 458411 [details] [diff] [review]
Patch

Needs a test
Attachment #458411 - Flags: review?(dtownsend) → review-
We shouldn't spew errors. blocking final. Let's get the test and get this landed.
blocking2.0: ? → final+

Updated

8 years ago
Whiteboard: [kd4b4]
(Assignee)

Comment 4

8 years ago
Created attachment 462338 [details] [diff] [review]
Patch with tests
Attachment #458411 - Attachment is obsolete: true
Attachment #462338 - Flags: feedback?(ddahl)

Comment 5

8 years ago
Comment on attachment 462338 [details] [diff] [review]
Patch with tests

I think this is ok, but you may want to combine this patch with however we fix the "tab" with no input bug 583816
Attachment #462338 - Flags: feedback?(ddahl) → feedback+
(Assignee)

Comment 6

8 years ago
(In reply to comment #5)
> Comment on attachment 462338 [details] [diff] [review]
> Patch with tests
> 
> I think this is ok, but you may want to combine this patch with however we fix
> the "tab" with no input bug 583816

This bug is not related to 583816. The error described here takes place when you close the WebConsole using the key combo CMD_SHIFT_K. Whatway we fix the "tab" focus issue, the issue with closing the WebConsole still exists, I think.

Comment 7

8 years ago
(In reply to comment #6)
> This bug is not related to 583816. The error described here takes place when
> you close the WebConsole using the key combo CMD_SHIFT_K. Whatway we fix the
> "tab" focus issue, the issue with closing the WebConsole still exists, I think.

Ah, ok! it is getting hard to keep track of some of these things now:)
(Assignee)

Updated

8 years ago
Attachment #462338 - Flags: review?(dtownsend)
Comment on attachment 462338 [details] [diff] [review]
Patch with tests

>diff --git a/toolkit/components/console/hudservice/HUDService.jsm b/toolkit/components/console/hudservice/HUDService.jsm

>   complete: function JSTF_complete(type)

>     let inputValue = inputNode.value;
>+    // If the inputNode has no value, then don't try to complete on it.
>+    if (!inputNode.value) {

Check inputValue instead? The test is kind of cheesy (we should really be looking to never throw at all, not just in that specific case!), but I suppose it doesn't hurt.
Attachment #462338 - Flags: review?(dtownsend) → review+
(Assignee)

Comment 9

8 years ago
Created attachment 463180 [details] [diff] [review]
[checked-in] Improved patch

This patch is improved based on Gavin's feedback. I've also added my name + email to the license body.
Attachment #462338 - Attachment is obsolete: true
(Assignee)

Updated

8 years ago
Whiteboard: [kd4b4] → [kd4b4][checkin-needed]
(Assignee)

Updated

8 years ago
Keywords: checkin-needed
Whiteboard: [kd4b4][checkin-needed] → [kd4b4]
Comment on attachment 463180 [details] [diff] [review]
[checked-in] Improved patch

http://hg.mozilla.org/mozilla-central/rev/aff7615b9d2c
Attachment #463180 - Attachment description: Improved patch → [checked-in] Improved patch
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.