Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make StreamSubscriber ref counted (backport: 5-0-x) #17264

Conversation

Projects
None yet
3 participants
@trop
Copy link
Contributor

commented Mar 7, 2019

Backport of #17221

See that PR for details.

Notes: Fix app freeze when using custom stream protocol

fix: make StreamSubscriber ref counted
It is owned by URLRequestStreamJob on the IO thread once request starts,
but if the ownership was abondoned while transfering it to IO thread
which is possible when a request is aborted, then we need to make sure
its destroyed on the right thread to avoid lock in v8.

@trop trop bot referenced this pull request Mar 7, 2019

Merged

fix: make StreamSubscriber ref counted #17221

4 of 6 tasks complete

@trop trop bot added 5-0-x backport labels Mar 7, 2019

@electron-cation electron-cation bot removed the new-pr 🌱 label Mar 7, 2019

@deepak1556
Copy link
Member

left a comment

Lets wait for appveyor before merging.

@deepak1556 deepak1556 merged commit 104ec2b into electron:5-0-x Mar 7, 2019

8 checks passed

Artifact Comparison No Changes
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
build-linux Workflow: build-linux
Details
build-mac Workflow: build-mac
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

commented Mar 7, 2019

Release Notes Persisted

Fix app freeze when using custom stream protocol

@pwnsdx

This comment has been minimized.

Copy link

commented Mar 27, 2019

Spent hours trying to figure out why it was happening, thanks for the fix!

pwnsdx added a commit to wireapp/wire-desktop-packages that referenced this pull request Mar 27, 2019

Improved certificate pinning, local server connections, timeout and c…
…ookies management

Note: UI freeze issue should be fixed in Electron 5.0.0-beta.6 and later (electron/electron#17264)

pwnsdx added a commit to wireapp/wire-desktop-packages that referenced this pull request Apr 3, 2019

feat(desktop-updater): Updater
commit 3fc4acb
Author: Florian Keller <florian.keller@wire.com>
Date:   Wed Apr 3 15:48:55 2019 +0200

    update yarn.lock

commit 1a525f7
Author: Florian Keller <florian.keller@wire.com>
Date:   Wed Apr 3 15:41:54 2019 +0200

    update desktop-updater deps

commit b403c19
Author: Florian Keller <florian.keller@wire.com>
Date:   Wed Apr 3 15:39:26 2019 +0200

    update desktop-updater-core deps

commit f809285
Author: Florian Keller <florian.keller@wire.com>
Date:   Wed Apr 3 15:35:57 2019 +0200

    update desktop-updater-ui deps

commit a877786
Author: Florian Keller <florian.keller@wire.com>
Date:   Wed Apr 3 15:27:38 2019 +0200

    update yarn.lock

commit 2a0fe1f
Author: Florian Keller <florian.keller@wire.com>
Date:   Wed Apr 3 15:23:24 2019 +0200

    sort package.json

commit fa87ba3
Merge: 5c1e573 ea73598
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Apr 3 15:14:05 2019 +0200

    Merge branch 'master' into pwnsdx/desktop-updater

commit 5c1e573
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Apr 3 15:10:06 2019 +0200

    async for

commit bc370bc
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sun Mar 31 23:28:32 2019 +0200

    Various improvements

commit a835e31
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 27 19:03:36 2019 +0100

    Reduced transition delay

commit 4a89ac7
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 27 18:57:14 2019 +0100

    Missing French translation

commit 950b7c3
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 27 18:54:06 2019 +0100

    Better state management for the transition delay

commit ac17bed
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 27 18:10:17 2019 +0100

    Restored window vibrancy on macOS and transition delay

commit 32b31d8
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 27 16:27:37 2019 +0100

    Typo

commit 40a8b31
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 27 16:02:54 2019 +0100

    Further Electron 5 compatibility fixes

    - Enabled and fixed fileURLToPath
    - Fixed issue related to displaying the popup in attached mode
    - Fixed installer window not working
    - Using webContents.capturePage as Promise
    - Minor improvements

commit 00c00bd
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 27 14:29:06 2019 +0100

    Electron 5 compatibility fixes

commit cc2f877
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 27 13:15:50 2019 +0100

    Update yarn.lock

commit b81d30d
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 27 12:49:06 2019 +0100

    Update Electron to 5.0.0-beta.6

commit 19e9663
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 27 03:25:13 2019 +0100

    Typo

commit b368434
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 27 03:22:15 2019 +0100

    Improved certificate pinning, local server connections, timeout and cookies management

    Note: UI freeze issue should be fixed in Electron 5.0.0-beta.6 and later (electron/electron#17264)

commit 8ea734f
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 26 15:01:35 2019 +0100

    Set backgroundThrottling to false, add more defaults to WindowManager BrowserWindow

commit 94b09c7
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 26 03:08:58 2019 +0100

    Fixed an issue where updates would start being installed automatically in the future if environment was changed

commit 7aaec9b
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 26 02:07:40 2019 +0100

    Refactor file copying logic

commit 25abf4a
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Mon Mar 25 16:45:54 2019 +0100

    Hardcode crypto_generichash_BYTES_MAX

commit 8649fa9
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Mon Mar 25 16:45:34 2019 +0100

    Install the LCB only if the manifest is missing otherwise show a popup

commit 3d372c8
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sun Mar 24 17:17:41 2019 +0100

    LCB fixes

commit de1f917
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sun Mar 24 16:15:15 2019 +0100

    Use extraResources instead

commit de3b532
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sun Mar 24 08:07:00 2019 +0100

    Locally Cached Bundle fixes

commit 00375ed
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sun Mar 24 07:17:55 2019 +0100

    Comments

commit 7441e16
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sun Mar 24 07:12:55 2019 +0100

    Set marginTop of the changelog title to 0

commit a59e085
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sun Mar 24 07:12:34 2019 +0100

    Update yarn.lock

commit 3a92e97
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sun Mar 24 07:12:24 2019 +0100

    Added Locally Cached Bundle

commit 27d48bd
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sun Mar 24 06:46:08 2019 +0100

    settings.dat -> settings.json

commit b832a3f
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sun Mar 24 06:44:39 2019 +0100

    Typo

commit 36d06b2
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sun Mar 24 04:36:12 2019 +0100

    Improved details display of the update

commit da43e66
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sun Mar 24 02:50:38 2019 +0100

    Additional check to ensure we can convert checksums to hex

commit 831e83b
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sun Mar 24 02:50:04 2019 +0100

    Verify that document root exist before returning it

commit d4426d9
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sun Mar 24 02:40:51 2019 +0100

    Localization fixes

commit 4672135
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 21 00:54:14 2019 +0100

    Minor improvements

commit 7313afb
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 20 22:36:35 2019 +0100

    Buffer is an instance of Uint8Array

commit 26ea47e
Author: Florian Keller <florian.keller@wire.com>
Date:   Wed Mar 20 14:15:38 2019 +0100

    chore(desktop-updater): use libsodium-wrappers

commit 1b101fb
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 20 12:33:46 2019 +0100

    Update UpdateBar.tsx

commit 556c3b6
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 20 01:19:18 2019 +0100

    Restrict maximum sockets to 6 (from Chromium) to avoid being rate-limited

commit 5efef06
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 20 00:25:28 2019 +0100

    Better error handling

commit 4ff0eb4
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 19 23:44:07 2019 +0100

    We only care if we successfully intercept the protocol, not unintercept

commit fcd891c
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 19 23:21:55 2019 +0100

    Until folder where the node_modules is known, disable root folder restrictions

commit 4321d1d
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 19 23:20:26 2019 +0100

    Typo

commit 6f8e4a6
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 19 19:16:34 2019 +0100

    Make protocol interception registration safer

commit 60613c0
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 19 18:54:17 2019 +0100

    Use async / await getter

commit 1cca3df
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 19 18:45:19 2019 +0100

    Requested changes

commit 00c891e
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 19 18:35:56 2019 +0100

    Requested changes

commit 3743134
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 19 18:02:07 2019 +0100

    Requested changes

commit 1c1dedd
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 19 14:29:29 2019 +0100

    Fixed a logic issue with file writing / reading

commit 04708a8
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 19 13:31:54 2019 +0100

    Update yarn.lock

commit 93ed6a9
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 19 13:31:49 2019 +0100

    Update package.json

commit 1d66048
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 19 00:53:48 2019 +0100

    Refactor window size mechanism

commit 4e0b52d
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 19 00:52:45 2019 +0100

    Send checksum to UI as hex directly

commit aee8e32
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 19 00:49:29 2019 +0100

    Renabled contextIsolation in WindowManager

commit 198e515
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Mon Mar 18 16:12:50 2019 +0100

    Ensure that the update we're automatically reinstalling match our new environment

commit 1744ef7
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Mon Mar 18 05:09:25 2019 +0100

    Better IPC

commit 1ae35f8
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Mon Mar 18 04:26:11 2019 +0100

    Moved CSS to styled-components

commit 025c6d5
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Mon Mar 18 03:45:53 2019 +0100

    Added UpdateBar, bugfixes & typos

commit a3f42bc
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Mon Mar 18 02:01:37 2019 +0100

    Accept Uint8Array in writeFileAsBuffer function

commit d6df7b8
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Mon Mar 18 02:01:12 2019 +0100

    Unregister protocol interception before attempting to register a new one

commit e215d03
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Fri Mar 15 17:18:01 2019 +0100

    Core/UI: i18n fixes, translate notifications

commit b8b5b94
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Fri Mar 15 17:05:03 2019 +0100

    Fix build

commit 66343f2
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Fri Mar 15 14:28:43 2019 +0100

    Core/UI: i18n fixes

commit 9897d02
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Fri Mar 15 03:24:44 2019 +0100

    Update dependencies

commit 2394e84
Merge: d77cc81 38b430d
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Fri Mar 15 03:21:21 2019 +0100

    Merge branch 'master' into pwnsdx/desktop-updater

commit d77cc81
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Fri Mar 15 03:15:08 2019 +0100

    Core/UI: i18n

    Core and UI now has i18n and French has been added

commit 27a6869
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 13 00:15:15 2019 +0100

    Minor tweaks

commit da2ff3a
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 12 23:09:10 2019 +0100

    Typos

commit a233436
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 12 23:00:23 2019 +0100

    Moved update.proto from desktop-updater-core to desktop-updater-spec

commit c7ef173
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 12 22:29:03 2019 +0100

    Improved typings for Protobuf

commit 688694a
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 12 22:04:53 2019 +0100

    Requested changes

commit d4aa05d
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 12 15:40:32 2019 +0100

    Remove minimist

commit 981551f
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 12 15:39:29 2019 +0100

    enableSecureUpdater is now passed by the wrapper

commit 6829013
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 12 15:18:13 2019 +0100

    Internet connectivity check is declared too long after

commit 8222184
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 12 13:49:01 2019 +0100

    Requested changes

commit 28d4813
Merge: 7285dbb 3b63d7e
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 12 12:50:48 2019 +0100

    Merge branch 'master' into pwnsdx/desktop-updater

commit 7285dbb
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 12 12:48:42 2019 +0100

    Update dependencies

commit 5328de7
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sat Mar 9 03:01:11 2019 +0100

    Typos

commit c811808
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Sat Mar 9 02:18:02 2019 +0100

    Internet connectivity checker

    The updater will check if specified endpoints (backend) are reachable:

    - If yes, the updater will continue normally. If he is unable to reach the updates server it will throw a visible error to the user
    - If no, it will try every 2 seconds to reach the backend using the same way browser send requests (via Networking) with a timeout of 30 seconds. The check is never skipped but only delayed until an internet connection is available.

commit 7af2b59
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 21:04:43 2019 +0100

    Better internet connectivity checks

commit 1bf4bee
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 20:50:27 2019 +0100

    Fixed typings error

commit f25b569
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 20:35:54 2019 +0100

    Check connectivity by randomly picking (to supply) and pinging backend URLs while checking

commit 49f5cd2
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 20:33:07 2019 +0100

    Use true random numbers for the port selection

commit 44c8689
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 18:56:24 2019 +0100

    Fixed Windows-related issues

    - Declare the browser window right before showing it
    - Ajust status bar height only on macOS
    - Properly resize the window on Windows (seems like setSize is broken when scaling down, using setBounds instead)

commit 5dc57f8
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 17:48:56 2019 +0100

    Remove generated bundle from the UI

commit 588c32f
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 17:46:53 2019 +0100

    Don't wait to check for an update to launch the app if there is already a bundle installed

commit a2667ac
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 17:14:05 2019 +0100

    Update yarn.lock

commit c90d343
Merge: 958ce97 0a72c26
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 17:12:46 2019 +0100

    Merge branch 'master' into pwnsdx/desktop-updater

commit 958ce97
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 17:09:32 2019 +0100

    Requested changes

commit 0723b90
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 16:58:51 2019 +0100

    Fix Windows build

commit 4c9ecf1
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 01:07:13 2019 +0100

    Revert "Wait upto 30 minutes to finish tests"

    This reverts commit c191f21.

commit 44f1ad4
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 00:58:41 2019 +0100

    Fixed build

commit a3db5e0
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 00:40:14 2019 +0100

    Updated package.json

commit c191f21
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 00:32:30 2019 +0100

    Wait upto 30 minutes to finish tests

commit 05e62db
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Thu Mar 7 00:06:32 2019 +0100

    Added more classes to export

commit eb248f0
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 6 23:54:40 2019 +0100

    Unified @wireapp/desktop-updater-core includes in @wireapp/desktop-updater

commit 1fdab21
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 6 23:31:57 2019 +0100

    0.0.1

commit 86e8e49
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 6 23:24:43 2019 +0100

    @wireapp/desktop-updater-server -> @wireapp/desktop-updater

commit b0ddd90
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 6 23:23:13 2019 +0100

    @wireapp/desktop-updater-> @wireapp/desktop-updater-core

commit 4a62253
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 6 23:19:54 2019 +0100

    Updated specs from updater to points to @wireapp/desktop-updater-spec

    - Removed the ability to skip the update (for now)

commit 41be197
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 6 22:28:40 2019 +0100

    Fixed some tests, unified package.json to match desktop-packages repo

commit a1b83ba
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 6 22:05:25 2019 +0100

    Update package.json and yarn.lock

commit 58ce705
Merge: 241436c c481ffe
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 6 20:50:01 2019 +0100

    Merge branch 'master' into pwnsdx/desktop-updater

commit 241436c
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 6 20:43:46 2019 +0100

    Server

commit bbb033b
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Wed Mar 6 20:43:34 2019 +0100

    Core

commit 5ddcf33
Merge: 2f5c5c3 1ef557a
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 5 12:09:06 2019 +0100

    Merge branch 'master' into pwnsdx/desktop-updater

commit 2f5c5c3
Author: pwnsdx <sabri.haddouche@wire.com>
Date:   Tue Mar 5 12:04:43 2019 +0100

    Typos

commit 3fad778
Merge: ebef4c2 d53edab
Author: Sabri <pwnsdx@users.noreply.github.com>
Date:   Wed Feb 27 18:34:31 2019 +0100

    Merge branch 'master' into pwnsdx/desktop-updater

commit ebef4c2
Author: pwnsdx <pwnsdx@users.noreply.github.com>
Date:   Wed Feb 27 18:15:09 2019 +0100

    Copyright

commit a2b5002
Author: pwnsdx <pwnsdx@users.noreply.github.com>
Date:   Wed Feb 27 17:44:24 2019 +0100

    Added renderer here

commit 50adfa3
Merge: d297a3f 74a9153
Author: pwnsdx <pwnsdx@users.noreply.github.com>
Date:   Wed Feb 20 09:24:41 2019 +0100

    Merge branch 'master' into pwnsdx/desktop-updater

commit d297a3f
Author: pwnsdx <pwnsdx@users.noreply.github.com>
Date:   Wed Feb 20 09:23:51 2019 +0100

    Various bug fixes & improvements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.