WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
140215
Annotate properties that start with "new" so they'll work under ARC
https://bugs.webkit.org/show_bug.cgi?id=140215
Summary
Annotate properties that start with "new" so they'll work under ARC
Anders Carlsson
Reported
2015-01-07 14:46:08 PST
Annotate properties that start with "new" so they'll work under ARC
Attachments
Patch
(2.38 KB, patch)
2015-01-07 14:47 PST
,
Anders Carlsson
ggaren
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Anders Carlsson
Comment 1
2015-01-07 14:47:53 PST
Created
attachment 244206
[details]
Patch
Geoffrey Garen
Comment 2
2015-01-07 14:58:17 PST
Comment on
attachment 244206
[details]
Patch r=me
Geoffrey Garen
Comment 3
2015-01-07 14:58:35 PST
Does this require an update to some bindings test expectations or a new bindings test?
Anders Carlsson
Comment 4
2015-01-07 14:59:42 PST
Committed
r178057
: <
http://trac.webkit.org/changeset/178057
>
Darin Adler
Comment 5
2015-01-07 20:45:56 PST
Comment on
attachment 244206
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=244206&action=review
> Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm:899 > + my $needsReturnsRetainedAnnotation = $attributeName =~ /new([A-Z].*)?/;
http://clang.llvm.org/docs/AutomaticReferenceCounting.html#method-families
says that we also need to check for alloc, copy, mutableCopy, and new. And maybe even init. I also was considering whether __attribute__((objc_method_family(none))) might not be better than NS_RETURNS_NOT_RETAINED, but I guess not. Given that documentation, I’m thinking this regular expression should be: /_*(alloc|copy|mutableCopy|new)([^a-z].*)?/ That wouldn’t address the init family, but it would cover the copy cases, which I think could easily happen in practice.
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