Service Worker does not allow XMLHttpRequest

2018-02-09 Thread Lucas Pardue
Hi,

We have a little project that we've run through emscripten and it produces 
an asm.js output called example.js, and example.js.mem. Inside example.js 
is the generated function fetchRemotePackage(), which uses XMLHttpRequest 
(XHR is also used elsewhere in example.js).

I've tried to use this in my Service Worker, starting simply with 
importScripts('example.js'). Unforturnately both Chrome and Firefox return 
a ReferenceError stating that XMLHttpRequest is not defined. It seems that 
Service Worker does not support XHR and it would rather I use the WHATWG Fetch 
API . Note that this is seems to be 
completely distinct from Emscripten's Fetch API.

I wondered if this issue with Service Worker was already on Emscripten's 
radar, a search did not yield much. I also had a look if there was some 
kind of build option that would replace XHR with Fetch but did not have 
much luck.

I suppose I could manually transform the generated code with --js-transform 
but that does not seem ideal, especially since the problem is so broad as 
to affect all Service Workers.

Any tips?

Kind regards
Lucas


-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Chrome Wasm Performance Regression

2018-02-09 Thread Gaurav Dewan
In Chrome 64, the wasm initialization time has increased by 300-400% as 
compared to Chrome 63 (easily reproducible on windows machine - other 
platforms are impacted too)
The issue is reproducible in "Tanks Demo" too - is it a known issue ?

Thanks
Gaurav

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.