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

Fixed crash when user tries to install ipfs extension from setting #5205

Merged
merged 1 commit into from
Apr 10, 2020

Conversation

simonhong
Copy link
Member

@simonhong simonhong commented Apr 9, 2020

When extension install is requested, install dialog is launched.
So far, we requested un-parented install dialog.
On linux, custom frame is not allowed for un-parented dialog.
Only platform-native frame is used for it. The problem was
install dialog tries to set title to custom frame. So, seg fault
happened only on linux. And Windows with classic theme will have
same issue. On macOS and Windows with aero, crash doesn't happen.
But, un-parented dialog on macOS has title area that looks ugly.

Resolves brave/brave-browser#9092
Resolves brave/brave-browser#7325

Linux:
Screenshot from 2020-04-09 17-36-33

MacOS (parented dialog)
Screen Shot 2020-04-09 at 5 40 33 PM

MacOS (previously used one - un parented dialog)
Screen Shot 2020-04-09 at 5 35 03 PM

Submitter Checklist:

Test Plan:

  1. Launch browser and open settings
  2. Toggle ipfs extensions on

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@simonhong simonhong added this to the 1.9.x - Nightly milestone Apr 9, 2020
@simonhong simonhong self-assigned this Apr 9, 2020
When extension install is requested, install dialog is launched.
So far, we requsted un-parented install dialog.
On linux, custom frame is not allowed for un-parented dialog.
Only platform-native frame is used for it. The problem was
install dialog tries to set title to custom frame. So, seg fault
happened only on linux. And Windows with classic theme will have
same issue. On macOS and Windows with aero, crash doesn't happen.
But, un-parented dialog has title area that looks ugly.
Copy link
Member

@yrliou yrliou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@simonhong simonhong merged commit 4ec1c13 into master Apr 10, 2020
@simonhong simonhong deleted the fix_ipfs_extension_crash branch April 10, 2020 00:42
brave-builds pushed a commit that referenced this pull request Apr 10, 2020
@kjozwiak
Copy link
Member

Verification PASSED on both macOS 10.15.3 x64 & Ubuntu 19.10 x64 using the following builds:

Brave | 1.9.21 Chromium: 81.0.4044.92 (Official Build) nightly (64-bit)
--- | ---
Revision | 32921c79b6f01a0fb2deef0e1d45b42f96581051-refs/branch-heads/4044@{#883}
OS | macOS Version 10.15.3 (Build 19D76)
Brave | 1.9.21 Chromium: 81.0.4044.92 (Official Build) nightly (64-bit)
--- | ---
Revision | 32921c79b6f01a0fb2deef0e1d45b42f96581051-refs/branch-heads/4044@{#883}
OS | Linux
  • ensured that enabling IPFS Companion via brave://settings/extensions doesn't crash Brave
  • ensured that the IPFS Companion modals match the examples under Fixed crash when user tries to install ipfs extension from setting #5205 (comment) when enabling IPFS Companion
  • ensured that enabling IPFS Companion opens chrome-extension://nibjojkomfdiaoajekhjakgkdhaomnch/dist/landing-pages/welcome/index.html`
  • ensured that you can disable/enable IPFS Companion via brave://settings/extensions without any issues
  • ensured that the Extension: IPFS Companion process starts under Task Manager when enabling IPFS Companion
  • ensured that the Extension: IPFS Companion process closes under Task Manager when disabling IPFS Companion
  • ensured that clicking on the IPFS Companion extension icon worked without any issues

Examples:

Screen Shot 2020-04-14 at 2 49 59 PM

Screen Shot 2020-04-14 at 3 05 41 PM

Screen Shot 2020-04-14 at 2 50 24 PM

Screen Shot 2020-04-14 at 2 51 58 PM

Screen Shot 2020-04-14 at 2 52 19 PM

Screen Shot 2020-04-14 at 3 10 27 PM

@bbondy
Copy link
Member

bbondy commented Apr 15, 2020

Thanks @simonhong 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants