WebKit Bugzilla
Attachment 342884 Details for
Bug 186718
: Better pack ResourceResponse
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186718-20180616113101.patch (text/plain), 3.82 KB, created by
Chris Dumez
on 2018-06-16 11:30:33 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2018-06-16 11:30:33 PDT
Size:
3.82 KB
patch
obsolete
>Subversion Revision: 232906 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 71a30fc1f2f7173a632ef3c6fb395923b8a3da25..221ee25c8a76f15c811f340c95052f410bd125b0 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,14 @@ >+2018-06-16 Chris Dumez <cdumez@apple.com> >+ >+ Better pack ResourceResponse >+ https://bugs.webkit.org/show_bug.cgi?id=186718 >+ >+ Reviewed by Simon Fraser. >+ >+ Better pack ResourceResponse to reduce its size on Mac from 632 to 616 bytes. >+ >+ * platform/network/ResourceResponseBase.h: >+ > 2018-06-15 Chris Dumez <cdumez@apple.com> > > Better pack MediaQuery >diff --git a/Source/WebCore/platform/network/ResourceResponseBase.cpp b/Source/WebCore/platform/network/ResourceResponseBase.cpp >index e2df22690b2583291fee3f0aa75c27897d860f3c..419678396bc63319f8f8194dc09051d3c21da2f8 100644 >--- a/Source/WebCore/platform/network/ResourceResponseBase.cpp >+++ b/Source/WebCore/platform/network/ResourceResponseBase.cpp >@@ -47,21 +47,15 @@ bool isScriptAllowedByNosniff(const ResourceResponse& response) > return MIMETypeRegistry::isSupportedJavaScriptMIMEType(mimeType); > } > >-ResourceResponseBase::ResourceResponseBase() >- : m_isNull(true) >- , m_expectedContentLength(0) >- , m_httpStatusCode(0) >-{ >-} >+ResourceResponseBase::ResourceResponseBase() = default; > > ResourceResponseBase::ResourceResponseBase(const URL& url, const String& mimeType, long long expectedLength, const String& textEncodingName) >- : m_isNull(false) >- , m_url(url) >+ : m_url(url) > , m_mimeType(mimeType) > , m_expectedContentLength(expectedLength) > , m_textEncodingName(textEncodingName) > , m_certificateInfo(CertificateInfo()) // Empty but valid for synthetic responses. >- , m_httpStatusCode(0) >+ , m_isNull(false) > { > } > >diff --git a/Source/WebCore/platform/network/ResourceResponseBase.h b/Source/WebCore/platform/network/ResourceResponseBase.h >index 0321767361303d75787ef5bbb68d0a05b0c8f690..af695b7e8f7f6de6a8aae13ff718de0fbec05872 100644 >--- a/Source/WebCore/platform/network/ResourceResponseBase.h >+++ b/Source/WebCore/platform/network/ResourceResponseBase.h >@@ -206,10 +206,9 @@ private: > void sanitizeHTTPHeaderFieldsAccordingToTainting(); > > protected: >- bool m_isNull; > URL m_url; > AtomicString m_mimeType; >- long long m_expectedContentLength; >+ long long m_expectedContentLength { 0 }; > AtomicString m_textEncodingName; > AtomicString m_httpStatusText; > AtomicString m_httpVersion; >@@ -218,8 +217,6 @@ protected: > > mutable std::optional<CertificateInfo> m_certificateInfo; > >- int m_httpStatusCode; >- > private: > mutable std::optional<Seconds> m_age; > mutable std::optional<WallTime> m_date; >@@ -227,21 +224,24 @@ private: > mutable std::optional<WallTime> m_lastModified; > mutable ParsedContentRange m_contentRange; > mutable CacheControlDirectives m_cacheControlDirectives; >+ std::optional<SHA1::Digest> m_cacheBodyKey; >+ >+ Source m_source { Source::Unknown }; >+ Type m_type { Type::Default }; >+ Tainting m_tainting { Tainting::Basic }; >+ >+protected: >+ int m_httpStatusCode { 0 }; >+ bool m_isNull { true }; > >+private: > mutable bool m_haveParsedCacheControlHeader { false }; > mutable bool m_haveParsedAgeHeader { false }; > mutable bool m_haveParsedDateHeader { false }; > mutable bool m_haveParsedExpiresHeader { false }; > mutable bool m_haveParsedLastModifiedHeader { false }; > mutable bool m_haveParsedContentRangeHeader { false }; >- >- Source m_source { Source::Unknown }; >- >- std::optional<SHA1::Digest> m_cacheBodyKey; >- >- Type m_type { Type::Default }; > bool m_isRedirected { false }; >- Tainting m_tainting { Tainting::Basic }; > }; > > inline bool operator==(const ResourceResponse& a, const ResourceResponse& b) { return ResourceResponseBase::compare(a, b); }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186718
:
342869
|
342870
| 342884