Closed Bug 1914948 Opened 6 months ago Closed 6 months ago

dom/security/trusted-types/moz.build missing chromium-config.mozbuild include

Categories

(Core :: DOM: Security, defect)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: mbrodesser-Igalia, Unassigned)

Details

A .cpp file (https://searchfox.org/mozilla-central/rev/3f193a8bb0759058c2f9a9d7761ad73bc6ffd4b1/dom/security/trusted-types/TrustedHTML.cpp) transitively includes (via https://searchfox.org/mozilla-central/rev/3f193a8bb0759058c2f9a9d7761ad73bc6ffd4b1/toolkit/components/sessionstore/SessionStoreRestoreData.h#10) an IDPL generated header (https://searchfox.org/mozilla-central/source/__GENERATED__/ipc/ipdl/_ipdlheaders/mozilla/dom/sessionstore/SessionStoreTypes.h).

That header isn't found when building with ./mach build:

 0:04.73 In file included from Unified_cpp_trusted-types0.cpp:2:
 0:04.73 In file included from /home/mirko/work/code/gecko/dom/security/trusted-types/TrustedHTML.cpp:7:
 0:04.73 In file included from /home/mirko/work/code/gecko/obj-ff-dbg/dist/include/mozilla/dom/TrustedHTML.h:10:
 0:04.74 In file included from /home/mirko/work/code/gecko/obj-ff-dbg/dist/include/mozilla/dom/TrustedTypeUtils.h:12:
 0:04.74 In file included from /home/mirko/work/code/gecko/obj-ff-dbg/dist/include/mozilla/dom/SessionStoreUtils.h:15:
 0:04.74 /home/mirko/work/code/gecko/obj-ff-dbg/dist/include/mozilla/dom/SessionStoreRestoreData.h:10:10: fatal error: 'mozilla/dom/sessionstore/SessionStoreTypes.h' file not found
 0:04.74    10 | #include "mozilla/dom/sessionstore/SessionStoreTypes.h"

Directories unfortunately need to opt-in to being able to see IPDL headers. The moz.build for the trusted-types directory (https://searchfox.org/mozilla-central/rev/3f193a8bb0759058c2f9a9d7761ad73bc6ffd4b1/dom/security/trusted-types/moz.build) unfortunately doesn't include the chromium-config.mozbuild file in it (e.g. https://searchfox.org/mozilla-central/rev/3f193a8bb0759058c2f9a9d7761ad73bc6ffd4b1/accessible/android/moz.build#35).

If you add that line to the moz.build, I believe the build will work.

Thanks, Nika! I didn't know that was a thing. This sounds like more of a problem with the trusted-types build directory, so I think it would be more appropriately moved there.

Component: General → Security
Product: Firefox Build System → Core
Summary: IPDL generated header not found when building → dom/security/trusted-types/moz.build missing chromium-config.mozbuild include
Component: Security → DOM: Security

(In reply to Nika Layzell [:nika] (ni? for response) from comment #1)

Directories unfortunately need to opt-in to being able to see IPDL headers. The moz.build for the trusted-types directory (https://searchfox.org/mozilla-central/rev/3f193a8bb0759058c2f9a9d7761ad73bc6ffd4b1/dom/security/trusted-types/moz.build) unfortunately doesn't include the chromium-config.mozbuild file in it (e.g. https://searchfox.org/mozilla-central/rev/3f193a8bb0759058c2f9a9d7761ad73bc6ffd4b1/accessible/android/moz.build#35).

If you add that line to the moz.build, I believe the build will work.

Thanks, it works and is actually included in the documentation (https://searchfox.org/mozilla-central/rev/490a1df802d8872f996f8ef4093d54e3c854c8f9/ipc/docs/ipdl.rst#208-213).

Closing this ticket as the include will be added in https://bugzilla.mozilla.org/show_bug.cgi?id=1914372.

Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.