Add a hard limit on the number of requests tracked per tab. Fix #296.

This commit is contained in:
FelisCatus 2015-02-27 20:02:34 +08:00
parent 7983292b4e
commit 5a7e365896

View File

@ -152,6 +152,7 @@ module.exports = class WebRequestMonitor
if status == 'start' and req.type == 'main_frame'
for own key, value of @_newTabInfo()
info[key] = value
return if info.requestCount > 1000
info.requests[req.requestId] = req
if (oldStatus = info.requestStatus[req.requestId])
info[@eventCategory[oldStatus] + 'Count']--