summaryrefslogtreecommitdiff
path: root/core/fxge/skia
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge/skia')
-rw-r--r--core/fxge/skia/fx_skia_device.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 949ffb8031..53432224a5 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -949,6 +949,13 @@ class SkiaState {
bool ClipRestore() {
if (m_debugDisable)
return false;
+
+ // TODO(dsinclair): This check works around crbug.com/704442 where
+ // it looks like we have a ClipRestore without a corresponding ClipSave.
+ // We need to track down the imbalance and fix correctly.
+ if (m_commandIndex == 0)
+ return true;
+
Dump(__func__);
while (Clip::kSave != m_commands[--m_commandIndex]) {
SkASSERT(m_commandIndex > 0);