History

Fix V8 scope performance issue on libnode22

ksuprynowicz committed 11 months ago

Commit a9bd0781 parent 4aad6b218 files · +298 −349Browse files

Showing the changes to libraries/script-engine/src/XMLHttpRequestClass.cpp (1 of 18 files). Show all

Unified · Split

libraries/script-engine/src/XMLHttpRequestClass.cpp+2−1
@@ -219,9 +219,10 @@ void XMLHttpRequestClass::requestFinished() { · 218 unmodified lines
219219
220220 if (_errorCode == QNetworkReply::NoError) {
221221 _rawResponseData.append(_reply->readAll());
222−
222+ auto scopeGuard = _engine->getScopeGuard();
223223 if (_responseType == "json") {
224224 // V8TODO: V8 JSON parser needs to be used instead
225+ // V8TODO: make sure this always happens on script engine thread on script engines that have a script manager
225226 _responseData = _engine->evaluate("(" + QString(_rawResponseData.data()) + ")");
226227 if (_responseData.isError()) {
227228 _engine->clearExceptions();