Closed Bug 1183231 Opened 9 years ago Closed 9 years ago

Maintain a list of timeline-observed docshells outside of nsDocShell

Categories

(DevTools :: Performance Tools (Profiler/Timeline), defect)

defect
Not set
normal

Tracking

(firefox42 fixed)

RESOLVED FIXED
Firefox 42
Tracking Status
firefox42 --- fixed

People

(Reporter: vporof, Assigned: vporof)

References

Details

Attachments

(2 files, 1 obsolete file)

      No description provided.
Attached patch v1 (obsolete) — Splinter Review
Attachment #8634433 - Flags: review?(ttromey)
Next step is to move the markers storage outside of nsDocShell.
Assignee: nobody → vporof
Status: NEW → ASSIGNED
Attached patch v2Splinter Review
Argh forgot to qref again. Sorry about the spam.
Attachment #8634433 - Attachment is obsolete: true
Attachment #8634433 - Flags: review?(ttromey)
Attachment #8634453 - Flags: review?(ttromey)
Attachment #8634453 - Flags: review?(ttromey) → review?(bugs)
Comment on attachment 8634453 [details] [diff] [review]
v2

># HG changeset patch
># User Victor Porof <vporof@mozilla.com>
># Date 1437001680 14400
>#      Wed Jul 15 19:08:00 2015 -0400
># Node ID d3eac967f48e6d7918df1fe92318fe97c6e085b7
># Parent  aeea07206837241d81a487c739399d44d84ee24f
>Bug 1183231 - Maintain a list of timeline-observed docshells outside of nsDocShell, r=tromey
>
>diff --git a/docshell/base/moz.build b/docshell/base/moz.build
>--- a/docshell/base/moz.build
>+++ b/docshell/base/moz.build
>@@ -45,8 +45,9 @@ EXPORTS.mozilla += [
>     'IHistory.h',
>     'LoadContext.h',
>     'timeline/AutoGlobalTimelineMarker.h',
>     'timeline/AutoTimelineMarker.h',
>+    'timeline/ObservedDocShell.h',
>     'timeline/TimelineConsumers.h',
> ]
> 
> UNIFIED_SOURCES += [
>@@ -63,8 +64,9 @@ UNIFIED_SOURCES += [
>     'nsWebNavigationInfo.cpp',
>     'SerializedLoadContext.cpp',
>     'timeline/AutoGlobalTimelineMarker.cpp',
>     'timeline/AutoTimelineMarker.cpp',
>+    'timeline/ObservedDocShell.cpp',
>     'timeline/TimelineConsumers.cpp',
>     'timeline/TimelineMarker.cpp',
> ]
> 
again, this part will look a bit different.




>+#ifndef ObservedDocShell_h__
>+#define ObservedDocShell_h__


mozilla_ObservedDocShell_h_

>+TimelineConsumers::GetKnownDocShells(Vector<nsRefPtr<nsDocShell>>& aStore)
>+{
>+  const LinkedList<ObservedDocShell>& docShells = GetOrCreateObservedDocShellsList();
>+
>+  for (const ObservedDocShell* rds = docShells.getFirst();
>+       rds != nullptr;
>+       rds = rds->getNext()) {
what does rds mean? especially 'r'. I think ds == docshell

>+    if (!aStore.append(**rds)) {
>+      return false;
>+    }
>+  }
>+
>+  return true;
>+}
We should be using nsTArray, but since the old code is using Vector too, fine.


>   // Counter for how many timelines are currently interested in markers.
>   static unsigned long activeConsumers;
>+  static LinkedList<ObservedDocShell>* observedDocShells;
sObserverDocShells;

>+  static LinkedList<ObservedDocShell>& GetOrCreateObservedDocShellsList();
> 
> public:
>-  static void AddConsumer();
>-  static void RemoveConsumer();
>+  static void AddConsumer(nsDocShell* aDocShell,
>+                          UniquePtr<ObservedDocShell>& aRDSPtr);
>+  static void RemoveConsumer(nsDocShell* aDocShell,
>+                             UniquePtr<ObservedDocShell>& aRDSPtr);
What is RDSPtr? DocShellPtr, but R?
Perhaps some better argument name here?
Attachment #8634453 - Flags: review?(bugs) → review+
Attached patch v3Splinter Review
Addressed comments.
Attachment #8635477 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/e9c3cbdce3d5
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
This was backed out in: https://hg.mozilla.org/integration/fx-team/rev/fdff9c45b9c9
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
https://hg.mozilla.org/mozilla-central/rev/004613652369
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: