Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is IE11 still supported #6204

Closed
twwwt opened this issue Feb 6, 2018 · 7 comments
Closed

Is IE11 still supported #6204

twwwt opened this issue Feb 6, 2018 · 7 comments

Comments

@twwwt
Copy link
Contributor

twwwt commented Feb 6, 2018

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.

@kripken
Copy link
Member

kripken commented Feb 6, 2018

Yes, IE11 should still be supported, so this sounds like a bug. (And I think maybe @Brion tests that?)

Where is that exception thrown?

@MarcelKlammer
Copy link
Contributor

MarcelKlammer commented Feb 6, 2018

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
}
versus

function 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.

@MarcelKlammer
Copy link
Contributor

@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.

@bvibber
Copy link
Collaborator

bvibber commented Feb 6, 2018

Yep, -s LEGACY_VM_SUPPORT=1 should fix this by including the polyfills for Math.imul and 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.

@MarcelKlammer
Copy link
Contributor

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.

@stale
Copy link

stale bot commented Sep 19, 2019

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.

@stale stale bot added the wontfix label Sep 19, 2019
@twwwt
Copy link
Contributor Author

twwwt commented Sep 19, 2019

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.

@stale stale bot removed the wontfix label Sep 19, 2019
@sbc100 sbc100 closed this as completed Sep 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants