Annotate properties that start with "new" so they'll work under ARC
Created attachment 244206 [details] Patch
Comment on attachment 244206 [details] Patch r=me
Does this require an update to some bindings test expectations or a new bindings test?
Committed r178057: <http://trac.webkit.org/changeset/178057>
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.