Chromium Code Reviews
DescriptionFix ScopedNSObject tests to deal with selection of ScopedTypeRef::get().
As the same binary links both scoped_nsobject_unittest{,_arc}.o objects
files, there are at least two implementation of that method, one compiled
without ARC and one compiled with ARC. Depending on the order of object
files on the linker command-line the implementation selected may change.
The non-ARC version does not contains any call to retain/release while the
ARC version does call objc_retainAutoreleaseAndReturn. Those are functionally
equivalent the retain/release calls are balanced, but the ARC version cause
the refcount to be increased until the current autorelease pool is released.
Putting the "p3 = p1;" in a separate block with an explicit auto-release pool
drain fix the test in all configurations.
BUG=637065
Committed: https://crrev.com/269f2a7139aa0df611b294d0d4e23b6ca4791915
Cr-Commit-Position: refs/heads/master@{#411730}
Patch Set 1 #
Messages
Total messages: 12 (7 generated)
|
||||||||||||||||||||||||||||