Showing the changes to libraries/script-engine/src/XMLHttpRequestClass.cpp (1 of 18 files). Show all
Unified · Split
| @@ -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 instead | 224 | // 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(); |