Bug 113375 - Web Inspector: [Settings] "previouslyViewedFiles" exceeds local storage quota.
Summary: Web Inspector: [Settings] "previouslyViewedFiles" exceeds local storage quota.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Eugene Klyuchnikov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-27 01:57 PDT by Eugene Klyuchnikov
Modified: 2013-03-28 06:07 PDT (History)
9 users (show)

See Also:


Attachments
Patch (3.74 KB, patch)
2013-03-27 03:27 PDT, Eugene Klyuchnikov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Klyuchnikov 2013-03-27 01:57:59 PDT
Original issue:
[devtools] previouslyViewedFiles exceeds local storage quota
https://code.google.com/p/chromium/issues/detail?id=222542

Details: WebInspector.TabbedEditorContainer history length
is limited to 30 entries. But in case of data-urls serialized
history could become really huge.

Given that restoring tabs specified by large data URLs is not
essential we can avoid serializing/saving them.
Comment 1 Eugene Klyuchnikov 2013-03-27 03:14:40 PDT
One more thing to fix: history log is unlimited.
Comment 2 Eugene Klyuchnikov 2013-03-27 03:27:40 PDT
Created attachment 195257 [details]
Patch
Comment 3 Pavel Feldman 2013-03-27 07:30:46 PDT
Comment on attachment 195257 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=195257&action=review

> Source/WebCore/inspector/front-end/TabbedEditorContainer.js:601
> +            if (serializedHistory.length === WebInspector.TabbedEditorContainer.maximalPreviouslyViewedFilesCount)

What if it already was larger than maximum?
Comment 4 Pavel Feldman 2013-03-27 07:31:01 PDT
(This also needs a test)
Comment 5 Eugene Klyuchnikov 2013-03-27 23:49:22 PDT
Comment on attachment 195257 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=195257&action=review

>> Source/WebCore/inspector/front-end/TabbedEditorContainer.js:601
>> +            if (serializedHistory.length === WebInspector.TabbedEditorContainer.maximalPreviouslyViewedFilesCount)
> 
> What if it already was larger than maximum?

serializedHistory is initially clear and we add at most one item per loop.

So this is possible only in if maximalPreviouslyViewedFilesCount <= 0.
Comment 6 WebKit Review Bot 2013-03-28 06:07:27 PDT
Comment on attachment 195257 [details]
Patch

Clearing flags on attachment: 195257

Committed r147104: <http://trac.webkit.org/changeset/147104>
Comment 7 WebKit Review Bot 2013-03-28 06:07:32 PDT
All reviewed patches have been landed.  Closing bug.