aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/js.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-05-25 08:27:37 +0800
committerFelix Lange <fjl@twurst.com>2015-05-25 08:27:37 +0800
commite221a449e069783ca53fd02716066e66baeae1f0 (patch)
tree03b5465f6d71e79b06befede03976f852d9f9058 /cmd/geth/js.go
parent394826f520f4c34fe11c8e9dc45c5810024a22e2 (diff)
downloaddexon-e221a449e069783ca53fd02716066e66baeae1f0.tar.gz
dexon-e221a449e069783ca53fd02716066e66baeae1f0.tar.zst
dexon-e221a449e069783ca53fd02716066e66baeae1f0.zip
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.
Diffstat (limited to 'cmd/geth/js.go')
-rw-r--r--cmd/geth/js.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/geth/js.go b/cmd/geth/js.go
index 342a80bd2..0fb234d45 100644
--- a/cmd/geth/js.go
+++ b/cmd/geth/js.go
@@ -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")