mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:18:48 +00:00
import changes from `dev' branch of rmottola/Arctic-Fox:
- remaining part of Bug 1146339 - Do anchor scrolling right before dispatching popstate (1123b0133) - Bug 1170488 - Document URI should be updated before sending out onLocationChange. r=smaug (6f553c2ee) - Bug 1144820 - Use nsTArray<UniquePtr<>> to hold timeline markers. r=smaug, r=fitzgen (e4b878ec3) - Bug 1143004 - markers from console.timeStamp() should be rendered in the performance tool's timeline. r=vp (7d8d4cb0c) - Bug 1170671 - ProfileTimelineMarkers that use TRACING_TIMESTAMP should capture stack information. r=smaug (dc7982a30) - Bug 1141614 - Part 1: Maintain a list of docshells whose timeline markers are being observed; r=smaug (2dc04461c) - Bug 1159779 - mozilla::AutoTimelineMarker shouldn't be copy-able; r=smaug (24aadecd4) - Bug 1141614 - Part 2: Add mozilla::AutoGlobalTimelineMarker; r=smaug (c069191a5) - Bug 1141614 - Part 3: Trace cycle collection with AutoGlobalTimelineMarker; r=smaug (2cdccd0fc) - Bug 1160521 - The markers list sidebar should be wider by default, r=jsantell (c479c72c3) - Bug 1150696 - Move all timeline tests that are still relevent into the performance tools tests. r=vp (276572541) - Bug 1165504 - Refactor out marker details view into utilities, make marker definitions more declaritive. r=vp (42218191c) - Bug 1166139 - properly display the generic class name for markers in the marker filter popup. r=vp (711b0032a) - Bug 1157916 - Add tooltip for displaying start/end times on marker details' duration field. r=vp (c586757d5)
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozilla/dom/ProfileTimelineMarkerBinding.h"
|
||||
#include "mozilla/LinkedList.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
// Helper Classes
|
||||
@@ -269,6 +270,43 @@ public:
|
||||
// timeline markers
|
||||
static unsigned long gProfileTimelineRecordingsCount;
|
||||
|
||||
class ObservedDocShell : public mozilla::LinkedListElement<ObservedDocShell>
|
||||
{
|
||||
public:
|
||||
explicit ObservedDocShell(nsDocShell* aDocShell)
|
||||
: mDocShell(aDocShell)
|
||||
{ }
|
||||
|
||||
nsDocShell* operator*() const { return mDocShell.get(); }
|
||||
|
||||
private:
|
||||
nsRefPtr<nsDocShell> mDocShell;
|
||||
};
|
||||
|
||||
private:
|
||||
static mozilla::LinkedList<ObservedDocShell>* gObservedDocShells;
|
||||
|
||||
static mozilla::LinkedList<ObservedDocShell>& GetOrCreateObservedDocShells()
|
||||
{
|
||||
if (!gObservedDocShells) {
|
||||
gObservedDocShells = new mozilla::LinkedList<ObservedDocShell>();
|
||||
}
|
||||
return *gObservedDocShells;
|
||||
}
|
||||
|
||||
// Never null if timeline markers are being observed.
|
||||
mozilla::UniquePtr<ObservedDocShell> mObserved;
|
||||
|
||||
// Return true if timeline markers are being observed for this docshell. False
|
||||
// otherwise.
|
||||
bool IsObserved() const { return !!mObserved; }
|
||||
|
||||
public:
|
||||
static const mozilla::LinkedList<ObservedDocShell>& GetObservedDocShells()
|
||||
{
|
||||
return GetOrCreateObservedDocShells();
|
||||
}
|
||||
|
||||
// Tell the favicon service that aNewURI has the same favicon as aOldURI.
|
||||
static void CopyFavicon(nsIURI* aOldURI,
|
||||
nsIURI* aNewURI,
|
||||
@@ -982,10 +1020,7 @@ private:
|
||||
// has been called without a matching NotifyRunToCompletionStop.
|
||||
uint32_t mJSRunToCompletionDepth;
|
||||
|
||||
// True if recording profiles.
|
||||
bool mProfileTimelineRecording;
|
||||
|
||||
nsTArray<TimelineMarker*> mProfileTimelineMarkers;
|
||||
nsTArray<mozilla::UniquePtr<TimelineMarker>> mProfileTimelineMarkers;
|
||||
|
||||
// Get rid of all the timeline markers accumulated so far
|
||||
void ClearProfileTimelineMarkers();
|
||||
|
||||
Reference in New Issue
Block a user