WebKit Bugzilla
Attachment 373667 Details for
Bug 199580
: Prevent null dereferencing in SubresourceLoader::init's lambda
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199580-20190708144316.patch (text/plain), 1.88 KB, created by
Alex Christensen
on 2019-07-08 14:43:17 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-07-08 14:43:17 PDT
Size:
1.88 KB
patch
obsolete
>Subversion Revision: 247102 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e1c36e910e82b7445e4c679ddba90f0a7fa1ef08..d54aa03f4d043016c02ac0cfb9ee08ace9d36606 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2019-07-08 Alex Christensen <achristensen@webkit.org> >+ >+ Prevent null dereferencing in SubresourceLoader::init's lambda >+ https://bugs.webkit.org/show_bug.cgi?id=199580 >+ >+ Reviewed by Ryosuke Niwa. >+ >+ Crash logs indicate that sometimes m_documentLoader is null. >+ This is similar to https://bugs.webkit.org/show_bug.cgi?id=187360 >+ >+ * loader/SubresourceLoader.cpp: >+ (WebCore::SubresourceLoader::init): >+ > 2019-07-03 Sam Weinig <weinig@apple.com> > > Adopt simple structured bindings in more places >diff --git a/Source/WebCore/loader/SubresourceLoader.cpp b/Source/WebCore/loader/SubresourceLoader.cpp >index e524d5720bbf84f24bfbd25eb14cf1230f112830..ea937371742326e7281e73de570bea520c8549d0 100644 >--- a/Source/WebCore/loader/SubresourceLoader.cpp >+++ b/Source/WebCore/loader/SubresourceLoader.cpp >@@ -164,6 +164,11 @@ void SubresourceLoader::init(ResourceRequest&& request, CompletionHandler<void(b > ResourceLoader::init(WTFMove(request), [this, protectedThis = makeRef(*this), completionHandler = WTFMove(completionHandler)] (bool initialized) mutable { > if (!initialized) > return completionHandler(false); >+ if (!m_documentLoader) { >+ ASSERT_NOT_REACHED(); >+ RELEASE_LOG_IF_ALLOWED("SubresourceLoader::init: resource load canceled because document loader is null (frame = %p, frameLoader = %p, resourceID = %lu)", frame(), frameLoader(), identifier()); >+ return completionHandler(false); >+ } > ASSERT(!reachedTerminalState()); > m_state = Initialized; > m_documentLoader->addSubresourceLoader(this);
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 199580
:
373646
| 373667