WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
138893
Add a version of API::Data::createWithoutCopying that takes an NSData
https://bugs.webkit.org/show_bug.cgi?id=138893
Summary
Add a version of API::Data::createWithoutCopying that takes an NSData
Anders Carlsson
Reported
2014-11-19 15:47:14 PST
Add a version of API::Data::createWithoutCopying that takes an NSData
Attachments
Patch
(12.25 KB, patch)
2014-11-19 15:48 PST
,
Anders Carlsson
no flags
Details
Formatted Diff
Diff
Patch
(10.50 KB, patch)
2014-11-19 15:53 PST
,
Anders Carlsson
mitz: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Anders Carlsson
Comment 1
2014-11-19 15:48:10 PST
Created
attachment 241898
[details]
Patch
Anders Carlsson
Comment 2
2014-11-19 15:53:38 PST
Created
attachment 241900
[details]
Patch
mitz
Comment 3
2014-11-19 15:56:16 PST
Comment on
attachment 241900
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=241900&action=review
> Source/WebKit2/Shared/Cocoa/APIDataCocoa.mm:32 > +PassRefPtr<Data> Data::createWithoutCopying(RetainPtr<NSData> data) > +{
I think you should first check if data is a WKNSData and if so unwrap it :-|
Anders Carlsson
Comment 4
2014-11-19 16:02:13 PST
Committed
r176362
: <
http://trac.webkit.org/changeset/176362
>
Joseph Pecoraro
Comment 5
2015-02-10 00:19:19 PST
Comment on
attachment 241900
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=241900&action=review
> Source/WebKit2/UIProcess/API/Cocoa/WKBrowsingContextController.mm:245 > [data retain]; > - apiData = API::Data::createWithoutCopying((const unsigned char*)[data bytes], [data length], releaseNSData, data); > + apiData = API::Data::createWithoutCopying(data);
Given that the createWithoutCopying now takes a RetainPtr<NSData> and leakRef's its contents, is the [data retain] line here necessary? It seems this would be an unbalanced +1.
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