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

Unified Diff: Source/core/accessibility/AXObjectCache.cpp

Issue 93543003: AX:Null pointer may be dereferenced in AXObjectCache.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXObjectCache.cpp
diff --git a/Source/core/accessibility/AXObjectCache.cpp b/Source/core/accessibility/AXObjectCache.cpp
index 34d6f630f5cd16646d3f59affaeff7380b60aafb..2590d5e48f3c02da1e1617b1afad687900d46c5f 100644
--- a/Source/core/accessibility/AXObjectCache.cpp
+++ b/Source/core/accessibility/AXObjectCache.cpp
@@ -343,6 +343,11 @@ AXObject* AXObjectCache::getOrCreate(Widget* widget)
// Will crash later if we have two objects for the same widget.
ASSERT(!get(widget));
+ // Catch the case if an (unsupported) widget type is used. Only FrameView and ScrollBar are supported now.
+ ASSERT(newObj);
+ if (!newObj)
+ return 0;
+
getAXID(newObj.get());
m_widgetObjectMapping.set(widget, newObj->axObjectID());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698