Closed Bug 1836127 Opened 1 year ago Closed 1 year ago

Nullable union used as callback arguments needs to be actually declared

Categories

(Core :: DOM: Bindings (WebIDL), defect)

defect

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: edgar, Assigned: edgar)

References

Details

Attachments

(1 file)

(this bug is split off from bug 1556358)

We would like to use a nullable union for formStateRestoreCallback in bug 1556358 and got following error:

2:34.98 /home/edgar/.mozbuild/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7/../../../../include/c++/7/type_traits:1448:10: error: incomplete type 'mozilla::dom::FileOrUSVStringOrFormData' used in type trait expression
2:34.98 __has_trivial_destructor(_Tp)>>
2:34.98 ^
2:34.98 /home/edgar/.mozbuild/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7/../../../../include/c++/7/type_traits:3018:5: note: in instantiation of template class 'std::is_trivially_destructiblemozilla::dom::FileOrUSVStringOrFormData' requested here
2:34.98 is_trivially_destructible<_Tp>::value;
2:34.98 ^
2:34.98 /home/edgar/Workspace/mercurial/mozilla-central/objdir-debug/dist/include/mozilla/MaybeStorageBase.h:20:10: note: in instantiation of variable template specialization 'std::is_trivially_destructible_vmozilla::dom::FileOrUSVStringOrFormData' requested here
2:34.98 std::is_trivially_destructible_v<T> &&
2:34.98 ^
2:34.98 /home/edgar/Workspace/mercurial/mozilla-central/objdir-debug/dist/include/mozilla/Maybe.h:239:27: note: in instantiation of variable template specialization 'mozilla::detail::IsTriviallyDestructibleAndCopyablemozilla::dom::FileOrUSVStringOrFormData' requested here
2:34.98 IsTriviallyDestructibleAndCopyable<T>>
2:34.98 ^
2:34.98 /home/edgar/Workspace/mercurial/mozilla-central/objdir-debug/dist/include/mozilla/Maybe.h:350:23: note: in instantiation of default argument for 'MaybeStoragemozilla::dom::FileOrUSVStringOrFormData' required here
2:34.98 : private detail::MaybeStorage<T>,
2:34.99 ^~~~~~~~~~~~~~~
2:34.99 /home/edgar/Workspace/mercurial/mozilla-central/objdir-debug/dist/include/mozilla/dom/Nullable.h:25:12: note: in instantiation of template class 'mozilla::Maybemozilla::dom::FileOrUSVStringOrFormData' requested here
2:34.99 Maybe<T> mValue;
2:34.99 ^
2:34.99 /home/edgar/Workspace/mercurial/mozilla-central/objdir-debug/dist/include/mozilla/dom/CustomElementRegistryBinding.h:1481:17: note: in instantiation of template class 'mozilla::dom::Nullablemozilla::dom::FileOrUSVStringOrFormData' requested here
2:34.99 return Call(s.GetCallContext(), thisValJS, state, reason, aRv);

Assignee: nobody → echen
Status: NEW → ASSIGNED
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/783bd8e8246e Nullable union used as callback arguments needs to be actually declared; r=peterv
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: