Skip to content
Snippets Groups Projects

Bug 41711: Wait for the new window when doing new identity

Merge Info

Related Issues

Backport Timeline

  • Immediate - patchsets for critical bug fixes or other major blocker (e.g. fixes for a 0-day exploit) OR patchsets with trivial changes which do not need testing (e.g. fixes for typos or fixes easily verified in a local developer build)
  • Next Minor Stable Release - patchset that needs to be verified in nightly before backport
  • Eventually - patchset that needs to be verified in alpha before backport
  • No Backport - patchset for the next major stable

Upstream Merging

  • Merge to base-browser - typically for !fixups to patches in the base-browser branch, though sometimes new patches as well
    • NOTE: if your changeset includes patches to both base-browser and tor-browser please please make separate merge requests for each part

Issue Tracking

Change Description

This issue is quite interesting: some things seem to be broken when doing the new identity, but not in some user-visible way, mostly in the JS console.

I think the culprit is a race condition we have between opening the new window and closing the final old window. So, it isn't very easy to reproduce, either.

I've moved the broadcast, too, because it's intended to cleanup the things on the Tor side (the proxy nonces for domain isolation and sending the SIGNAL NEWNYM command), so nothing that actually needs to be in the middle of the Firefox cleaning.

As a side-effect, for a brief time the new window and the old window can both be seen. I hope it isn't too annoying, but I'm not sure of a way to prevent this (the paint event is what I rely on to know that the new window is ready, but the load event seemed to take longer to be dispatched).

Edited by Pier Angelo Vendrame

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Pier Angelo Vendrame changed the description

    changed the description

  • So, just to make it clear on how I got to this in the first place: I moved the newnym signal to TorProtocolService, and then I tried to see how it behaved when you killed tor and did new identity.

    But while doing so I found a few different bugs, and arriving to my same initial situation isn't very easy.

    But, as written in the issue, since it seems to be a race condition, I managed to get other similar errors, with different stack traces (usually, a console.* is involved), but it might also vary on machine by machine.

  • requested review from @richard

  • I had it also with this fix :angry:

    [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDocShell.domWindow]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: resource://devtools/server/actors/targets/window-global.js :: get window :: line 422"  data: no] 2 window-global.js:422:5
        get window resource://devtools/server/actors/targets/window-global.js:422
        _getWindowForBrowserConsole resource://devtools/server/actors/webconsole.js:269
        get global resource://devtools/server/actors/webconsole.js:247
        makeDebuggeeValue resource://devtools/server/actors/webconsole.js:470
        arguments resource://devtools/server/actors/webconsole.js:2058
        map self-hosted:180
        prepareConsoleMessageForRemote resource://devtools/server/actors/webconsole.js:2057
        onConsoleAPICall resource://devtools/server/actors/webconsole.js:1793
        onConsoleAPICall self-hosted:1115
        onConsoleAPILogEvent resource://devtools/server/actors/webconsole/listeners/console-api.js:115
        onConsoleAPILogEvent self-hosted:1115
        CS_recordEvent resource://gre/modules/ConsoleAPIStorage.jsm:174
        sendConsoleAPIMessage resource://gre/modules/Console.jsm:587
        createMultiLineDumper resource://gre/modules/Console.jsm:517
        <anonymous> self-hosted:1115
        _trySend resource://gre/modules/TorProtocolService.jsm:586
        InterpretGeneratorResume self-hosted:1422
        AsyncFunctionThrow self-hosted:636

    I think it's doing something to alleviate it, but maybe sometimes we will have just to re-initialize the logger?

  • added 3 commits

    • 6c4680ac...31088582 - 2 commits from branch tpo/applications:tor-browser-102.9.0esr-12.5-1
    • d23d3f2c - fixup! Bug 40926: Implemented the New Identity feature

    Compare with previous version

  • Pier Angelo Vendrame marked this merge request as draft from pierov/tor-browser@d23d3f2c

    marked this merge request as draft from pierov/tor-browser@d23d3f2c

  • morgan approved this merge request

    approved this merge request

  • Pier Angelo Vendrame marked this merge request as ready

    marked this merge request as ready

  • Pier Angelo Vendrame marked the checklist item Link resolved issues with appropriate Release Prep issue for changelog generation as completed

    marked the checklist item Link resolved issues with appropriate Release Prep issue for changelog generation as completed

Please register or sign in to reply
Loading