Bug 213271 - Web Inspector: ASSERTION FAILED: decodedLength >= dataLength at WebCore::NetworkResourcesData::ResourceData::decodeDataToContent()
Summary: Web Inspector: ASSERTION FAILED: decodedLength >= dataLength at WebCore::Netw...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-06-16 16:52 PDT by Devin Rousso
Modified: 2020-06-18 15:11 PDT (History)
7 users (show)

See Also:


Attachments
Patch (4.54 KB, patch)
2020-06-16 16:57 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2020-06-16 16:52:47 PDT
.
Comment 1 Devin Rousso 2020-06-16 16:53:07 PDT
<rdar://problem/64168350>
Comment 2 Devin Rousso 2020-06-16 16:57:39 PDT
Created attachment 402055 [details]
Patch
Comment 3 Maciej Stachowiak 2020-06-16 19:30:09 PDT
Comment on attachment 402055 [details]
Patch

Is it possible to add a test case for this?
Comment 4 Devin Rousso 2020-06-18 14:44:21 PDT
(In reply to Maciej Stachowiak from comment #3)
> Comment on attachment 402055 [details]
> Patch
> 
> Is it possible to add a test case for this?
I'm not really sure what's to test here.  The primary change/fix is just removing an incorrect `ASSERT` (specifically, it's possible for the decoded size of a resource to be smaller than its encoded size).

Furthermore, this logic (meaning `m_contentSize`) only really starts taking effect once there's 200MB (`maximumResourcesContentSize`) of data being stored, at which point the oldest content is evicted.  It exists just to make sure Web Inspector doesn't hold onto data forever, eventually crashing when we hit our 4GB limit.
Comment 5 EWS 2020-06-18 15:11:26 PDT
Committed r263231: <https://trac.webkit.org/changeset/263231>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 402055 [details].