Repository navigation
Is IE11 still supported #6204
Description
Activity
Yes, IE11 should still be supported, so this sounds like a bug. (And I think maybe @Brion tests that?)
Where is that exception thrown?
I can add to that. The last working emscripten asm version is 1.37.27. A change in 1.37.28 broke IE11 and Edge support. If it get's loaded, it loads very slowly, but most of the time, it's not working.
I tried to find the differences between both outputs, but since I'm not too familiar with it, I couldn't spot any obvious.
Things I've spotted:
function allocateUTF8(str) {
var size = lengthBytesUTF8(str) + 1;
var ret = _malloc(size);
if (ret) stringToUTF8Array(str, HEAP8, ret, size);
return ret
}
versusfunction intArrayFromString(stringy, dontAddNull, length) {
var len = length > 0 ? length : lengthBytesUTF8(stringy) + 1;
var u8array = new Array(len);
var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length);
if (dontAddNull) u8array.length = numBytesWritten;
return u8array
}or
STATICTOP = STATIC_BASE + 8649808;versus
STATICTOP = STATIC_BASE + 8649824;or
poolPtr = allocate(TOTAL_ENV_SIZE, "i8", ALLOC_STATIC);
envPtr = allocate(MAX_ENV_VALUES * 4, "i8*", ALLOC_STATIC);versus
poolPtr = staticAlloc(TOTAL_ENV_SIZE);
envPtr = staticAlloc(MAX_ENV_VALUES * 4);or missing
_emscripten_get_global_libc and
var _emscripten_get_global_libc = Module["_emscripten_get_global_libc"] = asm["_emscripten_get_global_libc"];These are the most obvious code changes I found in BRFv4.
@twwwt By the way, you can get rid of your error by adding LEGACY_VM_SUPPORT=1 as compiler flag. The "Object expected" comes from the stripped Math.imul function.
Reacted by Brooke Vibber and CHOI JAEHYEONYep,
-s LEGACY_VM_SUPPORT=1should fix this by including the polyfills forMath.imuland a few other things. Works fine for me as of 1.37.28 with my ogv.js project.Note if you build with assertions it should log a notice about missing the legacy option to console, but if you're stripping assertions I believe it'll fail as described in the original report.
So after a day of trying to get to the bottom of this bug I found the issue and created a pull request. Hope that helps and finds it's way to a soon to be released version tag, so I don't have to downgrade for asm.js builds.
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.
As the creator of this issue, I think it can be closed. We are using LEGACY_VM_SUPPORT=1 meanwhile to compile for older browsers, in particular for IE11.
For now, just a question: is IE11 still officially supported. If yes, this might develop into a bug depending on the following: We do have library written in C that we cross-compile to JS using Emscripten. Recently, we upgraded to version 1.37.29 and had to notice that, using IE11, we now get an exception; "TypeError: Object expected" thrown by some function from ASM code. However, the same cross-compiled JS script works with recent versions of FF, Chrome, and SF. The last version of Emscripten that is known to us to work is 1.37.1; we haven't tested other versions in-between, though.