WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
200936
CaptureDeviceManager does not need to be CanMakeWeakPtr
https://bugs.webkit.org/show_bug.cgi?id=200936
Summary
CaptureDeviceManager does not need to be CanMakeWeakPtr
youenn fablet
Reported
2019-08-20 12:36:57 PDT
CaptureDeviceManager does not need to be CanMakeWeakPtr
Attachments
Patch
(7.90 KB, patch)
2019-08-20 12:43 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(7.88 KB, patch)
2019-08-21 04:29 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(7.10 KB, patch)
2019-08-21 13:54 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(7.10 KB, patch)
2019-08-22 02:21 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2019-08-20 12:43:35 PDT
Created
attachment 376792
[details]
Patch
youenn fablet
Comment 2
2019-08-21 04:29:52 PDT
Created
attachment 376861
[details]
Patch
EWS Watchlist
Comment 3
2019-08-21 04:30:53 PDT
Attachment 376861
[details]
did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:119: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Alex Christensen
Comment 4
2019-08-21 08:25:32 PDT
Comment on
attachment 376861
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=376861&action=review
> Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:117 > +static inline AudioObjectPropertyListenerBlock createAudioObjectPropertyListenerBlock()
You could've just left this code where it is, removed the Block_copy, and replaced the call to weakThis->refreshAudioCaptureDevices() with CoreAudioCaptureDeviceManager::singleton().refreshAudioCaptureDevices().
> Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:51 > + enum class NotifyIfDevicesHaveChanged { Notify, DoNotNotify };
I don't see why these need to be public now.
youenn fablet
Comment 5
2019-08-21 13:54:12 PDT
Created
attachment 376916
[details]
Patch for landing
youenn fablet
Comment 6
2019-08-21 13:57:12 PDT
(In reply to Alex Christensen from
comment #4
)
> Comment on
attachment 376861
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=376861&action=review
> > > Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:117 > > +static inline AudioObjectPropertyListenerBlock createAudioObjectPropertyListenerBlock() > > You could've just left this code where it is, removed the Block_copy, and > replaced the call to weakThis->refreshAudioCaptureDevices() with > CoreAudioCaptureDeviceManager::singleton().refreshAudioCaptureDevices().
Sure, the idea was to make sure to not use this.
> > Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:51 > > + enum class NotifyIfDevicesHaveChanged { Notify, DoNotNotify }; > > I don't see why these need to be public now.
Because the block is outside CoreAudioCaptureDeviceManager. I reinlined the block and kept them private.
Alex Christensen
Comment 7
2019-08-21 14:51:07 PDT
Comment on
attachment 376916
[details]
Patch for landing View in context:
https://bugs.webkit.org/attachment.cgi?id=376916&action=review
> Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:124 > + auto listener = Block_copy(^(UInt32 count, const AudioObjectPropertyAddress properties[]) {
I think this Block_copy makes a leak. Could you use BlockPtr?
youenn fablet
Comment 8
2019-08-22 02:21:51 PDT
Created
attachment 377000
[details]
Patch for landing
EWS Watchlist
Comment 9
2019-08-22 02:23:04 PDT
Attachment 377000
[details]
did not pass style-queue: ERROR: Source/WebCore/platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:124: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 10
2019-08-22 04:05:56 PDT
Comment on
attachment 377000
[details]
Patch for landing Clearing flags on attachment: 377000 Committed
r249002
: <
https://trac.webkit.org/changeset/249002
>
WebKit Commit Bot
Comment 11
2019-08-22 04:05:58 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 12
2019-08-22 04:06:16 PDT
<
rdar://problem/54593543
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug