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

Side by Side Diff: Source/core/events/DOMWindowEventQueue.cpp

Issue 189833009: Trace where timers were scheduled in Blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/editing/SpellCheckRequester.cpp ('k') | Source/core/events/EventSender.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 bool DOMWindowEventQueue::enqueueEvent(PassRefPtr<Event> event) 66 bool DOMWindowEventQueue::enqueueEvent(PassRefPtr<Event> event)
67 { 67 {
68 if (m_isClosed) 68 if (m_isClosed)
69 return false; 69 return false;
70 70
71 ASSERT(event->target()); 71 ASSERT(event->target());
72 bool wasAdded = m_queuedEvents.add(event).isNewEntry; 72 bool wasAdded = m_queuedEvents.add(event).isNewEntry;
73 ASSERT_UNUSED(wasAdded, wasAdded); // It should not have already been in the list. 73 ASSERT_UNUSED(wasAdded, wasAdded); // It should not have already been in the list.
74 74
75 if (!m_pendingEventTimer->isActive()) 75 if (!m_pendingEventTimer->isActive())
76 m_pendingEventTimer->startOneShot(0); 76 m_pendingEventTimer->startOneShot(0, FROM_HERE);
77 77
78 return true; 78 return true;
79 } 79 }
80 80
81 bool DOMWindowEventQueue::cancelEvent(Event* event) 81 bool DOMWindowEventQueue::cancelEvent(Event* event)
82 { 82 {
83 ListHashSet<RefPtr<Event>, 16>::iterator it = m_queuedEvents.find(event); 83 ListHashSet<RefPtr<Event>, 16>::iterator it = m_queuedEvents.find(event);
84 bool found = it != m_queuedEvents.end(); 84 bool found = it != m_queuedEvents.end();
85 if (found) 85 if (found)
86 m_queuedEvents.remove(it); 86 m_queuedEvents.remove(it);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 void DOMWindowEventQueue::dispatchEvent(PassRefPtr<Event> event) 121 void DOMWindowEventQueue::dispatchEvent(PassRefPtr<Event> event)
122 { 122 {
123 EventTarget* eventTarget = event->target(); 123 EventTarget* eventTarget = event->target();
124 if (eventTarget->toDOMWindow()) 124 if (eventTarget->toDOMWindow())
125 eventTarget->toDOMWindow()->dispatchEvent(event, nullptr); 125 eventTarget->toDOMWindow()->dispatchEvent(event, nullptr);
126 else 126 else
127 eventTarget->dispatchEvent(event); 127 eventTarget->dispatchEvent(event);
128 } 128 }
129 129
130 } 130 }
OLDNEW
« no previous file with comments | « Source/core/editing/SpellCheckRequester.cpp ('k') | Source/core/events/EventSender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698