|
|
DescriptionConvert ios/chrome/commong/block_unittest.mm to ARC.
Manually convert ios/chrome/commong/block_unittest.mm to ARC (use
a typedef to allow filtering on the tests too).
Note that with ARC, the expectation of the refcount need to be
changed as ARC always call -copy the block when assigning it to
a local variable (i.e. the stack block object is inaccessible,
all blocks are heap blocks).
Duplicate the test as the expectation are a bit different with and
without ARC and we want to ensure thay do not change.
BUG=None
Review-Url: https://codereview.chromium.org/2697613003
Cr-Commit-Position: refs/heads/master@{#450702}
Committed: https://chromium.googlesource.com/chromium/src/+/23925e0de5c7d70a08ca2ac3d1a0d3b1b56cb58a
Patch Set 1 #Patch Set 2 : Duplicate the test for ARC & non-ARC. #
Messages
Total messages: 25 (15 generated)
The CQ bit was checked by sdefresne@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
sdefresne@chromium.org changed reviewers: + lod@chromium.org, marq@chromium.org, stkhapugin@chromium.org
Please all (marq, lod, stkhapugin) take a look. This goal of this test is to check that blocks copy the captured object and that copying block make an additional copy. With ARC, the two copies always happen (so that you cannot have dangling non-null pointer to blocks). This CL is the correct way to test that everything happens correctly with ARC, but I think there is value in keeping the old version too. Should we have two version of the test while we migration from non-ARC to ARC? Or can we just keep the ARC version?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
This test for ARC - lgtm, but +1 to keeping the previous version around.
On 2017/02/13 17:38:50, sdefresne wrote: > Please all (marq, lod, stkhapugin) take a look. > > This goal of this test is to check that blocks copy the captured object and that > copying block make an additional copy. With ARC, the two copies always happen > (so that you cannot have dangling non-null pointer to blocks). > > This CL is the correct way to test that everything happens correctly with ARC, > but I think there is value in keeping the old version too. Should we have two > version of the test while we migration from non-ARC to ARC? Or can we just keep > the ARC version? Two versions makes sense to me. Is there a point to testing a heap and a stack block if heap blocks don't exist anymore? (Could we just have a single block?)
On 2017/02/14 14:20:38, lody wrote: > On 2017/02/13 17:38:50, sdefresne wrote: > > Please all (marq, lod, stkhapugin) take a look. > > > > This goal of this test is to check that blocks copy the captured object and > that > > copying block make an additional copy. With ARC, the two copies always happen > > (so that you cannot have dangling non-null pointer to blocks). > > > > This CL is the correct way to test that everything happens correctly with ARC, > > but I think there is value in keeping the old version too. Should we have two > > version of the test while we migration from non-ARC to ARC? Or can we just > keep > > the ARC version? > > > Two versions makes sense to me. Is there a point to testing a heap and a stack > block if heap blocks don't exist anymore? (Could we just have a single block?) They do exists, it is just not possible to refer to them (i.e. the compiler adds an implicit -copy call). I think there is value keeping the test as is (maybe adding a comment saying that the copy is implicit in ARC and that doing additional copies do not create new copy of the C++ objects).
Description was changed from ========== Convert ios/chrome/commong/block_unittest.mm to ARC. Manually convert ios/chrome/commong/block_unittest.mm to ARC (use a typedef to allow filtering on the tests too). Note that with ARC, the expectation of the refcount need to be changed as ARC always call -copy the block when assigning it to a local variable (i.e. the stack block object is inaccessible, all blocks are heap blocks). BUG=None ========== to ========== Convert ios/chrome/commong/block_unittest.mm to ARC. Manually convert ios/chrome/commong/block_unittest.mm to ARC (use a typedef to allow filtering on the tests too). Note that with ARC, the expectation of the refcount need to be changed as ARC always call -copy the block when assigning it to a local variable (i.e. the stack block object is inaccessible, all blocks are heap blocks). Duplicate the test as the expectation are a bit different with and without ARC and we want to ensure thay do not change. BUG=None ==========
The CQ bit was checked by sdefresne@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
PTAL
Description was changed from ========== Convert ios/chrome/commong/block_unittest.mm to ARC. Manually convert ios/chrome/commong/block_unittest.mm to ARC (use a typedef to allow filtering on the tests too). Note that with ARC, the expectation of the refcount need to be changed as ARC always call -copy the block when assigning it to a local variable (i.e. the stack block object is inaccessible, all blocks are heap blocks). Duplicate the test as the expectation are a bit different with and without ARC and we want to ensure thay do not change. BUG=None ========== to ========== Convert ios/chrome/commong/block_unittest.mm to ARC. Manually convert ios/chrome/commong/block_unittest.mm to ARC (use a typedef to allow filtering on the tests too). Note that with ARC, the expectation of the refcount need to be changed as ARC always call -copy the block when assigning it to a local variable (i.e. the stack block object is inaccessible, all blocks are heap blocks). Duplicate the test as the expectation are a bit different with and without ARC and we want to ensure thay do not change. BUG=None ==========
sdefresne@chromium.org changed required reviewers: + marq@chromium.org
lgtm
lgtm
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by sdefresne@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 20001, "attempt_start_ts": 1487171394475260, "parent_rev": "75acedad6fff0e2858ca3a7eb45e6d641b0de013", "commit_rev": "23925e0de5c7d70a08ca2ac3d1a0d3b1b56cb58a"}
Message was sent while issue was closed.
Description was changed from ========== Convert ios/chrome/commong/block_unittest.mm to ARC. Manually convert ios/chrome/commong/block_unittest.mm to ARC (use a typedef to allow filtering on the tests too). Note that with ARC, the expectation of the refcount need to be changed as ARC always call -copy the block when assigning it to a local variable (i.e. the stack block object is inaccessible, all blocks are heap blocks). Duplicate the test as the expectation are a bit different with and without ARC and we want to ensure thay do not change. BUG=None ========== to ========== Convert ios/chrome/commong/block_unittest.mm to ARC. Manually convert ios/chrome/commong/block_unittest.mm to ARC (use a typedef to allow filtering on the tests too). Note that with ARC, the expectation of the refcount need to be changed as ARC always call -copy the block when assigning it to a local variable (i.e. the stack block object is inaccessible, all blocks are heap blocks). Duplicate the test as the expectation are a bit different with and without ARC and we want to ensure thay do not change. BUG=None Review-Url: https://codereview.chromium.org/2697613003 Cr-Commit-Position: refs/heads/master@{#450702} Committed: https://chromium.googlesource.com/chromium/src/+/23925e0de5c7d70a08ca2ac3d1a0... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/23925e0de5c7d70a08ca2ac3d1a0... |