Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(991)

Unified Diff: Source/core/html/HTMLDialogElement.cpp

Issue 179163004: Have Document::topDocument() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/HTMLDialogElement.cpp
diff --git a/Source/core/html/HTMLDialogElement.cpp b/Source/core/html/HTMLDialogElement.cpp
index 566624439aae28f1e0fa8e5f313187049cda5985..be7af1bd8b6d156452628c8da50da61558c69405 100644
--- a/Source/core/html/HTMLDialogElement.cpp
+++ b/Source/core/html/HTMLDialogElement.cpp
@@ -83,10 +83,10 @@ static void inertSubtreesChanged(Document& document)
// tree can change inertness which means they must be added or removed from
// the tree. The most foolproof way is to clear the entire tree and rebuild
// it, though a more clever way is probably possible.
- Document* topDocument = document.topDocument();
- topDocument->clearAXObjectCache();
- if (AXObjectCache* cache = topDocument->axObjectCache())
- cache->childrenChanged(cache->getOrCreate(topDocument));
+ Document& topDocument = document.topDocument();
+ topDocument.clearAXObjectCache();
+ if (AXObjectCache* cache = topDocument.axObjectCache())
+ cache->childrenChanged(cache->getOrCreate(&topDocument));
}
HTMLDialogElement::HTMLDialogElement(Document& document)

Powered by Google App Engine
This is Rietveld 408576698