WebKit Bugzilla
Attachment 341601 Details for
Bug 186108
: Revert changes made to URLWithUserTypedString made in https://trac.webkit.org/changeset/232281
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-186108-20180530142145.patch (text/plain), 1.99 KB, created by
youenn fablet
on 2018-05-30 14:21:45 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2018-05-30 14:21:45 PDT
Size:
1.99 KB
patch
obsolete
>Subversion Revision: 232263 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2cf62e2addbe5bb40aafbbc050b571242ffe7aba..c135d542774df87bc164456a7b98f322c8b35578 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2018-05-30 Youenn Fablet <youenn@apple.com> >+ >+ Revert changes made to URLWithUserTypedString made in https://trac.webkit.org/changeset/232281 >+ https://bugs.webkit.org/show_bug.cgi?id=186108 >+ <rdar://problem/40663065> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Covered by existing API tests. >+ >+ * platform/mac/WebCoreNSURLExtras.mm: >+ (WebCore::URLWithUserTypedString): >+ Return early if WebCore::URL is not able to create a CFURL. >+ Use CFURL otherwise to keep the existing behavior as much as possible. >+ > 2018-05-30 Youenn Fablet <youenn@apple.com> > > REGRESSION (r231107): Test http/tests/quicklook/same-origin-xmlhttprequest-allowed.html logs CSP failure >diff --git a/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm b/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm >index 88d9c0baf445c97c040f5b8e636cedc8d4a6bcd1..8df855412896a70cefafec41085be4c481e13974 100644 >--- a/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm >+++ b/Source/WebCore/platform/mac/WebCoreNSURLExtras.mm >@@ -895,8 +895,18 @@ NSURL *URLWithUserTypedString(NSString *string, NSURL *nsURL) > if (!string) > return nil; > >+ // Let's check whether the URL is bogus. > URL url { URL { nsURL }, string }; >- return (__bridge NSURL*) url.createCFURL().autorelease(); >+ if (!url.createCFURL()) >+ return nil; >+ >+ // FIXME: https://bugs.webkit.org/show_bug.cgi?id=186057 >+ // We should be able to use url.createCFURL instead of using directly CFURL parsing routines. >+ NSData *data = dataWithUserTypedString(string); >+ if (!data) >+ return [NSURL URLWithString:@""]; >+ >+ return URLWithData(data, nsURL); > } > > NSURL *URLWithUserTypedStringDeprecated(NSString *string, NSURL *URL)
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 186108
: 341601