File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -701,18 +701,6 @@ function instantiateSync(file, info) {
701
701
}
702
702
#endif
703
703
704
- #if ( PTHREADS || WASM_WORKERS ) && ( LOAD_SOURCE_MAP || USE_OFFSET_CONVERTER )
705
- // When using postMessage to send an object, it is processed by the structured
706
- // clone algorithm. The prototype, and hence methods, on that object is then
707
- // lost. This function adds back the lost prototype. This does not work with
708
- // nested objects that has prototypes, but it suffices for WasmSourceMap and
709
- // WasmOffsetConverter.
710
- function resetPrototype ( constructor , attrs ) {
711
- var object = Object . create ( constructor . prototype ) ;
712
- return Object . assign ( object , attrs ) ;
713
- }
714
- #endif
715
-
716
704
#if WASM_ASYNC_COMPILATION
717
705
async function instantiateArrayBuffer ( binaryFile , imports ) {
718
706
try {
Original file line number Diff line number Diff line change @@ -49,6 +49,18 @@ if (ENVIRONMENT_IS_PTHREAD) {
49
49
console . error ( text ) ;
50
50
}
51
51
52
+ #if LOAD_SOURCE_MAP || USE_OFFSET_CONVERTER
53
+ // When using postMessage to send an object, it is processed by the structured
54
+ // clone algorithm. The prototype, and hence methods, on that object is then
55
+ // lost. This function adds back the lost prototype. This does not work with
56
+ // nested objects that has prototypes, but it suffices for WasmSourceMap and
57
+ // WasmOffsetConverter.
58
+ function resetPrototype ( constructor , attrs ) {
59
+ var object = Object . create ( constructor . prototype ) ;
60
+ return Object . assign ( object , attrs ) ;
61
+ }
62
+ #endif
63
+
52
64
#if expectToReceiveOnModule ( 'printErr' )
53
65
if ( ! Module [ 'printErr' ] )
54
66
#endif
You can’t perform that action at this time.
0 commit comments