-
Notifications
You must be signed in to change notification settings - Fork 69
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
Refactor to use a single sandboxed context per visit request. #236
Merged
rwjblue
merged 10 commits into
ember-fastboot:master
from
rwjblue:build-vm-context-per-visit
Oct 30, 2019
Merged
Refactor to use a single sandboxed context per visit request. #236
rwjblue
merged 10 commits into
ember-fastboot:master
from
rwjblue:build-vm-context-per-visit
Oct 30, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kratiahuja
requested changes
Oct 26, 2019
rwjblue
force-pushed
the
build-vm-context-per-visit
branch
2 times, most recently
from
October 30, 2019 18:41
f90d10a
to
85f0392
Compare
Co-authored-by: Kris Selden <[email protected]>
Co-authored-by: Kris Selden <[email protected]>
Avoid reevaluating the app files and vendor files from scratch for each visit request. Co-authored-by: Kris Selden <[email protected]>
…nce`) * Collapse `createEmberApp` into `buildApp` (since we are no longer separating the concepts of `Ember.Application` vs `Ember.ApplicationInstance`) * Stash the `Ember.Application` instance (along with the `Ember.ApplicationInstance` instance) after creation, for destruction later * Ensure destruction of both `Ember.Application` and `Ember.ApplicationInstance` occur when the `visit` has completed.
This helps ensure that if the dist files themselves are invalid, we fail fast (e.g. before the first `fastboot.visit()` invocation).
rwjblue
force-pushed
the
build-vm-context-per-visit
branch
from
October 30, 2019 20:13
3cc609a
to
5a1b968
Compare
kratiahuja
reviewed
Oct 30, 2019
kratiahuja
reviewed
Oct 30, 2019
kratiahuja
approved these changes
Oct 30, 2019
@rwjblue Thanks for making these changes, these look good to me except the two questions above. |
kratiahuja
reviewed
Oct 30, 2019
…t requests. This shows that mutating the prototype of an object used in multiple requests, leaks that mutation.
rwjblue
force-pushed
the
build-vm-context-per-visit
branch
from
October 30, 2019 23:24
5a1b968
to
0893cec
Compare
rwjblue
changed the title
Refactor to use a single vm context per visit request.
Refactor to use a single sandboxed context per visit request.
Oct 30, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
vm.createContext
per visitadd this back if needed, but the complexity it adds seems quite high
and very very few (if any) folks use it).
Co-authored-by: @krisselden
TODO:
src/ember-app.js
to do a "simple"app.boot()
to ensure that parsing failures themselves will fail the node processEmber.onerror
is unique per-visit (Failing test: Ember.onerror setup via instance initailizer leaks across visits #242)Follow-up TODO:
sandboxGlobals
tobuildSandboxGlobals
(RefactorsandboxGlobals
options intobuildSandboxGlobals
#239)destroyAppInstanceInMs
(RefactordestroyAppInstanceInMs
system #240)Closes #241
Closes #242