Modified: branches/safari-608-branch/Source/WebKit/ChangeLog (248631 => 248632)
--- branches/safari-608-branch/Source/WebKit/ChangeLog 2019-08-13 20:43:00 UTC (rev 248631)
+++ branches/safari-608-branch/Source/WebKit/ChangeLog 2019-08-13 20:55:52 UTC (rev 248632)
@@ -1,5 +1,23 @@
2019-08-13 Alan Coon <alanc...@apple.com>
+ Apply patch. rdar://problem/54236234
+
+ 2019-08-13 Chris Dumez <cdu...@apple.com>
+
+ Crash under NetworkResourceLoader::start()
+ https://bugs.webkit.org/show_bug.cgi?id=200628
+ <rdar://problem/54220519>
+
+ Reviewed by Youenn Fablet.
+
+ Simplified version of r248540 for the branch.
+
+ * NetworkProcess/NetworkResourceLoader.cpp:
+ (WebKit::NetworkResourceLoader::start):
+ * NetworkProcess/NetworkResourceLoader.h:
+
+2019-08-13 Alan Coon <alanc...@apple.com>
+
Cherry-pick r248440. rdar://problem/54237795
[Mac] Use the PID of the WebContent process when issuing local file read sandbox extensions
Modified: branches/safari-608-branch/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (248631 => 248632)
--- branches/safari-608-branch/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2019-08-13 20:43:00 UTC (rev 248631)
+++ branches/safari-608-branch/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2019-08-13 20:55:52 UTC (rev 248632)
@@ -171,7 +171,10 @@
m_wasStarted = true;
if (m_networkLoadChecker) {
- m_networkLoadChecker->check(ResourceRequest { originalRequest() }, this, [this] (auto&& result) {
+ m_networkLoadChecker->check(ResourceRequest { originalRequest() }, this, [this, weakThis = makeWeakPtr(*this)] (auto&& result) {
+ if (!weakThis)
+ return;
+
WTF::switchOn(result,
[this] (ResourceError& error) {
RELEASE_LOG_IF_ALLOWED("start: error checking (pageID = %" PRIu64 ", frameID = %" PRIu64 ", resourceID = %" PRIu64 ", isMainResource = %d, isSynchronous = %d, parentPID = %d, error.domain = %{public}s, error.code = %d)", m_parameters.webPageID.toUInt64(), m_parameters.webFrameID, m_parameters.identifier, this->isMainResource(), this->isSynchronous(), m_parameters.parentPID, error.domain().utf8().data(), error.errorCode());
Modified: branches/safari-608-branch/Source/WebKit/NetworkProcess/NetworkResourceLoader.h (248631 => 248632)
--- branches/safari-608-branch/Source/WebKit/NetworkProcess/NetworkResourceLoader.h 2019-08-13 20:43:00 UTC (rev 248631)
+++ branches/safari-608-branch/Source/WebKit/NetworkProcess/NetworkResourceLoader.h 2019-08-13 20:55:52 UTC (rev 248632)
@@ -36,6 +36,7 @@
#include <WebCore/ResourceResponse.h>
#include <WebCore/SecurityPolicyViolationEvent.h>
#include <WebCore/Timer.h>
+#include <wtf/WeakPtr.h>
namespace WebCore {
class BlobDataFileReference;
@@ -58,7 +59,8 @@
: public RefCounted<NetworkResourceLoader>
, public NetworkLoadClient
, public IPC::MessageSender
- , public WebCore::ContentSecurityPolicyClient {
+ , public WebCore::ContentSecurityPolicyClient
+ , public CanMakeWeakPtr<NetworkResourceLoader> {
public:
static Ref<NetworkResourceLoader> create(NetworkResourceLoadParameters&& parameters, NetworkConnectionToWebProcess& connection, Messages::NetworkConnectionToWebProcess::PerformSynchronousLoad::DelayedReply&& reply = nullptr)
{