WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
222441
Streamline decoding NSURL so it doesn't require allocating NSData and autoreleasing
https://bugs.webkit.org/show_bug.cgi?id=222441
Summary
Streamline decoding NSURL so it doesn't require allocating NSData and autorel...
Darin Adler
Reported
2021-02-25 15:37:38 PST
Streamline decoding NSURL so it doesn't require allocating NSData and autoreleasing
Attachments
Patch
(7.22 KB, patch)
2021-02-25 15:46 PST
,
Darin Adler
sam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2021-02-25 15:46:57 PST
Created
attachment 421577
[details]
Patch
Sam Weinig
Comment 2
2021-02-25 15:56:11 PST
Comment on
attachment 421577
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=421577&action=review
> Source/WTF/wtf/cocoa/NSURLExtras.mm:153 > +NSURL *URLWithData(const void* bytes, size_t length, NSURL *baseURL)
What is the reason behind using const void* here rather than const uint8_t*? With string code, I like to be more specific if I can to avoid people accidentally passing in UChar* to a function like this.
Darin Adler
Comment 3
2021-02-25 16:04:11 PST
Comment on
attachment 421577
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=421577&action=review
>> Source/WTF/wtf/cocoa/NSURLExtras.mm:153 >> +NSURL *URLWithData(const void* bytes, size_t length, NSURL *baseURL) > > What is the reason behind using const void* here rather than const uint8_t*? With string code, I like to be more specific if I can to avoid people accidentally passing in UChar* to a function like this.
I was trying to side step the three different types for bytes and was a little bit influenced by the types in NSData methods. But your argument seems compelling, and CFData functions take uint8_t*. I will go with uint8_t instead.
Darin Adler
Comment 4
2021-02-25 16:08:13 PST
Looks like Brent’s patch had to be rolled out. I’ll have to wait to land this until it’s landed again.
Radar WebKit Bug Importer
Comment 5
2021-03-04 15:38:22 PST
<
rdar://problem/75061347
>
Darin Adler
Comment 6
2021-03-05 12:41:52 PST
Not needed any more. Brent’s latest is using CFURLCreateAbsoluteURLWithBytes now, not URLWithData, so there’s no need for this.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug