Closed Bug 904264 Opened 12 years ago Closed 12 years ago

Don't #include js/MemoryMetrics.h in xpcpublic.h

Categories

(Core :: XPConnect, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
Attached patch Patch (v1)Splinter Review
Attachment #789217 - Flags: review?(bobbyholley+bmo)
Comment on attachment 789217 [details] [diff] [review] Patch (v1) Review of attachment 789217 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/base/nsWindowMemoryReporter.cpp @@ +13,5 @@ > #include "mozilla/Preferences.h" > #include "nsNetCID.h" > #include "nsPrintfCString.h" > #include "XPCJSMemoryReporter.h" > +#include "js/MemoryMetrics.h" What's this needed for? I looked through the files and couldn't see what causes the dependency.
(In reply to comment #2) > Comment on attachment 789217 [details] [diff] [review] > --> https://bugzilla.mozilla.org/attachment.cgi?id=789217 > Patch (v1) > > Review of attachment 789217 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/base/nsWindowMemoryReporter.cpp > @@ +13,5 @@ > > #include "mozilla/Preferences.h" > > #include "nsNetCID.h" > > #include "nsPrintfCString.h" > > #include "XPCJSMemoryReporter.h" > > +#include "js/MemoryMetrics.h" > > What's this needed for? I looked through the files and couldn't see what > causes the dependency. There's a call to MemoryReportingSundriesThreshold further down in this file.
Comment on attachment 789217 [details] [diff] [review] Patch (v1) Review of attachment 789217 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/xpconnect/src/xpcpublic.h @@ +71,5 @@ > +namespace JS { > + > +struct RuntimeStats; > + > +} just doing struct JS::RuntimeStats might be nicer.
Attachment #789217 - Flags: review?(bobbyholley+bmo) → review+
> There's a call to MemoryReportingSundriesThreshold further down in this file. We should move that into mfbt/MemoryReporting.h. Alternatively, we could just define FRAME_SUNDRIES_THRESHOLD directly within nsWindowMemoryReporter.cpp. There's no terribly compelling reason for the JS engine's threshold to be the same as this one, IMO.
(In reply to Bobby Holley (:bholley) from comment #4) > Comment on attachment 789217 [details] [diff] [review] > Patch (v1) > > Review of attachment 789217 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: js/xpconnect/src/xpcpublic.h > @@ +71,5 @@ > > +namespace JS { > > + > > +struct RuntimeStats; > > + > > +} > > just doing struct JS::RuntimeStats might be nicer. I'd be surprised if that was supported everywhere.
(In reply to :Ms2ger from comment #6) > (In reply to Bobby Holley (:bholley) from comment #4) > > Comment on attachment 789217 [details] [diff] [review] > > Patch (v1) > > > > Review of attachment 789217 [details] [diff] [review]: > > ----------------------------------------------------------------- > > > > ::: js/xpconnect/src/xpcpublic.h > > @@ +71,5 @@ > > > +namespace JS { > > > + > > > +struct RuntimeStats; > > > + > > > +} > > > > just doing struct JS::RuntimeStats might be nicer. > > I'd be surprised if that was supported everywhere. Yeah, that's not really C++. ;-)
(In reply to Nicholas Nethercote [:njn] from comment #5) > > There's a call to MemoryReportingSundriesThreshold further down in this file. > > We should move that into mfbt/MemoryReporting.h. Alternatively, we could > just define FRAME_SUNDRIES_THRESHOLD directly within > nsWindowMemoryReporter.cpp. There's no terribly compelling reason for the > JS engine's threshold to be the same as this one, IMO. Can you please file a bug about that? I know zero things about what I'm doing in this code. ;-)_
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: