Bug 113375

Summary: Web Inspector: [Settings] "previouslyViewedFiles" exceeds local storage quota.
Product: WebKit Reporter: Eugene Klyuchnikov <eustas>
Component: Web Inspector (Deprecated)Assignee: Eugene Klyuchnikov <eustas>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, keishi, loislo, pfeldman, pmuellr, vsevik, web-inspector-bugs, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

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.