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

Side by Side Diff: Source/core/dom/Document.cpp

Issue 14329005: UpdateWidget() can fire beforeload event synchronously blowing away RenderArena and its associated … (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Incorporate Eric's comments Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after
2352 if (!ownerElement() || (ownerElement()->renderer() && !ownerElement()->rende rer()->needsLayout())) { 2352 if (!ownerElement() || (ownerElement()->renderer() && !ownerElement()->rende rer()->needsLayout())) {
2353 updateStyleIfNeeded(); 2353 updateStyleIfNeeded();
2354 2354
2355 // Always do a layout after loading if needed. 2355 // Always do a layout after loading if needed.
2356 if (view() && renderObject && (!renderObject->firstChild() || renderObje ct->needsLayout())) 2356 if (view() && renderObject && (!renderObject->firstChild() || renderObje ct->needsLayout()))
2357 view()->layout(); 2357 view()->layout();
2358 } 2358 }
2359 2359
2360 m_processingLoadEvent = false; 2360 m_processingLoadEvent = false;
2361 2361
2362 if (f && renderObject && AXObjectCache::accessibilityEnabled()) { 2362 if (f && renderObject && AXObjectCache::accessibilityEnabled() && axObjectCa che()) {
eseidel 2013/04/23 20:37:51 axObjectCache() isn't redundant with accessibility
inferno 2013/04/23 20:43:42 It is not redundant with accessibilityEnabled. See
dmazzoni 2013/04/23 20:54:07 Nope, this creates an AXObjectCache. If you don't
dmazzoni 2013/04/23 21:08:41 OK, so this is what you want. As discussed offlin
2363 // The AX cache may have been cleared at this point, but we need to make sure it contains an 2363 // The AX cache may have been cleared at this point, but we need to make sure it contains an
2364 // AX object to send the notification to. getOrCreate will make sure tha t an valid AX object 2364 // AX object to send the notification to. getOrCreate will make sure tha t an valid AX object
2365 // exists in the cache (we ignore the return value because we don't need it here). This is 2365 // exists in the cache (we ignore the return value because we don't need it here). This is
2366 // only safe to call when a layout is not in progress, so it can not be used in postNotification. 2366 // only safe to call when a layout is not in progress, so it can not be used in postNotification.
2367 axObjectCache()->getOrCreate(renderObject); 2367 axObjectCache()->getOrCreate(renderObject);
2368 if (this == topDocument()) 2368 if (this == topDocument())
2369 axObjectCache()->postNotification(renderObject, AXObjectCache::AXLoa dComplete, true); 2369 axObjectCache()->postNotification(renderObject, AXObjectCache::AXLoa dComplete, true);
2370 else { 2370 else {
2371 // AXLoadComplete can only be posted on the top document, so if it's a document 2371 // AXLoadComplete can only be posted on the top document, so if it's a document
2372 // in an iframe that just finished loading, post AXLayoutComplete in stead. 2372 // in an iframe that just finished loading, post AXLayoutComplete in stead.
(...skipping 3517 matching lines...) Expand 10 before | Expand all | Expand 10 after
5890 return; 5890 return;
5891 5891
5892 Vector<RefPtr<Element> > associatedFormControls; 5892 Vector<RefPtr<Element> > associatedFormControls;
5893 copyToVector(m_associatedFormControls, associatedFormControls); 5893 copyToVector(m_associatedFormControls, associatedFormControls);
5894 5894
5895 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm Controls); 5895 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm Controls);
5896 m_associatedFormControls.clear(); 5896 m_associatedFormControls.clear();
5897 } 5897 }
5898 5898
5899 } // namespace WebCore 5899 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/beforeload/resources/object-beforeload-crash.html ('k') | Source/core/page/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698