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
219 219
220 if (_errorCode == QNetworkReply::NoError) {220 if (_errorCode == QNetworkReply::NoError) {
221 _rawResponseData.append(_reply->readAll());221 _rawResponseData.append(_reply->readAll());
222 222 auto scopeGuard = _engine->getScopeGuard();
223 if (_responseType == "json") {223 if (_responseType == "json") {
224 // V8TODO: V8 JSON parser needs to be used instead224 // 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
225 _responseData = _engine->evaluate("(" + QString(_rawResponseData.data()) + ")");226 _responseData = _engine->evaluate("(" + QString(_rawResponseData.data()) + ")");
226 if (_responseData.isError()) {227 if (_responseData.isError()) {
227 _engine->clearExceptions();228 _engine->clearExceptions();