From 1c685c86a70b76302d702074a5840f97da4524f8 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 26 May 2017 12:46:36 -0400 Subject: [PATCH] mind https://bugs.chromium.org/p/v8/issues/detail?id=2869 --- src/js/storage.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/js/storage.js b/src/js/storage.js index 435babe3a..8a13bc2ee 100644 --- a/src/js/storage.js +++ b/src/js/storage.js @@ -710,7 +710,11 @@ if ( listEntry.title === '' || listEntry.group === 'custom' ) { matches = head.match(/(?:^|\n)!\s*Title:([^\n]+)/i); if ( matches !== null ) { - listEntry.title = matches[1].trim(); + // https://bugs.chromium.org/p/v8/issues/detail?id=2869 + // JSON.stringify/JSON.parse is to work around String.slice() + // potentially causing the whole raw filter list to be held in + // memory just because we cut out the title as a substring. + listEntry.title = JSON.parse(JSON.stringify(matches[1].trim())); } } // Extract update frequency information