Closed Bug 1497448 Opened 6 years ago Closed 6 years ago

[remote-dbg-next] Show proper content after disabling "Remote debugging via USB" on Firefox in Android

Categories

(DevTools :: about:debugging, enhancement, P1)

enhancement

Tracking

(firefox65 fixed)

RESOLVED FIXED
Firefox 65
Tracking Status
firefox65 --- fixed

People

(Reporter: daisuke, Assigned: daisuke)

References

Details

Attachments

(6 files, 1 obsolete file)

STRs: 1. Connect and select a USB device in sidebar 2. Disable "Remote debugging via USB" switch on Firefox in Android 3. Add a tab on Firefox in Android ER: When disable the remote debugging, should show another content in main page, and hide the device item from sidebar. AR: We could see the added tab in the runtime page.
Assignee: nobody → dakatsuka
Status: NEW → ASSIGNED
Priority: P2 → P1
If "devtools.remote.usb.enabled" will be disabled on Android, denies from new connection, but retains connections that were already connected. So, when browsing runtime page of USB, even if disables the preference, the changing of that tabs added/removed reflects to the page. To avoid this, closes connections that were connected to USB when the preference will be disabled.
Yet another approach. In the previous D9889 approach, both DebuggerSerever and SocketServerListener retain the connections duplicately, it will be possible to be difficult for the management. In this approach, only DebuggerSerever retains the connections, then when ServerSocketListener was removed, removes the connections as well that were linked the ServerSocketListener.
At first, I wanted it is better to call DebuggerServer.destroy() when `devtools.debugger.remote-enabled` will set to false. Likewise, call DebuggerServer.init() in case of true. But, because DebuggerServer.init() is called by various context such as RemoteDebugger, restoring is difficult after destroying. In this patch, simply, we make avoiding to call DebuggerServer.closeAllListener() from inside of ServerSocketConnection. Depends on D10864
Attachment #9020265 - Attachment is obsolete: true
Attachment #9022513 - Attachment description: Bug 1497448: Move place where calls closeAllListeners() to SocketListener from ServerSocketConnection. r=ochameau!,jdescottes! → Bug 1497448: Use try/catch for _handle function in ServerSocketConnection. r=ochameau!,jdescottes!
Keywords: leave-open
Attachment #9022516 - Attachment description: Bug 1497448: Remove '_' from exposed functions of DebuggerServer. r=ochameau! → Bug 1497448: Rename _addListener/_removeListener of DebuggerServer to addSocketListener/removeSocketListener. r=ochameau!,r=jdescottes!
Pushed by dakatsuka@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/908dc14f2736 Close connections that were accepted in ServerSocketListener. r=ochameau,jdescottes https://hg.mozilla.org/integration/autoland/rev/2f968d0631f5 Use try/catch for _handle function in ServerSocketConnection. r=ochameau,jdescottes
Pushed by dakatsuka@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2e8ae528176e Use SocketListener directly. r=ochameau,jdescottes https://hg.mozilla.org/integration/autoland/rev/f1277f997312 Rename _addListener/_removeListener of DebuggerServer to addSocketListener/removeSocketListener. r=ochameau,jdescottes https://hg.mozilla.org/integration/autoland/rev/f81b0f27c995 Rename closeAllListener to closeAllSocketListeners. r=ochameau,jdescottes
Blocks: 1505997
Blocks: 1506000
Keywords: leave-open
Pushed by dakatsuka@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/63eb34f9b171 Update usb devices when the debugger client of usb was closed. r=jdescottes
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: