Skip to content

Allow circular structures to be sent over the websocket, make it an error to send circular request bodies#4407

Merged
brian-mann merged 18 commits intodevelopfrom
issue-4346
Jun 13, 2019
Merged

Allow circular structures to be sent over the websocket, make it an error to send circular request bodies#4407
brian-mann merged 18 commits intodevelopfrom
issue-4346

Conversation

@flotwig
Copy link
Contributor

@flotwig flotwig commented Jun 6, 2019

Thought about using flatted (the successor to circular-json), but jsperf shows it performs 50% slower: https://jsperf.com/flatted-vs-circularjson

@flotwig flotwig changed the title [WIP] Allow circular structures to be sent over the websocket [WIP] Allow circular structures to be sent over the websocket, make it an error to send circular request bodies Jun 6, 2019
@flotwig flotwig changed the title [WIP] Allow circular structures to be sent over the websocket, make it an error to send circular request bodies Allow circular structures to be sent over the websocket, make it an error to send circular request bodies Jun 7, 2019
@flotwig flotwig requested a review from a team June 7, 2019 14:36
Copy link
Member

@brian-mann brian-mann left a comment

Choose a reason for hiding this comment

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

  • use the global io instead of requiring in @packages/socket in the extension.
  • build the extension to look at the source to ensure it's not packaging up socket.io twice
  • we need to write a single "e2e / driver" test that passes in a circular dep.
  • the test could be simple like something in cypress_spec.coffee or similar. we just need to use Cypress.backend(...) and pass in an object that would cause it to normally fail

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.

Test runner hangs with RangeError: Maximum call stack size exceeded Expecting element to be disabled results in maximum call stack size error

2 participants

Comments