Closed
Bug 1347823
Opened 8 years ago
Closed 8 years ago
Label HistoryTracker in docshell/
Categories
(Core :: DOM: Navigation, defect, P2)
Core
DOM: Navigation
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: bevis, Assigned: freesamael)
References
(Depends on 1 open bug)
Details
(Whiteboard: [QDL][TDC-MVP][DOM])
Attachments
(3 files)
This is a follow-up of the finding in bug 1339707 comment 10 to have the use of nsExpirationTracker in docshell/ being labeled.
Updated•8 years ago
|
Priority: -- → P2
Updated•8 years ago
|
Whiteboard: [QDL][TDC-MVP][DOM]
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → sawang
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8862761 [details]
Bug 1347823 - Part 1: Reorder includes and data members.
https://reviewboard.mozilla.org/r/134632/#review137618
Just random thought, is there some tool to detect when member variables are ordered in a bit silly way?
Attachment #8862761 -
Flags: review?(bugs) → review+
Comment 5•8 years ago
|
||
mozreview-review |
Comment on attachment 8862762 [details]
Bug 1347823 - Part 2: Move HistoryTracker to nsSHistory and bind its event target to the TabGroup.
https://reviewboard.mozilla.org/r/134634/#review137620
I think this could be simplified a bit without UniquePtr usage.
Or explain why it is needed.
::: docshell/shistory/nsSHistory.h:63
(Diff revision 1)
> + shistory->EvictExpiredContentViewerForEntry(aObj);
> + }
> + }
> +
> + private:
> + nsWeakPtr mSHistory;
Why nsWeakPtr? SHistory object itself controls the lifetime of HistoryTracker, so using raw pointer here should be fine.
::: docshell/shistory/nsSHistory.h:122
(Diff revision 1)
> // If aKeepNext is true, aIndex is compared to aIndex + 1,
> // otherwise comparison is done to aIndex - 1.
> bool RemoveDuplicate(int32_t aIndex, bool aKeepNext);
>
> + // Track all bfcache entries and evict on expiration.
> + mozilla::UniquePtr<HistoryTracker> mHistoryTracker;
Why this needs to be UniquePtr? Why not just HistoryTracker mHistoryTracker?
Attachment #8862762 -
Flags: review?(bugs) → review-
Comment 6•8 years ago
|
||
mozreview-review |
Comment on attachment 8862763 [details]
Bug 1347823 - Part 3: Add a test case.
https://reviewboard.mozilla.org/r/134636/#review137622
Attachment #8862763 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 7•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8862762 [details]
Bug 1347823 - Part 2: Move HistoryTracker to nsSHistory and bind its event target to the TabGroup.
https://reviewboard.mozilla.org/r/134634/#review137620
> Why this needs to be UniquePtr? Why not just HistoryTracker mHistoryTracker?
mHistoryTracker has to be lazy-init on nsSHistory::SetRootDocShell, otherwise there's no suitable nsIEventTarget I can pass to the constructor of nsExpirationTracker.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 10•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8862762 [details]
Bug 1347823 - Part 2: Move HistoryTracker to nsSHistory and bind its event target to the TabGroup.
https://reviewboard.mozilla.org/r/134634/#review137620
> mHistoryTracker has to be lazy-init on nsSHistory::SetRootDocShell, otherwise there's no suitable nsIEventTarget I can pass to the constructor of nsExpirationTracker.
I'm dropping this issue as explained above. Let me know if you still have concerns.
Comment 11•8 years ago
|
||
mozreview-review |
Comment on attachment 8862762 [details]
Bug 1347823 - Part 2: Move HistoryTracker to nsSHistory and bind its event target to the TabGroup.
https://reviewboard.mozilla.org/r/134634/#review138370
::: docshell/shistory/nsSHistory.h:59
(Diff revision 2)
> + RemoveObject(aObj);
> + mSHistory->EvictExpiredContentViewerForEntry(aObj);
> + }
> +
> + private:
> + nsSHistory* mSHistory;
Add a comment that nsSHistory owns HistoryTracker, so it always outlives HistoryTracker object.
Attachment #8862762 -
Flags: review?(bugs) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 14•8 years ago
|
||
Keywords: checkin-needed
Comment 15•8 years ago
|
||
seems there is a open issue for part 2 that need to be fixed first.
Flags: needinfo?(sawang)
Assignee | ||
Comment 16•8 years ago
|
||
(In reply to Carsten Book [:Tomcat] from comment #15)
> seems there is a open issue for part 2 that need to be fixed first.
Sorry I forgot to mark it fixed. It's fixed in revision 3.
Flags: needinfo?(sawang)
Comment 17•8 years ago
|
||
np, landed!
Comment 18•8 years ago
|
||
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d2fbb471ba83
Part 1: Reorder includes and data members. r=smaug
https://hg.mozilla.org/integration/autoland/rev/f8bebf994dbf
Part 2: Move HistoryTracker to nsSHistory and bind its event target to the TabGroup. r=smaug
https://hg.mozilla.org/integration/autoland/rev/05a2a58f887e
Part 3: Add a test case. r=smaug
Keywords: checkin-needed
Comment 19•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d2fbb471ba83
https://hg.mozilla.org/mozilla-central/rev/f8bebf994dbf
https://hg.mozilla.org/mozilla-central/rev/05a2a58f887e
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•