WebKit Bugzilla
Attachment 358759 Details for
Bug 193307
: REGRESSION(239737) iOS quicklook tests should not dereference null
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193307-20190109161153.patch (text/plain), 7.03 KB, created by
Alex Christensen
on 2019-01-09 16:11:53 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-01-09 16:11:53 PST
Size:
7.03 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 239790) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,20 @@ >+2019-01-09 Alex Christensen <achristensen@webkit.org> >+ >+ REGRESSION(239737) iOS quicklook tests should not dereference null >+ https://bugs.webkit.org/show_bug.cgi?id=193307 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The quicklook tests rely on ResourceHandle on iOS for some reason. >+ This is a problem we'll fix later, but for now keep them working by not crashing. >+ >+ * platform/network/mac/ResourceHandleMac.mm: >+ (WebCore::ResourceHandle::createNSURLConnection): >+ (WebCore::ResourceHandle::start): >+ (WebCore::ResourceHandle::willSendRequest): >+ (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication): >+ (WebCore::ResourceHandle::receivedCredential): >+ > 2019-01-09 Zalan Bujtas <zalan@apple.com> > > [Datalist] Crash when input with datalist is dynamically added. >Index: Source/WebCore/platform/network/mac/ResourceHandleMac.mm >=================================================================== >--- Source/WebCore/platform/network/mac/ResourceHandleMac.mm (revision 239788) >+++ Source/WebCore/platform/network/mac/ResourceHandleMac.mm (working copy) >@@ -157,12 +157,14 @@ void ResourceHandle::createNSURLConnecti > if (d->m_user.isEmpty() && d->m_pass.isEmpty()) { > // <rdar://problem/7174050> - For URLs that match the paths of those previously challenged for HTTP Basic authentication, > // try and reuse the credential preemptively, as allowed by RFC 2617. >- d->m_initialCredential = d->m_context->storageSession()->credentialStorage().get(firstRequest().cachePartition(), firstRequest().url()); >+ if (auto* networkStorageSession = d->m_context->storageSession()) >+ d->m_initialCredential = networkStorageSession->credentialStorage().get(firstRequest().cachePartition(), firstRequest().url()); > } else { > // If there is already a protection space known for the URL, update stored credentials before sending a request. > // This makes it possible to implement logout by sending an XMLHttpRequest with known incorrect credentials, and aborting it immediately > // (so that an authentication dialog doesn't pop up). >- d->m_context->storageSession()->credentialStorage().set(firstRequest().cachePartition(), Credential(d->m_user, d->m_pass, CredentialPersistenceNone), firstRequest().url()); >+ if (auto* networkStorageSession = d->m_context->storageSession()) >+ networkStorageSession->credentialStorage().set(firstRequest().cachePartition(), Credential(d->m_user, d->m_pass, CredentialPersistenceNone), firstRequest().url()); > } > } > >@@ -240,7 +242,8 @@ bool ResourceHandle::start() > if (!d->m_context->isValid()) > return false; > >- d->m_storageSession = d->m_context->storageSession()->platformSession(); >+ if (auto* networkStorageSession = d->m_context->storageSession()) >+ d->m_storageSession = networkStorageSession->platformSession(); > > // FIXME: Do not use the sync version of shouldUseCredentialStorage when the client returns true from usesAsyncCallbacks. > bool shouldUseCredentialStorage = !client() || client()->shouldUseCredentialStorage(this); >@@ -449,7 +452,9 @@ void ResourceHandle::willSendRequest(Res > // Only consider applying authentication credentials if this is actually a redirect and the redirect > // URL didn't include credentials of its own. > if (d->m_user.isEmpty() && d->m_pass.isEmpty() && !redirectResponse.isNull()) { >- Credential credential = d->m_context->storageSession()->credentialStorage().get(request.cachePartition(), request.url()); >+ Credential credential; >+ if (auto* networkStorageSession = d->m_context->storageSession()) >+ credential = networkStorageSession->credentialStorage().get(request.cachePartition(), request.url()); > if (!credential.isEmpty()) { > d->m_initialCredential = credential; > >@@ -540,16 +545,20 @@ bool ResourceHandle::tryHandlePasswordBa > // The stored credential wasn't accepted, stop using it. > // There is a race condition here, since a different credential might have already been stored by another ResourceHandle, > // but the observable effect should be very minor, if any. >- d->m_context->storageSession()->credentialStorage().remove(d->m_partition, challenge.protectionSpace()); >+ if (auto* networkStorageSession = d->m_context->storageSession()) >+ networkStorageSession->credentialStorage().remove(d->m_partition, challenge.protectionSpace()); > } > > if (!challenge.previousFailureCount()) { >- Credential credential = d->m_context->storageSession()->credentialStorage().get(d->m_partition, challenge.protectionSpace()); >+ Credential credential; >+ if (auto* networkStorageSession = d->m_context->storageSession()) >+ credential = networkStorageSession->credentialStorage().get(d->m_partition, challenge.protectionSpace()); > if (!credential.isEmpty() && credential != d->m_initialCredential) { > ASSERT(credential.persistence() == CredentialPersistenceNone); > if (challenge.failureResponse().httpStatusCode() == 401) { > // Store the credential back, possibly adding it as a default for this directory. >- d->m_context->storageSession()->credentialStorage().set(d->m_partition, credential, challenge.protectionSpace(), challenge.failureResponse().url()); >+ if (auto* networkStorageSession = d->m_context->storageSession()) >+ networkStorageSession->credentialStorage().set(d->m_partition, credential, challenge.protectionSpace(), challenge.failureResponse().url()); > } > [challenge.sender() useCredential:credential.nsCredential() forAuthenticationChallenge:mac(challenge)]; > return true; >@@ -591,7 +600,8 @@ void ResourceHandle::receivedCredential( > URL urlToStore; > if (challenge.failureResponse().httpStatusCode() == 401) > urlToStore = challenge.failureResponse().url(); >- d->m_context->storageSession()->credentialStorage().set(d->m_partition, webCredential, ProtectionSpace([d->m_currentMacChallenge protectionSpace]), urlToStore); >+ if (auto* networkStorageSession = d->m_context->storageSession()) >+ networkStorageSession->credentialStorage().set(d->m_partition, webCredential, ProtectionSpace([d->m_currentMacChallenge protectionSpace]), urlToStore); > [[d->m_currentMacChallenge sender] useCredential:webCredential.nsCredential() forAuthenticationChallenge:d->m_currentMacChallenge]; > } else > [[d->m_currentMacChallenge sender] useCredential:credential.nsCredential() forAuthenticationChallenge:d->m_currentMacChallenge];
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
Flags:
bfulgham
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193307
: 358759