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

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: Remove test 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
« 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/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 02739983adb053c76e67ec41ad67ce52067a1a1f..059d0d16dad8433ad198376ba1d1b79e0ca3938a 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())
« 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