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

vm.js createContext causes TypeError: Cyclic {0} value not allowed. #121

Open
pawelhawro opened this issue Jul 5, 2015 · 0 comments
Open

Comments

@pawelhawro
Copy link

Using JSON.stringify in vm.js#70:

Script.createContext = function(sandbox) {
  var ctx = evals.createContext();
  debug('Creating context using sandbox ' + JSON.stringify(sandbox));
  copyFromSandbox(sandbox, ctx);
  debug('Context after sandbox ' + JSON.stringify(ctx));
  return ctx;
};

causes in som cases exception:

org.mozilla.javascript.EcmaError: TypeError: Cyclic {0} value not allowed. (vm.js#70)

Removing JSON.stringify form debug call resolves issue.

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

No branches or pull requests

1 participant