Closed Bug 939655 Opened 11 years ago Closed 11 years ago

MediaStreamGraphImpl redefines LOG macro used in other .cpp files

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: cajbir, Assigned: cajbir)

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

This bug is spun off form Bug 939582 comment 2. It appears that MediaStreamGraphImpl redefines the LOG macro to do some logging in an inline function. This could have issues depending on when this file is included in a .cpp file since most of the media .cpp files also #define a LOG macro.

We should move the inline function that requires this in the .cpp file and remove the LOG redefinition.
Attached patch Fix (obsolete) — Splinter Review
Removes the macro from the header file and puts the inline destructor that depended on it in the implementation file.

While doing this I notice that MediaStreamGraph's destructor is non-virtual but MediaStreamGraphImpl is created and passed around as a MediaStreamGraph pointer in places. Is this a problem? Is it ever deleted as a MediaStreamGraph pointer?
Assignee: nobody → chris.double
Status: NEW → ASSIGNED
Attachment #8333661 - Flags: review?(roc)
(In reply to Chris Double (:doublec) from comment #1)
> While doing this I notice that MediaStreamGraph's destructor is non-virtual
> but MediaStreamGraphImpl is created and passed around as a MediaStreamGraph
> pointer in places. Is this a problem? Is it ever deleted as a
> MediaStreamGraph pointer?

I think it's OK but we should probably make the destructor virtual just to be sure.
Attached patch fixSplinter Review
Fix for build error that showed in try server push in comment 2. Carried forward r+. New Try: https://tbpl.mozilla.org/?tree=Try&rev=6a29b57f3120
Attachment #8333661 - Attachment is obsolete: true
Attachment #8333756 - Flags: review+
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #3)
> 
> I think it's OK but we should probably make the destructor virtual just to
> be sure.

Spun off as bug 939716.
https://hg.mozilla.org/mozilla-central/rev/5dfb6c2488f9
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: