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

Unified Diff: Source/core/dom/Document.cpp

Issue 16695002: Uptake WebKit Changeset r149185. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Refetch render view and null check AXObjectCache Created 7 years, 6 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
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/page/FrameView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 063c4fd4ee7d7fc872fb604b541e39a950be54e9..62e6410a5515047eccc3a4c7b5a594a390d8a534 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1873,7 +1873,7 @@ void Document::attach()
ASSERT(!m_axObjectCache || this != topDocument());
if (!m_renderArena)
- m_renderArena = adoptPtr(new RenderArena);
+ m_renderArena = RenderArena::create();
// Create the rendering tree
setRenderer(new (m_renderArena.get()) RenderView(this));
@@ -2302,13 +2302,15 @@ void Document::implicitClose()
// AX object to send the notification to. getOrCreate will make sure that an valid AX object
// exists in the cache (we ignore the return value because we don't need it here). This is
// only safe to call when a layout is not in progress, so it can not be used in postNotification.
- axObjectCache()->getOrCreate(renderObject);
- if (this == topDocument())
- axObjectCache()->postNotification(renderObject, AXObjectCache::AXLoadComplete, true);
- else {
- // AXLoadComplete can only be posted on the top document, so if it's a document
- // in an iframe that just finished loading, post AXLayoutComplete instead.
- axObjectCache()->postNotification(renderObject, AXObjectCache::AXLayoutComplete, true);
+ if (AXObjectCache* cache = axObjectCache()) {
+ cache->getOrCreate(renderObject);
+ if (this == topDocument()) {
+ cache->postNotification(renderObject, AXObjectCache::AXLoadComplete, true);
+ } else {
+ // AXLoadComplete can only be posted on the top document, so if it's a document
+ // in an iframe that just finished loading, post AXLayoutComplete instead.
+ cache->postNotification(renderObject, AXObjectCache::AXLayoutComplete, true);
+ }
}
}
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/page/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698