WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
198844
Cloning a MediaStreamTrack does not clone the logger
https://bugs.webkit.org/show_bug.cgi?id=198844
Summary
Cloning a MediaStreamTrack does not clone the logger
youenn fablet
Reported
2019-06-13 16:39:59 PDT
Cloning a MediaStreamTrack does not clone the logger
Attachments
Patch
(34.50 KB, patch)
2019-06-13 16:50 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2019-06-13 16:50:01 PDT
Created
attachment 372082
[details]
Patch
Radar WebKit Bug Importer
Comment 2
2019-06-13 17:13:33 PDT
<
rdar://problem/51729128
>
WebKit Commit Bot
Comment 3
2019-06-14 10:14:53 PDT
Comment on
attachment 372082
[details]
Patch Clearing flags on attachment: 372082 Committed
r246436
: <
https://trac.webkit.org/changeset/246436
>
WebKit Commit Bot
Comment 4
2019-06-14 10:14:55 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 5
2019-06-14 15:19:03 PDT
Comment on
attachment 372082
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=372082&action=review
Oops, had a comment, but forgot to get it to you before you landed this.
> Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:48 > +static inline Ref<const Logger> loggerFromContext(ScriptExecutionContext& context) > +{ > + return downcast<Document>(context).logger(); > +}
I’m not sure that a function for this is a good idea. This expression seems not much longer than the function call. I suggest just doing this work inline. It’s good to be able to see the code assuming the context is a document, I think, rather than encapsulating that in a helper.
> Source/WebCore/Modules/mediastream/MediaStream.cpp:54 > +static inline Ref<const Logger> loggerFromContext(ScriptExecutionContext& context) > +{ > + return downcast<Document>(context).logger(); > +}
Ditto.
youenn fablet
Comment 6
2019-06-14 17:07:15 PDT
(In reply to Darin Adler from
comment #5
)
> Comment on
attachment 372082
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=372082&action=review
> > Oops, had a comment, but forgot to get it to you before you landed this. > > > Source/WebCore/Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp:48 > > +static inline Ref<const Logger> loggerFromContext(ScriptExecutionContext& context) > > +{ > > + return downcast<Document>(context).logger(); > > +} > > I’m not sure that a function for this is a good idea. This expression seems > not much longer than the function call. I suggest just doing this work > inline. It’s good to be able to see the code assuming the context is a > document, I think, rather than encapsulating that in a helper. > > > Source/WebCore/Modules/mediastream/MediaStream.cpp:54 > > +static inline Ref<const Logger> loggerFromContext(ScriptExecutionContext& context) > > +{ > > + return downcast<Document>(context).logger(); > > +} > > Ditto.
OK, let's make MediaStream take a Document& instead of a ScriptExecutionContext& since code is expecting that elsewhere anyway. Filed
https://bugs.webkit.org/show_bug.cgi?id=198873
youenn fablet
Comment 7
2019-06-15 21:17:27 PDT
It seems we should move logger to ScriptExecutionContext since we might want to do release logging in workers, especially service workers.
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