Closed Bug 580001 Opened 14 years ago Closed 14 years ago

Close console after completion causes error "inputValue is undefined"

Categories

(DevTools :: General, defect)

x86
All
defect
Not set
normal

Tracking

(blocking2.0 final+)

RESOLVED FIXED
Tracking Status
blocking2.0 --- final+

People

(Reporter: julian.viereck, Assigned: julian.viereck)

Details

(Whiteboard: [kd4b4])

Attachments

(1 file, 2 obsolete files)

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.
Attached patch Patch (obsolete) — Splinter Review
Assignee: nobody → jviereck
Status: NEW → ASSIGNED
OS: Other → All
Hardware: Other → x86
Version: unspecified → Trunk
Attachment #458411 - Flags: feedback?(ddahl)
Attachment #458411 - Flags: feedback?(ddahl) → feedback+
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+
Whiteboard: [kd4b4]
Attached patch Patch with tests (obsolete) — Splinter Review
Attachment #458411 - Attachment is obsolete: true
Attachment #462338 - Flags: feedback?(ddahl)
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+
(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.
(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:)
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+
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
Whiteboard: [kd4b4] → [kd4b4][checkin-needed]
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
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: