Oh right, thanks Brion... we should probably test strict mode more in Emscripten because of this. I'll look into that.
- Alon On Thu, Aug 15, 2019 at 3:36 PM Brion Vibber <[email protected]> wrote: > Note that strict mode is engaged for all files loaded as ES6 modules, so > if you're using <script type=module src=blah.js> or packaging it into > something that uses ES6 modules internally and wraps your code inside its > own code (either loaded via script type=module or wrapped into something > with "use strict" at the top), then your emscripten shell might be getting > turned into strict mode when you didn't expect it... > > -- brion > > On Thu, Aug 15, 2019 at 1:42 PM Alon Zakai <[email protected]> wrote: > >> I don't think Safari enables strict mode by default - that would break a >> lot of sites! But maybe this is in some special specific case? Or maybe >> your app is run inside HTML or JS that enables strict mode? >> >> In general, we should fix strict mode bugs - please file an issue with a >> testcase, if the errors show up in emscripten-generated code. (To debug >> this, it's usually easier to look on a desktop browser in a non-minified >> build.) >> >> On Wed, Aug 14, 2019 at 6:48 AM Юрий Катков <[email protected]> wrote: >> >>> Hi! >>> >>> I've compiled my code with emscripten 1.38.28 and now I try to launch it >>> on IOS 13. I've encountered with such error in Safari browser: >>> [Error] Unhandled Promise Rejection: TypeError: 'arguments', 'callee', >>> and 'caller' cannot be accessed in this context. >>> (anonymous function) (wasm_engine.js:1:164129) >>> run (wasm_engine.js:1:164129) >>> runCaller (wasm_engine.js:1:164033) >>> removeRunDependency (wasm_engine.js:1:17782) >>> receiveInstance (wasm_engine.js:1:19069) >>> receiveInstantiatedSource (wasm_engine.js:1:19358) >>> promiseReactionJob >>> >>> I'm not good in web development and JS in partial, but after some >>> investigations I think, the problem is that Safari on IOS 13 uses *strict >>> mode* by default, which causes error mentioned above. >>> >>> Could anyone suggest me how can I compile JS glue code for *strict mode* >>> or avoid such error in my web js code? >>> >>> Thanks a lot! >>> >>> -- >>> 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 [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/emscripten-discuss/a4d699b6-235d-4043-b694-2a573beff35e%40googlegroups.com >>> <https://groups.google.com/d/msgid/emscripten-discuss/a4d699b6-235d-4043-b694-2a573beff35e%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> 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 [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpQwS5QjCk9yMtEh1AVynAFvRofG5n9hRyiP2YLcSqz-kg%40mail.gmail.com >> <https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpQwS5QjCk9yMtEh1AVynAFvRofG5n9hRyiP2YLcSqz-kg%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/CAFnWYT%3DhTFc6hFJy8pKzia_vGO_ikdLM0cCDk-XOEyNmRCJd4w%40mail.gmail.com > <https://groups.google.com/d/msgid/emscripten-discuss/CAFnWYT%3DhTFc6hFJy8pKzia_vGO_ikdLM0cCDk-XOEyNmRCJd4w%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpSu2xAK%3DMyRe3dHru-sJ%2BmC%3DQGYtCfsD8wGVxaPHiMNnQ%40mail.gmail.com.
