Closed
Bug 1339707
Opened 8 years ago
Closed 8 years ago
Label runnables in docshell/
Categories
(Core :: DOM: Navigation, defect)
Core
DOM: Navigation
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: hsinyi, Assigned: freesamael)
References
Details
(Whiteboard: [QDL][TDC-MVP][DOM])
Attachments
(1 file, 3 obsolete files)
14.67 KB,
patch
|
freesamael
:
review+
|
Details | Diff | Splinter Review |
This bug is to track and review how to apply labeling APIs (https://wiki.mozilla.org/Quantum/DOM) to docshell/.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → sawang
Assignee | ||
Comment 1•8 years ago
|
||
Assignee | ||
Comment 2•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8840821 -
Attachment description: Replace NS_DispatchToCurrentThread to DocGroup / TabGroup dispatch method → v0
Attachment #8840821 -
Attachment is obsolete: true
Assignee | ||
Comment 3•8 years ago
|
||
Comment on attachment 8841441 [details] [diff] [review]
v1
Hi Olli,
I'm trying to replace runnable dispatching under docshell/ dir with TabGroup / DocGroup implmentation. Could you take a look?
Attachment #8841441 -
Flags: review?(bugs)
Updated•8 years ago
|
Attachment #8841441 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 4•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8841441 -
Attachment description: Replace NS_DispatchToCurrentThread to DocGroup / TabGroup dispatch method → v1
Attachment #8841441 -
Attachment is obsolete: true
Assignee | ||
Comment 5•8 years ago
|
||
Comment on attachment 8843909 [details] [diff] [review]
v2
Bevis reminded me that I should also update the nsITimer usages. The patch is updated accordingly.
I associated the tooltip & ping timer to the document, while refresh timer to tabgroup. Could you take another review for that?
BTW I'm noticing that we almost always use a native pointer to hold the return value of nsINode::OwnerDoc(). Is there a reason to prefer native pointer over nsCOMPtr in this case? I wonder when I should use a native pointer for similar cases.
Attachment #8843909 -
Flags: review?(bugs)
Comment 6•8 years ago
|
||
Native pointer? Do you have link to some code?
My guess is that you mean raw pointer? If there isn't need for nsCOMPtr, using raw pointer is faster, no extra Addref/Release. But if one isn't sure whether some JS could run while using the variable, then use nsCOMPtr for safety.
Comment 7•8 years ago
|
||
Comment on attachment 8843909 [details] [diff] [review]
v2
>+nsDocShell::DispatchToTabGroup(const char* aName,
>+ TaskCategory aCategory,
>+ already_AddRefed<nsIRunnable>&& aRunnable)
>+{
>+ // Hold the ref so we won't forget to release it.
>+ nsCOMPtr<nsIRunnable> runnable(aRunnable);
>+ nsCOMPtr<nsPIDOMWindowOuter> win = GetWindow();
>+ if (!win) {
>+ // Window should only be unavailable after destroyed.
>+ MOZ_ASSERT(mIsBeingDestroyed);
>+ return NS_ERROR_FAILURE;
>+ }
This is tiny bit scary to not run some runnables, but I guess it in practice should be fine.
> nsSHEntryShared::RemoveFromBFCacheAsync()
> {
> NS_ASSERTION(mContentViewer && mDocument, "we're not in the bfcache!");
>
> // Release the reference to the contentviewer asynchronously so that the
> // document doesn't get nuked mid-mutation.
>
>+ if (!mDocument) {
>+ return NS_ERROR_UNEXPECTED;
>+ }
ok, this is ok, but could you change the NS_ASSERTION to MOZ_ASSERT
Attachment #8843909 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 8•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8843909 -
Attachment description: Replace NS_DispatchToCurrentThread to DocGroup / TabGroup dispatch method and set nsITimer target → v2
Attachment #8843909 -
Attachment is obsolete: true
Assignee | ||
Updated•8 years ago
|
Attachment #8844371 -
Flags: review+
Assignee | ||
Comment 9•8 years ago
|
||
Comment 10•8 years ago
|
||
Just realized that there is one more timer use implicitly in docshell:
http://searchfox.org/mozilla-central/source/docshell/shistory/nsSHEntryShared.cpp#36
which depends on the support of bug 1345464 that I just filed. :-|
Depends on: 1345464
Comment 11•8 years ago
|
||
(In reply to Bevis Tseng[:bevistseng][:btseng] from comment #10)
> Just realized that there is one more timer use implicitly in docshell:
> http://searchfox.org/mozilla-central/source/docshell/shistory/
> nsSHEntryShared.cpp#36
> which depends on the support of bug 1345464 that I just filed. :-|
we could have a followup bug depends on bug 1345464 to address this if the labeling of HistoryTracker is really required after further review.
Assignee | ||
Comment 12•8 years ago
|
||
(In reply to Bevis Tseng[:bevistseng][:btseng] from comment #10)
> Just realized that there is one more timer use implicitly in docshell:
> http://searchfox.org/mozilla-central/source/docshell/shistory/
> nsSHEntryShared.cpp#36
> which depends on the support of bug 1345464 that I just filed. :-|
Cool I didn't notice that. Thx.
Assignee | ||
Comment 13•8 years ago
|
||
Assignee | ||
Comment 14•8 years ago
|
||
I think the try result looks generally ok.
Keywords: checkin-needed
Comment 15•8 years ago
|
||
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1622f3e9dd54
Replace NS_DispatchToCurrentThread to DocGroup / TabGroup dispatch method and set nsITimer target. r=smaug
Keywords: checkin-needed
Comment 16•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Reporter | ||
Updated•8 years ago
|
Whiteboard: [QDL][TDC-MVP][DOM]
You need to log in
before you can comment on or make changes to this bug.
Description
•