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 | 220 | if (_errorCode == QNetworkReply::NoError) { |
| 221 | 221 | _rawResponseData.append(_reply->readAll()); |
| 222 | − | |
| 222 | + auto scopeGuard = _engine->getScopeGuard(); | |
| 223 | 223 | if (_responseType == "json") { |
| 224 | 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 | 226 | _responseData = _engine->evaluate("(" + QString(_rawResponseData.data()) + ")"); |
| 226 | 227 | if (_responseData.isError()) { |
| 227 | 228 | _engine->clearExceptions(); |