OLD | NEW |
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 * | 4 * |
4 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
6 * are met: | 7 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 11 * notice, this list of conditions and the following disclaimer in the |
11 * documentation and/or other materials provided with the distribution. | 12 * documentation and/or other materials provided with the distribution. |
12 * | 13 * |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 #endif | 95 #endif |
95 // Active objects are not garbage collected even if inaccessible, e.g. becau
se their activity may result in callbacks being invoked. | 96 // Active objects are not garbage collected even if inaccessible, e.g. becau
se their activity may result in callbacks being invoked. |
96 bool canSuspendActiveDOMObjects(); | 97 bool canSuspendActiveDOMObjects(); |
97 // Active objects can be asked to suspend even if canSuspendActiveDOMObjects
() returns 'false' - | 98 // Active objects can be asked to suspend even if canSuspendActiveDOMObjects
() returns 'false' - |
98 // step-by-step JS debugging is one example. | 99 // step-by-step JS debugging is one example. |
99 virtual void suspendActiveDOMObjects(ActiveDOMObject::ReasonForSuspension); | 100 virtual void suspendActiveDOMObjects(ActiveDOMObject::ReasonForSuspension); |
100 virtual void resumeActiveDOMObjects(); | 101 virtual void resumeActiveDOMObjects(); |
101 virtual void stopActiveDOMObjects(); | 102 virtual void stopActiveDOMObjects(); |
102 | 103 |
103 bool activeDOMObjectsAreSuspended() const { return m_activeDOMObjectsAreSusp
ended; } | 104 bool activeDOMObjectsAreSuspended() const { return m_activeDOMObjectsAreSusp
ended; } |
| 105 bool activeDOMObjectsAreStopped() const { return m_activeDOMObjectsAreStoppe
d; } |
104 | 106 |
105 // Called from the constructor and destructors of ActiveDOMObject. | 107 // Called from the constructor and destructors of ActiveDOMObject. |
106 void didCreateActiveDOMObject(ActiveDOMObject*, void* upcastPointer); | 108 void didCreateActiveDOMObject(ActiveDOMObject*, void* upcastPointer); |
107 void willDestroyActiveDOMObject(ActiveDOMObject*); | 109 void willDestroyActiveDOMObject(ActiveDOMObject*); |
108 | 110 |
109 // Called after the construction of an ActiveDOMObject to synchronize suspen
d state. | 111 // Called after the construction of an ActiveDOMObject to synchronize suspen
d state. |
110 void suspendActiveDOMObjectIfNeeded(ActiveDOMObject*); | 112 void suspendActiveDOMObjectIfNeeded(ActiveDOMObject*); |
111 | 113 |
112 typedef const HashMap<ActiveDOMObject*, void*> ActiveDOMObjectsMap; | 114 typedef const HashMap<ActiveDOMObject*, void*> ActiveDOMObjectsMap; |
113 ActiveDOMObjectsMap& activeDOMObjects() const { return m_activeDOMObjects; } | 115 ActiveDOMObjectsMap& activeDOMObjects() const { return m_activeDOMObjects; } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 209 |
208 bool m_inDispatchErrorEvent; | 210 bool m_inDispatchErrorEvent; |
209 class PendingException; | 211 class PendingException; |
210 OwnPtr<Vector<OwnPtr<PendingException> > > m_pendingExceptions; | 212 OwnPtr<Vector<OwnPtr<PendingException> > > m_pendingExceptions; |
211 #if ENABLE(BLOB) | 213 #if ENABLE(BLOB) |
212 OwnPtr<PublicURLManager> m_publicURLManager; | 214 OwnPtr<PublicURLManager> m_publicURLManager; |
213 #endif | 215 #endif |
214 | 216 |
215 bool m_activeDOMObjectsAreSuspended; | 217 bool m_activeDOMObjectsAreSuspended; |
216 ActiveDOMObject::ReasonForSuspension m_reasonForSuspendingActiveDOMObjects; | 218 ActiveDOMObject::ReasonForSuspension m_reasonForSuspendingActiveDOMObjects; |
| 219 bool m_activeDOMObjectsAreStopped; |
217 | 220 |
218 #if ENABLE(BLOB) || ENABLE(FILE_SYSTEM) | 221 #if ENABLE(BLOB) || ENABLE(FILE_SYSTEM) |
219 RefPtr<FileThread> m_fileThread; | 222 RefPtr<FileThread> m_fileThread; |
220 #endif | 223 #endif |
221 }; | 224 }; |
222 | 225 |
223 } // namespace WebCore | 226 } // namespace WebCore |
224 | 227 |
225 #endif // ScriptExecutionContext_h | 228 #endif // ScriptExecutionContext_h |
OLD | NEW |