toolkit/components/telemetry/Telemetry.cpp:284:25: error: invalid use of incomplete type 'class mozilla::HangMonitor::HangAnnotations' (non-SPS)

RESOLVED FIXED in mozilla36

Status

()

Toolkit
Telemetry
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Jan Beich, Assigned: Jan Beich)

Tracking

Trunk
mozilla36
All
FreeBSD
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
On platforms lacking SPS profiler (Linux/PPC, BSDs, Solaris) the build is broken because HangMonitor usage (except header) is outside MOZ_ENABLE_PROFILER_SPS ifdef.

toolkit/components/telemetry/Telemetry.cpp:284:25: error:
      member access into incomplete type 'mozilla::HangMonitor::HangAnnotations'
    n += i->mAnnotations->SizeOfIncludingThis(aMallocSizeOf);
                        ^
toolkit/components/telemetry/Telemetry.h:21:9: note:
      forward declaration of 'mozilla::HangMonitor::HangAnnotations'
  class HangAnnotations;
        ^
toolkit/components/telemetry/Telemetry.cpp:1908:17: error:
      incomplete type 'mozilla::HangMonitor::HangAnnotations' named in nested name
      specifier
      nsAutoPtr<HangAnnotations::Enumerator> annotationsEnum;
                ^~~~~~~~~~~~~~~~~
toolkit/components/telemetry/Telemetry.h:21:9: note:
      forward declaration of 'mozilla::HangMonitor::HangAnnotations'
  class HangAnnotations;
        ^
toolkit/components/telemetry/Telemetry.cpp:1909:28: error:
      member access into incomplete type 'mozilla::HangMonitor::HangAnnotations'
      if (!ai->mAnnotations->GetEnumerator(annotationsEnum.StartAssignment())) {
                           ^
toolkit/components/telemetry/Telemetry.h:21:9: note:
      forward declaration of 'mozilla::HangMonitor::HangAnnotations'
  class HangAnnotations;
        ^
toolkit/components/telemetry/Telemetry.cpp:1914:14: error:
      use of undeclared identifier 'annotationsEnum'; did you mean 'annotationInfo'?
      while (annotationsEnum->Next(key, value)) {
             ^~~~~~~~~~~~~~~
             annotationInfo
toolkit/components/telemetry/Telemetry.cpp:1887:53: note:
      'annotationInfo' declared here
    const std::vector<HangReports::AnnotationInfo>& annotationInfo =
                                                    ^
toolkit/components/telemetry/Telemetry.cpp:1914:29: error:
      member reference type 'const std::vector<HangReports::AnnotationInfo>' is not
      a pointer; maybe you meant to use '.'?
      while (annotationsEnum->Next(key, value)) {
             ~~~~~~~~~~~~~~~^~
                            .
toolkit/components/telemetry/Telemetry.cpp:1914:31: error:
      no member named 'Next' in 'std::__1::vector<(anonymous
      namespace)::HangReports::AnnotationInfo, std::__1::allocator<(anonymous
      namespace)::HangReports::AnnotationInfo> >'
      while (annotationsEnum->Next(key, value)) {
             ~~~~~~~~~~~~~~~  ^
In file included from toolkit/components/telemetry/Telemetry.cpp:22:
In file included from xpcom/threads/nsThreadManager.h:12:
In file included from ../../../dist/include/nsRefPtrHashtable.h:11:
In file included from ../../../dist/include/nsHashKeys.h:13:
../../../dist/include/nsAutoPtr.h:74:5: warning: deleting pointer to incomplete type
      'mozilla::HangMonitor::HangAnnotations' may cause undefined behavior
      [-Wdelete-incomplete]
    delete mRawPtr;
    ^      ~~~~~~~
toolkit/components/telemetry/Telemetry.cpp:218:5: note:
      in instantiation of member function
      'nsAutoPtr<mozilla::HangMonitor::HangAnnotations>::~nsAutoPtr' requested here
    AnnotationInfo(uint32_t aHangIndex,
    ^
toolkit/components/telemetry/Telemetry.h:21:9: note:
      forward declaration of 'mozilla::HangMonitor::HangAnnotations'
  class HangAnnotations;
        ^
1 warning and 6 errors generated.

http://mozillaproject.osuosl.org:8010/builders/runtests/builds/2251/steps/shell/logs/stdio
Summary: toolkit/components/telemetry/Telemetry.cpp:284:25: error: invalid use of incompl ete type 'class mozilla::HangMonitor::HangAnnotations' (non-SPS) → toolkit/components/telemetry/Telemetry.cpp:284:25: error: invalid use of incomplete type 'class mozilla::HangMonitor::HangAnnotations' (non-SPS)
Flags: needinfo?(aklotz)

Updated

4 years ago
Attachment #8509549 - Flags: review?(aklotz) → review+
Thanks for filing this!
Flags: needinfo?(aklotz)
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/6c88e0395420
Assignee: nobody → jbeich
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6c88e0395420
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.