WebKit Bugzilla
Attachment 359194 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
bug-189097-20190115130443.patch (text/plain), 5.39 KB, created by
youenn fablet
on 2019-01-15 13:04:43 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2019-01-15 13:04:43 PST
Size:
5.39 KB
patch
obsolete
>Subversion Revision: 239989 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 5c01c377af621accde80c2c6b39ebccd67a2aafe..835f0da875d2cd617ac593508923c1ef9270f160 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,26 @@ >+2019-01-15 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 NOBODY (OOPS!). >+ >+ 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-15 Brian Burg <bburg@apple.com> > > WebDriver: update Create Window implementation to support newest specification >diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp >index 73cf708a18fa9c9211db371ca0d03616fa3bf772..46f35b7427331c0edc685485b59b4433cddfb8eb 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->shouldNotCaptureExtraNetworkLoadMetricsEnabled(); > } > > 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..00fb451351662ea182e84ea20455376f30c3bcf2 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 shouldNotCaptureExtraNetworkLoadMetricsEnabled() { 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