--disable-ogg configure option breaks build after bug 689834

VERIFIED FIXED in mozilla12

Status

()

Core
Audio/Video
VERIFIED FIXED
6 years ago
5 years ago

People

(Reporter: aceman, Assigned: aceman)

Tracking

Trunk
mozilla12
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Since 16th dec 2011 I get this compile error when using --disable-ogg in configure (I am building Thunderbird so ogg really isn't needed):

/usr/local/TB-hg/mozilla/content/xml/document/src/nsXMLContentSink.cpp: In member function 'nsresult nsXMLContentSink::HandleStartElement(const PRUnichar*, const PRUnichar**, PRUint32, PRInt
/usr/local/TB-hg/mozilla/content/xml/document/src/nsXMLContentSink.cpp:1081:33: error: 'audio' is not a member of 'nsGkAtoms'
/usr/local/TB-hg/mozilla/content/xml/document/src/nsXMLContentSink.cpp:1082:33: error: 'video' is not a member of 'nsGkAtoms'
gmake[8]: *** [nsXMLContentSink.o] Error 1
(Assignee)

Updated

6 years ago
Blocks: 689834
Summary: --disable-ogg configure option breaks build after bug 689384 → --disable-ogg configure option breaks build after bug 689834

Comment 1

5 years ago
The problem is that nsGkAtoms::audio and nsGkAtoms::video are #ifdef MOZ_MEDIA. They need to be wrapped inside an #ifdef MOZ_MEDIA, like in http://mxr.mozilla.org/mozilla-central/source/content/xml/document/src/nsXMLContentSink.cpp#567
(Assignee)

Comment 2

5 years ago
Lines 1081 and 1082 should be wrapped in #ifdef MOZ_MEDIA ? OK, I can try that.
(Assignee)

Updated

5 years ago
Assignee: nobody → acelists
(Assignee)

Comment 3

5 years ago
Created attachment 589580 [details] [diff] [review]
fix compile

It needed some more places to fix, but thanks for the hint.
Attachment #589580 - Flags: review?(bzbarsky)
(Assignee)

Updated

5 years ago
Status: NEW → ASSIGNED
Comment on attachment 589580 [details] [diff] [review]
fix compile

r=me
Attachment #589580 - Flags: review?(bzbarsky) → review+

Comment 5

5 years ago
Completely optional, but if you wanted to make the patch look a little cleaner, you could move the nsGkAtoms::audio and nsGkAtoms::video if statement checks into the middle of the if block, so that you don't have the || hanging out all by itself
(Assignee)

Comment 6

5 years ago
Yeah, I thought it is ugly :) But could it produce slower code? Is there shortcut evaluation of logical expression in some C++ compiler? If yes, then the least common nsGkAtoms values should be placed last (as it is now). So that the more common comparisons decide the result sooner and the execution can skip the less common ones.
Logical expressions are always shortcut-evaluated in C++.

A compiler could observe that the order doesn't matter here (due to lack of side-effects) and reorder the tests if it wanted, of course.  That's sort of dangerous for a compiler to do, though.
(Assignee)

Comment 8

5 years ago
Thanks. So you agree with me? Should I leave the order as is? I assume the 'audio' and 'video' values are the least common so the evaluation will usually finish before reaching them.
Yeah, just leave the order.  I don't think it matters for performance, but a lot of the code involved is on the chopping block anyway...  (and I think so should be the MOZ_MEDIA ifdefs).
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/a8520279a1dc
Keywords: checkin-needed
Whiteboard: [inbound]
https://hg.mozilla.org/mozilla-central/rev/a8520279a1dc
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
(Assignee)

Updated

5 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.