diff --git a/scripts/modules/request.js b/scripts/modules/request.js index 37f3ac0d7b..31a7a4a1f8 100644 --- a/scripts/modules/request.js +++ b/scripts/modules/request.js @@ -40,6 +40,9 @@ module.exports = { response = { statusCode: httpRequest.status }; } callback(error, response, optionalCallbackParameter); + + // Break circular reference to httpRequest so the engine can garbage collect it. + httpRequest.onreadystatechange = null; } }; if (typeof options === 'string') {