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

Side by Side Diff: Source/core/events/GenericEventQueue.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/events/EventSender.h ('k') | Source/core/fetch/FontResource.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 /* 1 /*
2 * Copyright (C) 2012 Victor Carbune (victor@rosedu.org) 2 * Copyright (C) 2012 Victor Carbune (victor@rosedu.org)
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 if (m_isClosed) 53 if (m_isClosed)
54 return false; 54 return false;
55 55
56 if (event->target() == m_owner) 56 if (event->target() == m_owner)
57 event->setTarget(nullptr); 57 event->setTarget(nullptr);
58 58
59 TRACE_EVENT_ASYNC_BEGIN1("event", "GenericEventQueue:enqueueEvent", event.ge t(), "type", event->type().ascii()); 59 TRACE_EVENT_ASYNC_BEGIN1("event", "GenericEventQueue:enqueueEvent", event.ge t(), "type", event->type().ascii());
60 m_pendingEvents.append(event); 60 m_pendingEvents.append(event);
61 61
62 if (!m_timer.isActive()) 62 if (!m_timer.isActive())
63 m_timer.startOneShot(0); 63 m_timer.startOneShot(0, FROM_HERE);
64 64
65 return true; 65 return true;
66 } 66 }
67 67
68 bool GenericEventQueue::cancelEvent(Event* event) 68 bool GenericEventQueue::cancelEvent(Event* event)
69 { 69 {
70 bool found = m_pendingEvents.contains(event); 70 bool found = m_pendingEvents.contains(event);
71 71
72 if (found) { 72 if (found) {
73 m_pendingEvents.remove(m_pendingEvents.find(event)); 73 m_pendingEvents.remove(m_pendingEvents.find(event));
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 115 }
116 m_pendingEvents.clear(); 116 m_pendingEvents.clear();
117 } 117 }
118 118
119 bool GenericEventQueue::hasPendingEvents() const 119 bool GenericEventQueue::hasPendingEvents() const
120 { 120 {
121 return m_pendingEvents.size(); 121 return m_pendingEvents.size();
122 } 122 }
123 123
124 } 124 }
OLDNEW
« no previous file with comments | « Source/core/events/EventSender.h ('k') | Source/core/fetch/FontResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698