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

Issue 853503002: Fix ThreadChecker bug in WeakNSObject (Closed)

Created:
5 years, 11 months ago by droger
Modified:
5 years, 11 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix ThreadChecker bug in WeakNSObject When a WeakNSObject was copied on a different thread from where it was created, the state of the thread checker was lost. As a consequence it was not possible to send a WeakNSObject on another thread, copy it there, and send the copy back: a ThreadChecker error was raised. This CL adds more thread checks in the WeakContainer, which matches what WeakPtr also does, and keeps most of the checks in the main class (which is stricter than WeakPtr). Committed: https://crrev.com/4f05f5a8b793ec451683dd96c058cbe74037713d Cr-Commit-Position: refs/heads/master@{#311865}

Patch Set 1 #

Patch Set 2 : Added more thread checks #

Total comments: 2

Patch Set 3 : Review comments #

Patch Set 4 : Minor comment change #

Total comments: 1

Patch Set 5 : Comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -25 lines) Patch
M base/ios/weak_nsobject.h View 1 2 3 2 chunks +35 lines, -14 lines 0 comments Download
M base/ios/weak_nsobject_unittest.mm View 1 2 3 4 9 chunks +50 lines, -11 lines 0 comments Download

Messages

Total messages: 27 (9 generated)
droger
I tried that fix downstream and it passed the trybots: https://chromereviews.googleplex.com/134567013/
5 years, 11 months ago (2015-01-14 09:31:52 UTC) #2
droger
+noyau After discussion with noyau@, it's not completely clear if this change is good or ...
5 years, 11 months ago (2015-01-14 10:48:37 UTC) #4
droger
On 2015/01/14 10:48:37, droger wrote: > I'm trying another version (patch set 2) that restores ...
5 years, 11 months ago (2015-01-14 13:19:23 UTC) #6
noyau (Ping after 24h)
lgtm
5 years, 11 months ago (2015-01-14 14:29:56 UTC) #7
lliabraa
On 2015/01/14 14:29:56, noyau wrote: > lgtm @noyau - why is it important for the ...
5 years, 11 months ago (2015-01-14 14:32:38 UTC) #8
noyau (Ping after 24h)
On 2015/01/14 14:32:38, lliabraa wrote: > On 2015/01/14 14:29:56, noyau wrote: > > lgtm > ...
5 years, 11 months ago (2015-01-14 15:14:57 UTC) #9
lliabraa
https://codereview.chromium.org/853503002/diff/40001/base/ios/weak_nsobject.h File base/ios/weak_nsobject.h (right): https://codereview.chromium.org/853503002/diff/40001/base/ios/weak_nsobject.h#newcode40 base/ios/weak_nsobject.h:40: // same thread that the WeakNSObject is created on. ...
5 years, 11 months ago (2015-01-14 15:25:00 UTC) #10
droger
I addressed the comments.
5 years, 11 months ago (2015-01-14 15:50:04 UTC) #11
lliabraa
lgtm
5 years, 11 months ago (2015-01-15 13:00:56 UTC) #12
droger
+ Stuart as OWNER
5 years, 11 months ago (2015-01-15 13:03:24 UTC) #14
stuartmorgan
lgtm https://codereview.chromium.org/853503002/diff/80001/base/ios/weak_nsobject_unittest.mm File base/ios/weak_nsobject_unittest.mm (right): https://codereview.chromium.org/853503002/diff/80001/base/ios/weak_nsobject_unittest.mm#newcode100 base/ios/weak_nsobject_unittest.mm:100: void TouchWeakData(const WeakNSObject<NSMutableData>& weak_data) { Please comment the ...
5 years, 11 months ago (2015-01-15 14:51:42 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/853503002/100001
5 years, 11 months ago (2015-01-15 15:39:48 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu/builds/110886) win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/94999) Try ...
5 years, 11 months ago (2015-01-15 17:21:18 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/853503002/100001
5 years, 11 months ago (2015-01-15 17:49:44 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu/builds/110886) win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/94999)
5 years, 11 months ago (2015-01-15 17:50:18 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/853503002/100001
5 years, 11 months ago (2015-01-16 10:16:35 UTC) #25
commit-bot: I haz the power
Committed patchset #5 (id:100001)
5 years, 11 months ago (2015-01-16 11:34:21 UTC) #26
commit-bot: I haz the power
5 years, 11 months ago (2015-01-16 11:35:53 UTC) #27
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/4f05f5a8b793ec451683dd96c058cbe74037713d
Cr-Commit-Position: refs/heads/master@{#311865}

Powered by Google App Engine
This is Rietveld 408576698