From 5a7e36589653476d5d67762d63a171111906c2eb Mon Sep 17 00:00:00 2001 From: FelisCatus Date: Fri, 27 Feb 2015 20:02:34 +0800 Subject: [PATCH] Add a hard limit on the number of requests tracked per tab. Fix #296. --- omega-target-chromium-extension/src/web_request_monitor.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/omega-target-chromium-extension/src/web_request_monitor.coffee b/omega-target-chromium-extension/src/web_request_monitor.coffee index f551e83..1be956f 100644 --- a/omega-target-chromium-extension/src/web_request_monitor.coffee +++ b/omega-target-chromium-extension/src/web_request_monitor.coffee @@ -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']--