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

Side by Side Diff: third_party/WebKit/Source/core/frame/EventHandlerRegistry.cpp

Issue 2891843004: Replace remaining ASSERT with DCHECK|DCHECK_FOO in core/frame (Closed)
Patch Set: Replace remaining ASSERT with DCHECK|DCHECK_FOO in core/frame Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/frame/EventHandlerRegistry.h" 5 #include "core/frame/EventHandlerRegistry.h"
6 6
7 #include "core/events/EventListenerOptions.h" 7 #include "core/events/EventListenerOptions.h"
8 #include "core/events/EventUtil.h" 8 #include "core/events/EventUtil.h"
9 #include "core/frame/LocalDOMWindow.h" 9 #include "core/frame/LocalDOMWindow.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 ChangeOperation op, 88 ChangeOperation op,
89 EventHandlerClass handler_class, 89 EventHandlerClass handler_class,
90 EventTarget* target) { 90 EventTarget* target) {
91 EventTargetSet* targets = &targets_[handler_class]; 91 EventTargetSet* targets = &targets_[handler_class];
92 if (op == kAdd) { 92 if (op == kAdd) {
93 if (!targets->insert(target).is_new_entry) { 93 if (!targets->insert(target).is_new_entry) {
94 // Just incremented refcount, no real change. 94 // Just incremented refcount, no real change.
95 return false; 95 return false;
96 } 96 }
97 } else { 97 } else {
98 ASSERT(op == kRemove || op == kRemoveAll); 98 DCHECK(op == kRemove || op == kRemoveAll);
99 ASSERT(op == kRemoveAll || targets->Contains(target)); 99 DCHECK(op == kRemoveAll || targets->Contains(target));
100 100
101 if (op == kRemoveAll) { 101 if (op == kRemoveAll) {
102 if (!targets->Contains(target)) 102 if (!targets->Contains(target))
103 return false; 103 return false;
104 targets->RemoveAll(target); 104 targets->RemoveAll(target);
105 } else { 105 } else {
106 if (!targets->erase(target)) { 106 if (!targets->erase(target)) {
107 // Just decremented refcount, no real update. 107 // Just decremented refcount, no real update.
108 return false; 108 return false;
109 } 109 }
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 // its handlers properly. 326 // its handlers properly.
327 DCHECK(window->GetFrame()); 327 DCHECK(window->GetFrame());
328 DCHECK(window->GetFrame()->GetPage()); 328 DCHECK(window->GetFrame()->GetPage());
329 DCHECK(window->GetFrame()->GetPage() == page_); 329 DCHECK(window->GetFrame()->GetPage() == page_);
330 } 330 }
331 } 331 }
332 #endif // DCHECK_IS_ON() 332 #endif // DCHECK_IS_ON()
333 } 333 }
334 334
335 } // namespace blink 335 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698