cmd/geth, jsre, rpc: run all JS code on the event loop
Some JSRE methods (PrettyPrint, ToVal) bypassed the event loop. All calls to the JS VM are now wrapped. In order to make this somewhat more foolproof, the otto VM is now a local variable inside the event loop.
This commit is contained in:
@ -104,7 +104,7 @@ func newJSRE(ethereum *eth.Ethereum, libPath, corsDomain string, interactive boo
|
||||
func (js *jsre) apiBindings(f xeth.Frontend) {
|
||||
xe := xeth.New(js.ethereum, f)
|
||||
ethApi := rpc.NewEthereumApi(xe)
|
||||
jeth := rpc.NewJeth(ethApi, js.re.ToVal, js.re)
|
||||
jeth := rpc.NewJeth(ethApi, js.re)
|
||||
|
||||
js.re.Set("jeth", struct{}{})
|
||||
t, _ := js.re.Get("jeth")
|
||||
|
Reference in New Issue
Block a user