GeckoProfiler.h:119:15: error: unknown type name 'JSObject' (non-SPS)

RESOLVED FIXED in mozilla26

Status

()

Core
Gecko Profiler
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Jan Beich, Assigned: Jan Beich)

Tracking

Trunk
mozilla26
All
FreeBSD
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
On platforms without SPS profiler the build is broken due to
GeckoProfiler.h not declaring class JSObject (unlike GeckoProfilerFunc.h).

In file included from xpcom/base/nsMemoryReporterManager.cpp:23:
In file included from dist/include/mozilla/Telemetry.h:11:
In file included from dist/include/mozilla/StartupTimeline.h:26:
dist/include/GeckoProfiler.h:119:15: error: unknown type name 'JSObject'
static inline JSObject* profiler_get_profile_jsobject(JSContext* aCx) { retu...
              ^
dist/include/GeckoProfiler.h:119:55: error: unknown type name 'JSContext'
static inline JSObject* profiler_get_profile_jsobject(JSContext* aCx) { retu...
                                                      ^
2 errors generated.
(Assignee)

Comment 1

5 years ago
Created attachment 794306 [details] [diff] [review]
declare early
Attachment #794306 - Flags: review?(n.nethercote)
Comment on attachment 794306 [details] [diff] [review]
declare early

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

Thanks!
Attachment #794306 - Flags: review?(n.nethercote) → review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
(Assignee)

Comment 3

5 years ago
Comment on attachment 794306 [details] [diff] [review]
declare early

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

::: tools/profiler/GeckoProfilerFunc.h
@@ -13,5 @@
>  using mozilla::TimeStamp;
>  using mozilla::TimeDuration;
>  
> -struct JSContext;
> -class JSObject;

Oops, removing them would break SPS profiler implementation
where build would stop somewhere in tools/profiler/.
(Assignee)

Comment 4

5 years ago
Created attachment 794338 [details] [diff] [review]
declare for non-sps, v2
Attachment #794306 - Attachment is obsolete: true
Attachment #794338 - Flags: review?(n.nethercote)
Attachment #794338 - Flags: review?(n.nethercote) → review+
https://hg.mozilla.org/mozilla-central/rev/1ae8a6bb3def
Assignee: nobody → jbeich
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.