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

Webworker in iframe #819

Merged
merged 9 commits into from Jun 7, 2019

Conversation

Projects
None yet
3 participants
@AquiGorka
Copy link
Member

commented May 31, 2019

Adds extra sandboxing to webworkers by executing them in iframe.

@AquiGorka AquiGorka requested review from bpierre, sohkai and 2color May 31, 2019

@luisivan luisivan referenced this pull request Jun 3, 2019

Closed

Iframe security fixes #125

@bpierre

This comment has been minimized.

Copy link
Member

commented Jun 4, 2019

Looking good! We should also provide a way to clean the things created by this class (event listener and injected element). Did you notice any change in terms of performances?

@AquiGorka AquiGorka force-pushed the feature/webworker-in-iframe branch from 0ae8b16 to 8644019 Jun 5, 2019

@AquiGorka

This comment has been minimized.

Copy link
Member Author

commented Jun 5, 2019

We should also provide a way to clean the things created by this class (event listener and injected element).

Done. 😄

Did you notice any change in terms of performances?

Did not do any benchmark nor profiling, locally feels the same, did load anv and it worked fast. We should ask @sohkai to perform the tests he was doing in the experiments here to see if this affects performance.

Show resolved Hide resolved src/iframe-worker.js Outdated
@2color

2color approved these changes Jun 7, 2019

Copy link
Contributor

left a comment

LGTM. I tested and there were no noticeable performance regressions.

@2color

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2019

@AquiGorka One last question, who calls terminate?

@AquiGorka

This comment has been minimized.

Copy link
Member Author

commented Jun 7, 2019

@2color :

Update, this is the correct one:

worker.terminate()

@bpierre

This comment has been minimized.

Copy link
Member

commented Jun 7, 2019

@AquiGorka One last question, who calls terminate?

We should call it from here: https://github.com/aragon/aragon/blob/feature/webworker-in-iframe/src/aragonjs-wrapper.js#L405

So that it gets cleaned when needed: https://github.com/aragon/aragon/blob/feature/webworker-in-iframe/src/App.js#L199

Loading another DAO probably doesn’t work in the current state?

Edit: oh right, I missed that @AquiGorka

@bpierre

bpierre approved these changes Jun 7, 2019

Copy link
Member

left a comment

💯

@AquiGorka AquiGorka merged commit e9a6b24 into master Jun 7, 2019

5 of 8 checks passed

lint lint
Details
build build
Details
License Compliance FOSSA is analyzing this commit
Details
WIP Ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
install install
Details
license/cla Contributor License Agreement is signed.
Details

@delete-merged-branch delete-merged-branch bot deleted the feature/webworker-in-iframe branch Jun 7, 2019

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.