WebKit Bugzilla
Attachment 359315 Details for
Bug 189097
: ASSERTION FAILED: m_networkLoadInformationByID.contains(identifier) in WebKit::NetworkConnectionToWebProcess::addNetworkLoadInformationMetrics
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-189097-20190116150033.patch (text/plain), 5.38 KB, created by
youenn fablet
on 2019-01-16 15:00:33 PST
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-01-16 15:00:33 PST
Size:
5.38 KB
patch
obsolete
>Subversion Revision: 240051 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index dba51ee7af91003f50657261c9007b7aca104c00..a22f8d00374a450c8a7cc966b67636869a12b9d8 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,26 @@ >+2019-01-16 Youenn Fablet <youenn@apple.com> >+ >+ ASSERTION FAILED: m_networkLoadInformationByID.contains(identifier) in WebKit::NetworkConnectionToWebProcess::addNetworkLoadInformationMetrics >+ https://bugs.webkit.org/show_bug.cgi?id=189097 >+ <rdar://problem/43856423> >+ >+ Reviewed by Alex Christensen. >+ >+ In case where the inspector is launched, it will instruct the NetworkConnectionToWebProcess to start capturing network metrics. >+ If this happens in the middle of a load, addNetworkLoadInformationMetrics might fail since addNetworkLoadInformation will not be called. >+ To fix this issue, store whether to capture metrics at NetworkResourceLoader level. >+ >+ To ensure that the case of switching back and forth capture of metrics, disable loader capture of metrics whenver NetworkConnectionToWebProcess is asked to. >+ >+ * NetworkProcess/NetworkConnectionToWebProcess.cpp: >+ (WebKit::NetworkConnectionToWebProcess::setCaptureExtraNetworkLoadMetricsEnabled): >+ * NetworkProcess/NetworkConnectionToWebProcess.h: >+ (WebKit::NetworkConnectionToWebProcess::addNetworkLoadInformationMetrics): >+ * NetworkProcess/NetworkResourceLoader.cpp: >+ (WebKit::m_shouldCaptureExtraNetworkLoadMetrics): >+ (WebKit::NetworkResourceLoader::shouldCaptureExtraNetworkLoadMetrics const): >+ * NetworkProcess/NetworkResourceLoader.h: >+ > 2019-01-16 Chris Dumez <cdumez@apple.com> > > Regression(PSON) View becomes blank after click a cross-site download link >diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp >index 73cf708a18fa9c9211db371ca0d03616fa3bf772..dbac30b0b2cbf0fcb8d03debd8f0dfa94675e63f 100644 >--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp >@@ -545,8 +545,12 @@ void NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles(const Vector<Stri > void NetworkConnectionToWebProcess::setCaptureExtraNetworkLoadMetricsEnabled(bool enabled) > { > m_captureExtraNetworkLoadMetricsEnabled = enabled; >- if (!m_captureExtraNetworkLoadMetricsEnabled) >- m_networkLoadInformationByID.clear(); >+ if (m_captureExtraNetworkLoadMetricsEnabled) >+ return; >+ >+ m_networkLoadInformationByID.clear(); >+ for (auto& loader : m_networkResourceLoaders.values()) >+ loader->disableExtraNetworkLoadMetricsCapture(); > } > > void NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession() >diff --git a/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp b/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp >index ba140932f43e8512b7a91a9cc9f5bc360008ebea..d48efb11495bf6adad798daeb56d5b8243e165e2 100644 >--- a/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp >@@ -96,6 +96,7 @@ NetworkResourceLoader::NetworkResourceLoader(NetworkResourceLoadParameters&& par > , m_isAllowedToAskUserForCredentials { m_parameters.clientCredentialPolicy == ClientCredentialPolicy::MayAskClientForCredentials } > , m_bufferingTimer { *this, &NetworkResourceLoader::bufferingTimerFired } > , m_cache { sessionID().isEphemeral() ? nullptr : connection.networkProcess().cache() } >+ , m_shouldCaptureExtraNetworkLoadMetrics(m_connection->captureExtraNetworkLoadMetricsEnabled()) > { > ASSERT(RunLoop::isMain()); > // FIXME: This is necessary because of the existence of EmptyFrameLoaderClient in WebCore. >@@ -944,7 +945,7 @@ bool NetworkResourceLoader::isAlwaysOnLoggingAllowed() const > > bool NetworkResourceLoader::shouldCaptureExtraNetworkLoadMetrics() const > { >- return m_connection->captureExtraNetworkLoadMetricsEnabled(); >+ return m_shouldCaptureExtraNetworkLoadMetrics; > } > > #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED >diff --git a/Source/WebKit/NetworkProcess/NetworkResourceLoader.h b/Source/WebKit/NetworkProcess/NetworkResourceLoader.h >index 5598a26d90f6df3bbb9808e33d2352e1d4b158a8..fb0eec7ecff21ecfa4acb64e730febe4b2cbaa20 100644 >--- a/Source/WebKit/NetworkProcess/NetworkResourceLoader.h >+++ b/Source/WebKit/NetworkProcess/NetworkResourceLoader.h >@@ -113,6 +113,8 @@ public: > static void logCookieInformation(NetworkConnectionToWebProcess&, const String& label, const void* loggedObject, const WebCore::NetworkStorageSession&, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, const String& referrer, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Optional<uint64_t> identifier); > #endif > >+ void disableExtraNetworkLoadMetricsCapture() { m_shouldCaptureExtraNetworkLoadMetrics = false; } >+ > private: > NetworkResourceLoader(NetworkResourceLoadParameters&&, NetworkConnectionToWebProcess&, Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::DelayedReply&&); > >@@ -205,6 +207,7 @@ private: > std::unique_ptr<NetworkLoadChecker> m_networkLoadChecker; > bool m_shouldRestartLoad { false }; > ResponseCompletionHandler m_responseCompletionHandler; >+ bool m_shouldCaptureExtraNetworkLoadMetrics { false }; > > Optional<NetworkActivityTracker> m_networkActivityTracker; > };
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 189097
:
348428
|
359194
| 359315