emscripten-core / emscripten-core/emsdk
TypeError: Failed to execute 'createObjectURL' on 'URL': Overload resolution failed.
- Dominant language
- Python
- Stars
- 3.7k
- Forks
- 821
- Avg merge
- 1h 25m
- Merged PRs (30d)
- 3
Description
I use pthread support of emcc. Compiler generated *.worker.js as WebWorker routine. In *.worker.js, `createObjectURL` was called with its old usage. However, old usage has been removed from browser engine.

Old usage:
```
URL.createObjectURL(blob);
```
New usage:
```
URL.createObjectURL(new Blob([blob],{type: 'application/zip'})); // value of "type" should be MIME type.
```
Compile command:
```
em++ main.cpp -O3 -s WASM=1 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=2 -o $(WASM_JS)
```
main.cpp:
```
#include
#include
#include
void* EMSCRIPTEN_KEEPALIVE routine(void* param){
printf("Routine\n");
return NULL;
}
int main(int argc, char **argv)
{
printf("Hello WASM\n");
pthread_t pthread;
pthread_create(&pthread, NULL, routine, NULL);
pthread_join(pthread, NULL);
}
```
Error in chrome console:

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.