Skip to content

Failing test: prototype mutation leaking across visit requests.#241

Closed
rwjblue wants to merge 1 commit intoember-fastboot:masterfrom
rwjblue:demonstrate-prototype-mutation-failures
Closed

Failing test: prototype mutation leaking across visit requests.#241
rwjblue wants to merge 1 commit intoember-fastboot:masterfrom
rwjblue:demonstrate-prototype-mutation-failures

Conversation

@rwjblue
Copy link
Member

@rwjblue rwjblue commented Oct 30, 2019

This shows that mutating the prototype of an object used in multiple requests, leaks that mutation.

This shows that mutating the prototype of an object used in multiple
requests, leaks that mutation.
@rwjblue rwjblue changed the title Add test showing prototype mutation leaking across visit requests. Failing test: prototype mutation leaking across visit requests. Oct 30, 2019
@rwjblue
Copy link
Member Author

rwjblue commented Oct 30, 2019

The failure is as expected:

1) FastBoot
       in app prototype mutations do not leak across visits:
     AssertionError: expected '<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset="utf-8">\n    <meta http-equiv="X-UA-Compatible" content="IE=edge">\n    <title>AppWithMutablePrototype</title>\n    <meta name="description" content="">\n    <meta name="viewport" content="width=device-width, initial-scale=1">\n\n    \n<meta name="app-with-mutable-prototype/config/environment" content="%7B%22modulePrefix%22%3A%22app-with-mutable-prototype%22%2C%22environment%22%3A%22development%22%2C%22rootURL%22%3A%22%2F%22%2C%22locationType%22%3A%22auto%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%7D%2C%22_APPLICATION_TEMPLATE_WRAPPER%22%3Afalse%2C%22_DEFAULT_ASYNC_OBSERVERS%22%3Atrue%2C%22_JQUERY_INTEGRATION%22%3Afalse%2C%22_TEMPLATE_ONLY_GLIMMER_COMPONENTS%22%3Atrue%7D%2C%22APP%22%3A%7B%7D%7D" />\n<!-- EMBER_CLI_FASTBOOT_TITLE -->\n\n    <link integrity="" rel="stylesheet" href="/assets/vendor.css">\n    <link integrity="" rel="stylesheet" href="/assets/app-with-mutable-prototype.css">\n\n    \n  </head>\n  <body>\n    <script type="x/boundary" id="fastboot-body-start"></script>Items: 2<script type="x/boundary" id="fastboot-body-end"></script>\n\n    <script src="/assets/vendor.js"></script>\n    <script src="/assets/app-with-mutable-prototype.js"></script>\n\n    \n  </body>\n</html>\n' to match /Items: 1/

@rwjblue rwjblue closed this in #236 Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant