DOMEventTargetHelper.h:201:30: error: 'onstart' is not a member of 'nsGkAtoms' [...] MediaRecorder.h:87:3: note: in expansion of macro 'IMPL_EVENT_HANDLER'

RESOLVED FIXED in mozilla33

Status

()

Core
Audio/Video: Recording
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

Trunk
mozilla33
x86_64
Linux
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

STR:
 1. Try to build with this in your .mozconfig:

ac_add_options --disable-webspeech

ACTUAL RESULTS:
Build error. Text below:
{
                 from ../../dist/include/mozilla/dom/MediaStreamAudioSourceNode.h:10,
                 from ../../dist/include/mozilla/dom/MediaElementAudioSourceNode.h:10,
                 from $OBJDIR/dom/bindings/MediaElementAudioSourceNodeBinding.cpp:8,
                 from $OBJDIR/dom/bindings/UnifiedBindings16.cpp:2:
../../dist/include/MediaRecorder.h: In member function 'mozilla::dom::EventHandlerNonNull* mozilla::dom::MediaRecorder::GetOnstart()':
../../dist/include/mozilla/DOMEventTargetHelper.h:201:30: error: 'onstart' is not a member of 'nsGkAtoms'
       return GetEventHandler(nsGkAtoms::on##_event, EmptyString());       \
                              ^
../../dist/include/MediaRecorder.h:87:3: note: in expansion of macro 'IMPL_EVENT_HANDLER'
   IMPL_EVENT_HANDLER(start)
   ^
../../dist/include/MediaRecorder.h: In member function 'void mozilla::dom::MediaRecorder::SetOnstart(mozilla::dom::EventHandlerNonNull*)':
../../dist/include/mozilla/DOMEventTargetHelper.h:208:23: error: 'onstart' is not a member of 'nsGkAtoms'
       SetEventHandler(nsGkAtoms::on##_event, EmptyString(), aCallback);   \
                       ^
../../dist/include/MediaRecorder.h:87:3: note: in expansion of macro 'IMPL_EVENT_HANDLER'
   IMPL_EVENT_HANDLER(start)
   ^
}

This is happening when we try to honor the "IMPL_EVENT_HANDLER(start)" line quoted above, which was added in http://hg.mozilla.org/mozilla-central/rev/3110f58de690 for bug 951008.

The build fails because "onstart" is declared in an #ifdef MOZ_WEBSPEECH chunk at the bottom of nsGkAtomList.h.

We probably just need to move that nsGkAtomList line up out of that #ifdef section.
Created attachment 8449619 [details] [diff] [review]
fix

This moves the GK_ATOM line for onstart up to a non-#ifdeffed section, next to the lines for "onstop", "onwarning", and "ondataavailable" (which are also used by this same code in MediaRecorder.h: http://hg.mozilla.org/mozilla-central/rev/3110f58de690#l2.9 )
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #8449619 - Flags: review?(khuey)
Comment on attachment 8449619 [details] [diff] [review]
fix

Review of attachment 8449619 [details] [diff] [review]:
-----------------------------------------------------------------

I really wish this file were sorted alphabetically.
Attachment #8449619 - Flags: review?(khuey) → review+
Yeah, me too. Some pieces of it are. Not sure why this piece isn't.
https://hg.mozilla.org/integration/mozilla-inbound/rev/37ba89421ee6
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/37ba89421ee6
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.