Skip to content

Commit c8903ba

Browse files
author
태재영
authored
Fetch fix for userData (#11729)
The userData field is present in both the emscripten_fetch_t and emscripten_fetch_attr_t objects - once we have a fetch going on, it should be read from the fetch instance object instead.
1 parent 38c0d77 commit c8903ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Fetch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ function __emscripten_fetch_xhr(fetch, onsuccess, onerror, onprogress, onreadyst
291291
var fetch_attr = fetch + {{{ C_STRUCTS.emscripten_fetch_t.__attributes }}};
292292
var requestMethod = UTF8ToString(fetch_attr);
293293
if (!requestMethod) requestMethod = 'GET';
294-
var userData = HEAPU32[fetch_attr + {{{ C_STRUCTS.emscripten_fetch_attr_t.userData }}} >> 2];
294+
var userData = HEAPU32[fetch + {{{ C_STRUCTS.emscripten_fetch_t.userData }}} >> 2];
295295
var fetchAttributes = HEAPU32[fetch_attr + {{{ C_STRUCTS.emscripten_fetch_attr_t.attributes }}} >> 2];
296296
var timeoutMsecs = HEAPU32[fetch_attr + {{{ C_STRUCTS.emscripten_fetch_attr_t.timeoutMSecs }}} >> 2];
297297
var withCredentials = !!HEAPU32[fetch_attr + {{{ C_STRUCTS.emscripten_fetch_attr_t.withCredentials }}} >> 2];

0 commit comments

Comments
 (0)