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

Side by Side Diff: Source/core/dom/ScriptExecutionContext.h

Issue 19494002: Distinguish actions registered with setTimeout() and setInterval(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase again. Created 7 years, 5 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 * Copyright (C) 2012 Google Inc. All Rights Reserved. 3 * Copyright (C) 2012 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) = 0; 161 virtual void logExceptionToConsole(const String& errorMessage, const String& sourceURL, int lineNumber, PassRefPtr<ScriptCallStack>) = 0;
162 bool dispatchErrorEvent(const String& errorMessage, int lineNumber, const St ring& sourceURL, CachedScript*); 162 bool dispatchErrorEvent(const String& errorMessage, int lineNumber, const St ring& sourceURL, CachedScript*);
163 163
164 void closeMessagePorts(); 164 void closeMessagePorts();
165 165
166 virtual void refScriptExecutionContext() = 0; 166 virtual void refScriptExecutionContext() = 0;
167 virtual void derefScriptExecutionContext() = 0; 167 virtual void derefScriptExecutionContext() = 0;
168 virtual PassOwnPtr<LifecycleNotifier> createLifecycleNotifier() OVERRIDE; 168 virtual PassOwnPtr<LifecycleNotifier> createLifecycleNotifier() OVERRIDE;
169 169
170 // Implementation details for DOMTimer. No other classes should call these f unctions. 170 // Implementation details for DOMTimer. No other classes should call these f unctions.
171 int installNewTimeout(PassOwnPtr<ScheduledAction>, int timeout, bool singleS hot); 171 int installNewTimeout(DOMTimer::Type, PassOwnPtr<ScheduledAction>, int timeo ut);
172 void removeTimeoutByID(int timeoutID); // This makes underlying DOMTimer ins tance destructed. 172 bool removeTimeoutByIDIfTypeMatches(DOMTimer::Type, int timeoutID); // This makes underlying DOMTimer instance destructed. Returns true if removed.
173 173
174 HashSet<MessagePort*> m_messagePorts; 174 HashSet<MessagePort*> m_messagePorts;
175 175
176 int m_circularSequentialID; 176 int m_circularSequentialID;
177 typedef HashMap<int, OwnPtr<DOMTimer> > TimeoutMap; 177 typedef HashMap<int, OwnPtr<DOMTimer> > TimeoutMap;
178 TimeoutMap m_timeouts; 178 TimeoutMap m_timeouts;
179 179
180 bool m_inDispatchErrorEvent; 180 bool m_inDispatchErrorEvent;
181 class PendingException; 181 class PendingException;
182 OwnPtr<Vector<OwnPtr<PendingException> > > m_pendingExceptions; 182 OwnPtr<Vector<OwnPtr<PendingException> > > m_pendingExceptions;
183 183
184 bool m_activeDOMObjectsAreSuspended; 184 bool m_activeDOMObjectsAreSuspended;
185 ActiveDOMObject::ReasonForSuspension m_reasonForSuspendingActiveDOMObjects; 185 ActiveDOMObject::ReasonForSuspension m_reasonForSuspendingActiveDOMObjects;
186 bool m_activeDOMObjectsAreStopped; 186 bool m_activeDOMObjectsAreStopped;
187 187
188 OwnPtr<PublicURLManager> m_publicURLManager; 188 OwnPtr<PublicURLManager> m_publicURLManager;
189 189
190 RefPtr<DatabaseContext> m_databaseContext; 190 RefPtr<DatabaseContext> m_databaseContext;
191 191
192 // The location of this member is important; to make sure contextDestroyed() notification on 192 // The location of this member is important; to make sure contextDestroyed() notification on
193 // ScriptExecutionContext's members (notably m_timeouts) is called before th ey are destructed, 193 // ScriptExecutionContext's members (notably m_timeouts) is called before th ey are destructed,
194 // m_lifecycleNotifer should be placed *after* such members. 194 // m_lifecycleNotifer should be placed *after* such members.
195 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; 195 OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier;
196 }; 196 };
197 197
198 } // namespace WebCore 198 } // namespace WebCore
199 199
200 #endif // ScriptExecutionContext_h 200 #endif // ScriptExecutionContext_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8WorkerGlobalScopeCustom.cpp ('k') | Source/core/dom/ScriptExecutionContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698