Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Issue 2235353003: Fix ScopedNSObject tests to deal with selection of ScopedTypeRef::get(). (Closed)

Created:
4 years, 4 months ago by sdefresne
Modified:
4 years, 4 months ago
Reviewers:
Mark Mentovai
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M base/mac/scoped_nsobject_unittest.mm View 1 chunk +4 lines, -1 line 0 comments Download
M base/mac/scoped_nsobject_unittest_arc.mm View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (7 generated)
sdefresne
Please take a look.
4 years, 4 months ago (2016-08-11 20:24:20 UTC) #3
Mark Mentovai
LGTM
4 years, 4 months ago (2016-08-12 17:59:35 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2235353003/1
4 years, 4 months ago (2016-08-12 19:21:34 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 4 months ago (2016-08-12 19:25:25 UTC) #10
commit-bot: I haz the power
4 years, 4 months ago (2016-08-12 19:26:57 UTC) #12
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/269f2a7139aa0df611b294d0d4e23b6ca4791915
Cr-Commit-Position: refs/heads/master@{#411730}

Powered by Google App Engine
This is Rietveld 408576698