[M108 Migration] Support standard build for armv7hl architecture
[platform/framework/web/chromium-efl.git] / ash / scoped_animation_disabler.cc
index b119762..4192073 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
+// Copyright 2018 The Chromium Authors
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -11,14 +11,17 @@ namespace ash {
 
 ScopedAnimationDisabler::ScopedAnimationDisabler(aura::Window* window)
     : window_(window) {
+  DCHECK(window_);
   needs_disable_ = !window_->GetProperty(aura::client::kAnimationsDisabledKey);
   if (needs_disable_)
     window_->SetProperty(aura::client::kAnimationsDisabledKey, true);
 }
 
 ScopedAnimationDisabler::~ScopedAnimationDisabler() {
-  if (needs_disable_)
+  if (needs_disable_) {
+    DCHECK_EQ(window_->GetProperty(aura::client::kAnimationsDisabledKey), true);
     window_->ClearProperty(aura::client::kAnimationsDisabledKey);
+  }
 }
 
-}  // namespace ash
\ No newline at end of file
+}  // namespace ash