plasma-umass / doppio

Breaks the browser language barrier (includes a plugin-free JVM).
http://plasma-umass.github.io/doppio-demo
MIT License
2.16k stars 175 forks source link

Doppio fails to start on Safari #426

Closed jimfb closed 8 years ago

jimfb commented 8 years ago

On Safari, I get a stack trace that looks like this:

SyntaxError: Unexpected token '>'
eval
eval code
eval
(anonymous function)jvm.ts:518
evalNativeModulejvm.ts:569
(anonymous function)jvm.ts:641
(anonymous function)OverlayFS.ts:57
iutil.ts:149

cc @jvilk @hrj

jvilk commented 8 years ago

That's odd. Looks like it doesn't like something we're producing during eval.

Will take a look when I have time, hopefully this weekend. Others can feel free to beat me to the punch.

jvilk commented 8 years ago

I'm not getting that when I run the unit tester with test-browser, but test 15 seems to hang for no explicable reason.

jvilk commented 8 years ago

I cannot reproduce this, Jim. I just ran all of the Safari unit tests w/o a WebWorker and it worked fine. Do you have custom native methods? Maybe you have a bug in them?

jimfb commented 8 years ago

I dug a little deeper on this one and discovered the root cause. I was wrong to blame doppio, sorry, closing.

Details: We were using ES6 in our native method implementation. Firefox and chrome support ES6 natively, so it "just worked" and so we failed to realize that we weren't transforming our code before deploying. The ES6 code failed to run in Safari, but the error pointed straight at doppio internals so I failed to notice that it was running user-land code.

Once again, sorry for the noise.

jvilk commented 8 years ago

It's cool. Since we eval code, the stack traces often get destroyed, although I believe other browsers typically have more comprehensible stack traces!