Copy will create a copy/clone of the runtime.
Copy is useful for saving some time when creating many similar runtimes.
This method works by walking the original runtime and cloning each object, scope, stash, etc. into a new runtime.
Be on the lookout for memory leaks or inadvertent sharing of resources.
`, 1) v, err := tester.vm.Copy().Run(`obj.abc;`) is(is(v, 1), is(nil, err)) })
})`) vm.Copy() }
is(value, "Xyzzy0[object Object]") vm1 := vm0.Copy() value, err = vm1.Run(` def();
Copy is referenced in 10 repositoriesgithub.com/robertkrimen/otto github.com/npolar/ghostdoc
- 2 references in js.go