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

Unified Diff: Source/core/testing/Internals.cpp

Issue 436673003: Fix crash in blink::Internals::numberOfScrollableAreas (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 13f0a035c1e34c8b93ffef5c0e14801c57a8daf3..21d32f36bf34461d1c15ea105a2b4333d198fe04 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -1617,6 +1617,9 @@ bool Internals::hasGrammarMarker(Document* document, int from, int length, Excep
unsigned Internals::numberOfScrollableAreas(Document* document, ExceptionState&)
{
+ if (!document || !document->frame())
+ return 0;
+
unsigned count = 0;
LocalFrame* frame = document->frame();
if (frame->view()->scrollableAreas())

Powered by Google App Engine
This is Rietveld 408576698