Closed
Bug 725867
Opened 13 years ago
Closed 13 years ago
Optimize anon content in BBP
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: smaug, Assigned: smaug)
References
Details
Attachments
(2 files)
1.61 KB,
patch
|
jst
:
review+
mccr8
:
feedback+
|
Details | Diff | Splinter Review |
2.20 KB,
patch
|
Details | Diff | Splinter Review |
No description provided.
Updated•13 years ago
|
Assignee | ||
Comment 1•13 years ago
|
||
Comment on attachment 595898 [details] [diff] [review]
wip
This is still reasonable conservative, but helps with XUL based chrome UI
which has plenty of elements in anonymous content.
I'd like to find better way to ensure that anonymous elements in a document
are certainly alive, but haven't found that yet.
(document keeps non-anonymous elements alive)
Attachment #595898 -
Flags: review?(jst)
Attachment #595898 -
Flags: feedback?(continuation)
Comment 2•13 years ago
|
||
Comment on attachment 595898 [details] [diff] [review]
wip
Review of attachment 595898 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/base/src/nsGenericElement.cpp
@@ +4537,4 @@
> nsIDocument* currentDoc = aNode->GetCurrentDoc();
> if (currentDoc &&
> + nsCCUncollectableMarker::InGeneration(currentDoc->GetMarkedCCGeneration()) &&
> + // If aNode is not optimizable, but it is still an element
"but it is still" should probably be "but is"
@@ +4542,5 @@
> + // we can act as if it was optimizable. When the primary frame dies, node
> + // will end up to the purple buffer because of the refcount change.
> + (!unoptimizable ||
> + (currentDoc->GetShell() && aNode->IsElement() &&
> + aNode->AsElement()->GetPrimaryFrame()))) {
Maybe turn these two lines into a separate function with a descriptive name, then move the comment up there? I don't understand any of the unoptimizable stuff so I can't really comment on that.
Attachment #595898 -
Flags: feedback?(continuation) → feedback+
Comment 3•13 years ago
|
||
Comment on attachment 595898 [details] [diff] [review]
wip
+ // If aNode is not optimizable, but it is still an element
+ // with a frame in a document which has currently active presshell,
+ // we can act as if it was optimizable. When the primary frame dies, node
"the node", or "aNode".
+ // will end up to the purple buffer because of the refcount change.
+ (!unoptimizable ||
+ (currentDoc->GetShell() && aNode->IsElement() &&
+ aNode->AsElement()->GetPrimaryFrame()))) {
What Andrew said. Maybe put the code after || in a static inlined helper named NodeHasFrame() or somesuch?
r=jst with that.
Attachment #595898 -
Flags: review?(jst) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Assignee | ||
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•