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

Issue 2372513004: Remove Crit::Scope lock by using atomic bool property (Closed)

Created:
4 years, 2 months ago by daniela-webrtc
Modified:
4 years, 2 months ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Remove Crit::Scope lock by using atomic bool property. The clang static analyzer seems unable to resolve cpp locks in ObjC code. As of current time, the clang analyzer has known limitations documented http://clang.llvm.org/docs/ThreadSafetyAnalysis.html#known-limitations. From the documentation: "The analysis currently does not do any checking inside constructors or destructors. In other words, every constructor and destructor is treated as if it was annotated with NO_THREAD_SAFETY_ANALYSIS." This is 'probably' why the analyzer is unable to resolve the lock when used in ObjC land (the cpp works fine). The lock can be removed by using atomic property instead. It's not on performance critical path and we expect updates on just one queue and reads from others. That's why the thread assurance atomic properties bring is enough. The CL removes rtc_sdk_peerconnection_objc_warnings_config as well as it's no longer needed. BUG=webrtc:6308 Committed: https://crrev.com/edbae5e0ac5be950a8c4372d420c8229bdc7f161 Cr-Commit-Position: refs/heads/master@{#14450}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Replace nonatomic with atomic property. - It's not on performance critical path and we expect upda… #

Total comments: 3

Patch Set 3 : Re-add instance variable and manually synthesize it. - It's an agreed way of defining properties i… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -21 lines) Patch
M webrtc/sdk/BUILD.gn View 2 chunks +0 lines, -10 lines 0 comments Download
M webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm View 1 2 4 chunks +4 lines, -11 lines 0 comments Download

Messages

Total messages: 39 (15 generated)
daniela-webrtc
4 years, 2 months ago (2016-09-27 08:30:42 UTC) #3
kthelgason
On 2016/09/27 08:30:42, denicija-webrtc wrote: 👍 LGTM
4 years, 2 months ago (2016-09-27 08:35:30 UTC) #4
tkchin_webrtc
lgtm
4 years, 2 months ago (2016-09-27 11:31:02 UTC) #6
magjed_webrtc
LGTM, regardless if you land this or use some ObjC locking instead. nit: Can you ...
4 years, 2 months ago (2016-09-27 14:48:46 UTC) #7
tkchin_webrtc
On 2016/09/27 14:48:46, magjed_webrtc wrote: > LGTM, regardless if you land this or use some ...
4 years, 2 months ago (2016-09-27 15:25:28 UTC) #8
daniela-webrtc
On 2016/09/27 15:25:28, tkchin_webrtc wrote: > On 2016/09/27 14:48:46, magjed_webrtc wrote: > > LGTM, regardless ...
4 years, 2 months ago (2016-09-28 08:54:04 UTC) #10
kthelgason
On 2016/09/28 08:54:04, denicija-webrtc wrote: > I wouldn't be comfortable to set the property to ...
4 years, 2 months ago (2016-09-28 09:09:39 UTC) #11
tkchin_webrtc
On 2016/09/28 09:09:39, kthelgason wrote: > On 2016/09/28 08:54:04, denicija-webrtc wrote: > > I wouldn't ...
4 years, 2 months ago (2016-09-28 09:31:20 UTC) #12
daniela-webrtc
On 2016/09/28 09:31:20, tkchin_webrtc wrote: > On 2016/09/28 09:09:39, kthelgason wrote: > > On 2016/09/28 ...
4 years, 2 months ago (2016-09-28 11:41:38 UTC) #14
daniela-webrtc
Mind taking a look at this implementation?
4 years, 2 months ago (2016-09-28 13:11:47 UTC) #16
magjed_webrtc
lgtm https://codereview.webrtc.org/2372513004/diff/20001/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm File webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm (right): https://codereview.webrtc.org/2372513004/diff/20001/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm#newcode113 webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm:113: @synthesize hasStarted = _hasStarted; So this @synthesize step ...
4 years, 2 months ago (2016-09-28 13:56:36 UTC) #17
tkchin_webrtc
https://codereview.webrtc.org/2372513004/diff/20001/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm File webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm (right): https://codereview.webrtc.org/2372513004/diff/20001/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm#newcode113 webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm:113: @synthesize hasStarted = _hasStarted; On 2016/09/28 13:56:36, magjed_webrtc wrote: ...
4 years, 2 months ago (2016-09-28 14:17:37 UTC) #18
daniela-webrtc
https://codereview.webrtc.org/2372513004/diff/20001/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm File webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm (right): https://codereview.webrtc.org/2372513004/diff/20001/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm#newcode113 webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm:113: @synthesize hasStarted = _hasStarted; On 2016/09/28 14:17:37, tkchin_webrtc wrote: ...
4 years, 2 months ago (2016-09-28 14:38:42 UTC) #19
tkchin_webrtc
On 2016/09/28 14:38:42, denicija-webrtc wrote: > https://codereview.webrtc.org/2372513004/diff/20001/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm > File webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm (right): > > https://codereview.webrtc.org/2372513004/diff/20001/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm#newcode113 > ...
4 years, 2 months ago (2016-09-28 14:42:55 UTC) #20
daniela-webrtc
On 2016/09/28 14:42:55, tkchin_webrtc wrote: > On 2016/09/28 14:38:42, denicija-webrtc wrote: > > > https://codereview.webrtc.org/2372513004/diff/20001/webrtc/sdk/objc/Framework/Classes/avfoundationvideocapturer.mm ...
4 years, 2 months ago (2016-09-28 15:10:48 UTC) #21
tkchin_webrtc
On 2016/09/28 15:10:48, denicija-webrtc wrote: > On 2016/09/28 14:42:55, tkchin_webrtc wrote: > > On 2016/09/28 ...
4 years, 2 months ago (2016-09-28 15:12:02 UTC) #22
daniela-webrtc
On 2016/09/28 15:12:02, tkchin_webrtc wrote: > On 2016/09/28 15:10:48, denicija-webrtc wrote: > > On 2016/09/28 ...
4 years, 2 months ago (2016-09-29 07:34:57 UTC) #23
daniela-webrtc
Now should be fine. Mind giving one (hopefully) final look?
4 years, 2 months ago (2016-09-29 09:41:40 UTC) #24
tkchin_webrtc
On 2016/09/29 09:41:40, denicija-webrtc wrote: > Now should be fine. > Mind giving one (hopefully) ...
4 years, 2 months ago (2016-09-29 09:47:44 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2372513004/40001
4 years, 2 months ago (2016-09-29 12:08:26 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: linux_baremetal on master.tryserver.webrtc (JOB_FAILED, http://build.chromium.org/p/tryserver.webrtc/builders/linux_baremetal/builds/14532)
4 years, 2 months ago (2016-09-29 12:10:55 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.webrtc.org/2372513004/40001
4 years, 2 months ago (2016-09-30 07:19:03 UTC) #35
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 2 months ago (2016-09-30 07:21:13 UTC) #37
commit-bot: I haz the power
4 years, 2 months ago (2016-09-30 07:21:38 UTC) #39
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/edbae5e0ac5be950a8c4372d420c8229bdc7f161
Cr-Commit-Position: refs/heads/master@{#14450}

Powered by Google App Engine
This is Rietveld 408576698