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 the IndexedDB worker #7920

Merged
merged 1 commit into from Dec 20, 2018

Conversation

@dbkr
Copy link
Member

dbkr commented Dec 19, 2018

Looks like this was broken in the webpack 4 upgrade due to the
worker script setter and the bundle being re-ordered in index.html.

  • Remove the loop: we only use two scripts now, so import them
    explicitly
  • Remove outdated olm import code.
  • Stop generating a script import for each theme: we were pulling
    in 3 js files that did absolutely nothing.
  • Fix worker 'onmessage' scope (set it as a global rather than
    trying to make it an ES6 module which it isn't).
  • Fail hard if the indexeddb worker script isn't set to avoid
    this happening again.
Looks like this was broken in the webpack 4 upgrade due to the
worker script setter and the bundle being re-ordered in index.html.

 * Remove the loop: we only use two scripts now, so import them
   explicitly
 * Remove outdated olm import code.
 * Stop generating a script import for each theme: we were pulling
   in 3 js files that did absolutely nothing.
 * Fix worker 'onmessage' scope (set it as a global rather than
   trying to make it an ES6 module which it isn't).
 * Fail hard if the indexeddb worker script isn't set to avoid
   this happening again.
@dbkr dbkr requested a review from vector-im/riot-web Dec 19, 2018
Copy link
Collaborator

t3chguy left a comment

Looks cleaner and very plausible

@dbkr dbkr merged commit baf3df5 into develop Dec 20, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.