summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtexthtmlparser.cpp
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@gmail.com>2020-10-27 14:32:12 +1000
committerLorn Potter <lorn.potter@gmail.com>2021-06-05 07:08:21 +1000
commit75b0e8d59999d91f1828e464166f6ad829d74d7b (patch)
tree7d80765ce1893620e447666a781f9734ca51b9fd /src/gui/text/qtexthtmlparser.cpp
parent107a8058aec8712f228569ac5f0ed5db30318e53 (diff)
wasm: fix network crash on abort
Also work around emscripten bug #8238 emcripten_fetch_close() does not abort the network request, but instead just free’s the emscripten_fetch_t object. onsuccess or onerror will still be called, but now with a stale pointer to the deleted emscripten_fetch_t object. See https://github.com/emscripten-core/emscripten/issues/8234 Work around this by setting the userData to null when we want to abort or are done with the request. The onerror and onsuccess callbacks can then check this field (on the the still valid emscripten_fetch_t), and bail out on the (from the Qt side) aborted request. Call emcripten_fetch_close() from on error and onsuccess; this should be the point when the emscripten request is done, and there will be no more callbacks. Pick-to: 5.15 Fixes: QTBUG-87813 Change-Id: Ie9b8a29037eb150c23741683588b0f0bfd5d8c63 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/gui/text/qtexthtmlparser.cpp')
0 files changed, 0 insertions, 0 deletions