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

EXPORT_ES6 + USE_PTHREADS not compatible with ASSERTIONS #8678

Closed
VirtualTim opened this issue May 27, 2019 · 1 comment · Fixed by #8926 · May be fixed by #8950
Closed

EXPORT_ES6 + USE_PTHREADS not compatible with ASSERTIONS #8678

VirtualTim opened this issue May 27, 2019 · 1 comment · Fixed by #8926 · May be fixed by #8950

Comments

@VirtualTim
Copy link
Collaborator

Due to the changes introduced in #8306 EXPORT_ES6 now works with USE_PTHREADS. However I couldn't get the assertions for checking if the runtime is initialised to work in a worker.
There is an assertion added here:

receiving = "assert(!ENVIRONMENT_IS_PTHREAD, 'Error: USE_PTHREADS and EXPORT_ES6 requires ASSERTIONS=0');\n" + receiving

But without that it would throw with TypeError: Cannot assign to read only property '${overwritten_property_name}' of object '[object Object]'

As far as I can tell it's only that block of assertion that have trouble.

See this comment chain for more discussion: #8306 (comment)

@VirtualTim
Copy link
Collaborator Author

The way I'm fixing that for my build is to change the mentioned line to:
receiving = "if (!ENVIRONMENT_IS_PTHREAD) {\n" + receiving + "}\n"

I think a better solution is needed to fix this properly, but if someone desperately needs EXPORT_ES6 + USE_PTHREADS + ASSERTIONS, then this should at least get things running.

kripken added a commit that referenced this issue Jul 9, 2019
… work if it is the ES6 exports object of a wasm module, which is read-only. Fixes #8678
kripken added a commit that referenced this issue Jul 9, 2019
… work if it is the ES6 exports object of a wasm module, which is read-only. Fixes #8678
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant