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

Side by Side Diff: third_party/WebKit/Source/core/frame/DOMTimer.h

Issue 2366253002: Remove ActiveDOMObject::stop() (Closed)
Patch Set: temp Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // Creates a new timer owned by the ExecutionContext, starts it and returns it s ID. 46 // Creates a new timer owned by the ExecutionContext, starts it and returns it s ID.
47 static int install(ExecutionContext*, 47 static int install(ExecutionContext*,
48 ScheduledAction*, 48 ScheduledAction*,
49 int timeout, 49 int timeout,
50 bool singleShot); 50 bool singleShot);
51 static void removeByID(ExecutionContext*, int timeoutID); 51 static void removeByID(ExecutionContext*, int timeoutID);
52 52
53 ~DOMTimer() override; 53 ~DOMTimer() override;
54 54
55 // ActiveDOMObject 55 // ActiveDOMObject
56 void stop() override; 56 void contextDestroyed() override;
57 57
58 // Eager finalization is needed to promptly stop this Timer object. 58 // Eager finalization is needed to promptly stop this Timer object.
59 // Otherwise timer events might fire at an object that's slated for destructio n 59 // Otherwise timer events might fire at an object that's slated for destructio n
60 // (when lazily swept), but some of its members (m_action) may already have 60 // (when lazily swept), but some of its members (m_action) may already have
61 // been finalized & must not be accessed. 61 // been finalized & must not be accessed.
62 EAGERLY_FINALIZE(); 62 EAGERLY_FINALIZE();
63 DECLARE_VIRTUAL_TRACE(); 63 DECLARE_VIRTUAL_TRACE();
64 64
65 void disposeTimer(); 65 void stop() override;
66 66
67 private: 67 private:
68 friend class DOMTimerCoordinator; // For create(). 68 friend class DOMTimerCoordinator; // For create().
69 69
70 static DOMTimer* create(ExecutionContext* context, 70 static DOMTimer* create(ExecutionContext* context,
71 ScheduledAction* action, 71 ScheduledAction* action,
72 int timeout, 72 int timeout,
73 bool singleShot, 73 bool singleShot,
74 int timeoutID) { 74 int timeoutID) {
75 return new DOMTimer(context, action, timeout, singleShot, timeoutID); 75 return new DOMTimer(context, action, timeout, singleShot, timeoutID);
(...skipping 10 matching lines...) Expand all
86 86
87 int m_timeoutID; 87 int m_timeoutID;
88 int m_nestingLevel; 88 int m_nestingLevel;
89 Member<ScheduledAction> m_action; 89 Member<ScheduledAction> m_action;
90 RefPtr<UserGestureToken> m_userGestureToken; 90 RefPtr<UserGestureToken> m_userGestureToken;
91 }; 91 };
92 92
93 } // namespace blink 93 } // namespace blink
94 94
95 #endif // DOMTimer_h 95 #endif // DOMTimer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698