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

Make worker more resilient to DOM API usage attempts #7425

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

fregante
Copy link
Contributor

What does this PR do?

  • Prevents some DOM access from breaking the MV3 extension altogether
  • Lets us more easily debug such issues

The MV3 extension is failing to load due to an unchecked DOM access by the bricks. The dev tools make it difficult to find the source of this error.

Checklist

  • Add tests
  • New files added to src/tsconfig.strictNullChecks.json (if possible)
  • Designate a primary reviewer: @grahamlangford

Related

Copy link

codecov bot commented Jan 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (808cbc8) 72.60% compared to head (25dd3d0) 72.61%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7425   +/-   ##
=======================================
  Coverage   72.60%   72.61%           
=======================================
  Files        1212     1212           
  Lines       37846    37846           
  Branches     7099     7099           
=======================================
+ Hits        27479    27481    +2     
+ Misses      10367    10365    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

// The picker uses `bootstrap-switch-button`, which does a `window` check on load and breaks
// the MV3 background worker. Lazy-loading it keeps the background worker from breaking.
const { userSelectElement } = await import(
/* webpackChunkName: "editorContentScript" */ "@/contentScript/pageEditor/elementPicker"
Copy link
Contributor Author

@fregante fregante Jan 25, 2024

Choose a reason for hiding this comment

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

Reverting the change in #7381 and adding a more appropriate comment.

Copy link

No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack.

Do not edit this comment manually.

@fregante fregante merged commit a070440 into main Jan 25, 2024
19 checks passed
@fregante fregante deleted the F/mv3/reliably-worker branch January 25, 2024 15:31
@grahamlangford grahamlangford added this to the 1.8.8 milestone Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants