Summary: | Cloning a MediaStreamTrack does not clone the logger | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | youenn fablet <youennf> | ||||
Component: | WebRTC | Assignee: | youenn fablet <youennf> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, darin, eric.carlson, webkit-bug-importer, youennf | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
youenn fablet
2019-06-13 16:39:59 PDT
Created attachment 372082 [details]
Patch
Comment on attachment 372082 [details] Patch Clearing flags on attachment: 372082 Committed r246436: <https://trac.webkit.org/changeset/246436> All reviewed patches have been landed. Closing bug. 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. (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 It seems we should move logger to ScriptExecutionContext since we might want to do release logging in workers, especially service workers. |