Closed Bug 1854731 Opened 2 years ago Closed 2 years ago

Missing include in GleanPingsBinding.cpp

Categories

(Toolkit :: Telemetry, defect, P1)

defect

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox118 --- unaffected
firefox119 --- wontfix
firefox120 --- fixed

People

(Reporter: fabrice, Assigned: chutten)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

If looks like nsGlobalWindowInner.h needs to be included in bindings that use IsGleanNeeded() to prevent some unified build failures such as:

0:11.19 In file included from UnifiedBindings9.cpp:2:                                                                                           
 0:11.19 /home/capyloon/dev/capyloon/gecko-dev/obj-b2g-darwin-aarch64/dom/bindings/GleanPingsBinding.cpp:154:10: error: incomplete type 'nsGlobal
WindowInner' named in nested name specifier                                                                                                      
 0:11.20   return nsGlobalWindowInner::IsGleanNeeded(aCx, aObj);                                                                                 
 0:11.20          ^~~~~~~~~~~~~~~~~~~~~                                                                                                          
 0:11.20 /home/capyloon/dev/capyloon/gecko-dev/obj-b2g-darwin-aarch64/dist/include/mozilla/OriginTrials.h:15:7: note: forward declaration of 'nsG
lobalWindowInner'                                                                                                                                
 0:11.20 class nsGlobalWindowInner;                                                                                                              
 0:11.20       ^                                                                                                                                 
 0:11.20 1 error generated.

This patch fixed it for me but I have doubts this is the right way to do it:

diff --git a/toolkit/components/glean/bindings/GleanPings.h b/toolkit/components/glean/bindings/GleanPings.h
index 2dd1ff4b83c3..b4a88bfc6496 100644
--- a/toolkit/components/glean/bindings/GleanPings.h
+++ b/toolkit/components/glean/bindings/GleanPings.h
@@ -9,6 +9,7 @@
 
 #include "mozilla/dom/BindingDeclarations.h"
 #include "mozilla/glean/bindings/Ping.h"
+#include "nsGlobalWindowInner.h"
 #include "nsISupports.h"
 #include "nsWrapperCache.h"
 
``

GleanPingsImpl uses a custom header (see https://searchfox.org/mozilla-central/source/dom/bindings/Bindings.conf#1563-1566), so it's responsible for making sure that that header either forward declares things or includes the necessary other headers for everything to compile.

Component: DOM: Bindings (WebIDL) → Telemetry
Keywords: regression
Product: Core → Toolkit
Regressed by: 1848708

Set release status flags based on info from the regressing bug 1848708

:chutten, since you are the author of the regressor, bug 1848708, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Assignee: nobody → chutten
Status: NEW → ASSIGNED
Severity: -- → S4
Flags: needinfo?(chutten)
Priority: -- → P1
Pushed by chutten@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1a604fd0efdd Add needed include to GleanPings header r=perry.mcmanis DONTBUILD
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch

The patch landed in nightly and beta is affected.
:chutten, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox119 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(chutten)

I don't know what effect this bug has on Beta, so I'll ask :fabrice to help me answer whether it deserves uplift.

Flags: needinfo?(chutten) → needinfo?(fabrice)

Hi Chris, I have no opinion about beta. I hit that issue doing a tip-of-tree build. So I would say if no build is broken, there is no need to uplift. On the other hand, it's a very innocuous patch...

Flags: needinfo?(fabrice)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: