Closed
Bug 811282
Opened 13 years ago
Closed 13 years ago
Remote Console fails to close completely in the event of a connection error
Categories
(DevTools :: Console, defect)
DevTools
Console
Tracking
(firefox19 fixed, firefox20 fixed)
RESOLVED
FIXED
Firefox 20
People
(Reporter: rcampbell, Assigned: msucan)
Details
Attachments
(2 files)
8.64 KB,
patch
|
rcampbell
:
review+
|
Details | Diff | Splinter Review |
7.60 KB,
patch
|
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
STR:
1. Open a remote web console with no available connection target
2. Close the Web Console.
Expected:
Remote Web Console closes completely.
Actual:
A sliver of toolbar remains in the originating tab, unable to be removed.
Comment 1•13 years ago
|
||
We should probably do what the debugger does in this case, which is to not display the tool UI until the connection is established. Although with the imminent landing of the devtools window work, this may only be necessary for a brief period of time.
Assignee | ||
Updated•13 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
Reporter | ||
Comment 2•13 years ago
|
||
well, the brief period of time is a 6 week window. If that's easy to implement, I'd suggest doing it.
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → mihai.sucan
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•13 years ago
|
||
This makes the Web Console display a "connection timeout" message if nothing happens during the configured timeout delay. I also added code that makes sure the web console closes safely even if the connection is dropped.
I tested with B2G Desktop: things work well - I can drop the connection any time I want, and the web console still closes properly. If you try to use the console input after a timeout you get errors - as expected, anything that tries to use the console client throws.
I expect the devtools-window work will make things better in this regard.
Looking forward to your review. Thanks!
Attachment #682523 -
Flags: review?(rcampbell)
Reporter | ||
Comment 4•13 years ago
|
||
Comment on attachment 682523 [details] [diff] [review]
proposed patch
Review of attachment 682523 [details] [diff] [review]:
-----------------------------------------------------------------
Nice changes. Only real concern is the nullification of that argument.
::: browser/devtools/webconsole/webconsole.js
@@ +417,5 @@
> + _resetConnectionTimeout: function WCF__resetConnectionTimeout()
> + {
> + let timer = this._connectTimer;
> + if (timer) {
> + let timeout = timer.delay;
you'd rather reuse this here than check the pref? I'm ok with that.
@@ +4384,5 @@
> + timer = null;
> + }
> + if (aOnDisconnect) {
> + aOnDisconnect();
> + aOnDisconnect = null;
yuo're nulling out an argument here. I don't think that's necessary (or a thing we want to start).
Attachment #682523 -
Flags: review?(rcampbell) → review+
Assignee | ||
Comment 5•13 years ago
|
||
(In reply to Rob Campbell [:rc] (:robcee) from comment #4)
> Comment on attachment 682523 [details] [diff] [review]
> proposed patch
>
> Review of attachment 682523 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Nice changes. Only real concern is the nullification of that argument.
>
> ::: browser/devtools/webconsole/webconsole.js
> @@ +417,5 @@
> > + _resetConnectionTimeout: function WCF__resetConnectionTimeout()
> > + {
> > + let timer = this._connectTimer;
> > + if (timer) {
> > + let timeout = timer.delay;
>
> you'd rather reuse this here than check the pref? I'm ok with that.
Yep.
> @@ +4384,5 @@
> > + timer = null;
> > + }
> > + if (aOnDisconnect) {
> > + aOnDisconnect();
> > + aOnDisconnect = null;
>
> yuo're nulling out an argument here. I don't think that's necessary (or a
> thing we want to start).
There are 3 ways onDisconnect() can execute. Nulling-out the argument is there to prevent further execution of the callback. Not elegant, indeed. More elegant would be to have a separate function for each case, but then again this is a temporary solution - the proper fix would be for the debugger client to call the onClose callback we provide, even when things fail - it should give the callback an error object of some sorts.
Thank you for the review!
Assignee | ||
Comment 6•13 years ago
|
||
Whiteboard: [fixed-in-fx-team]
Comment 7•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
Assignee | ||
Comment 8•13 years ago
|
||
[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 768096
User impact if declined: poor user experience when the server fails to respond, when a remote connection starts. This bug also fixes the web console closing when the server connection is broken.
Testing completed (on m-c, etc.): landed in m-c for some time already.
Risk to taking this patch (and alternatives if risky): minimal.
String or UUID changes made by this patch: none.
Thank you!
Attachment #687141 -
Flags: approval-mozilla-aurora?
Comment 9•13 years ago
|
||
Comment on attachment 687141 [details] [diff] [review]
patch for aurora
Approving in support of our new remote debugger feature.
Attachment #687141 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 10•13 years ago
|
||
Assignee | ||
Comment 11•13 years ago
|
||
Alex: thank you for approval.
Planned to land this into aurora today. I see Ryan was quicker - thank you!
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•