| OLD | NEW |
| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // this object must not be garbage collected. | 48 // this object must not be garbage collected. |
| 49 // | 49 // |
| 50 // Default implementation is that it returns true iff | 50 // Default implementation is that it returns true iff |
| 51 // m_pendingActivityCount is non-zero. | 51 // m_pendingActivityCount is non-zero. |
| 52 virtual bool hasPendingActivity() const; | 52 virtual bool hasPendingActivity() const; |
| 53 | 53 |
| 54 // These methods have an empty default implementation so that subclasses | 54 // These methods have an empty default implementation so that subclasses |
| 55 // which don't need special treatment can skip implementation. | 55 // which don't need special treatment can skip implementation. |
| 56 virtual void suspend(); | 56 virtual void suspend(); |
| 57 virtual void resume(); | 57 virtual void resume(); |
| 58 // willStop is called when stop() for the owner worker is called. It's not | |
| 59 // called if the owner is a Document. It's ok to post a task to the context. | |
| 60 virtual void willStop(); | |
| 61 virtual void stop(); | 58 virtual void stop(); |
| 62 | 59 |
| 63 void didMoveToNewExecutionContext(ExecutionContext*); | 60 void didMoveToNewExecutionContext(ExecutionContext*); |
| 64 | 61 |
| 65 protected: | 62 protected: |
| 66 virtual ~ActiveDOMObject(); | 63 virtual ~ActiveDOMObject(); |
| 67 | 64 |
| 68 template<class T> void setPendingActivity(T* thisObject) | 65 template<class T> void setPendingActivity(T* thisObject) |
| 69 { | 66 { |
| 70 ASSERT(thisObject == this); | 67 ASSERT(thisObject == this); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 82 private: | 79 private: |
| 83 unsigned m_pendingActivityCount; | 80 unsigned m_pendingActivityCount; |
| 84 #if !ASSERT_DISABLED | 81 #if !ASSERT_DISABLED |
| 85 bool m_suspendIfNeededCalled; | 82 bool m_suspendIfNeededCalled; |
| 86 #endif | 83 #endif |
| 87 }; | 84 }; |
| 88 | 85 |
| 89 } // namespace WebCore | 86 } // namespace WebCore |
| 90 | 87 |
| 91 #endif // ActiveDOMObject_h | 88 #endif // ActiveDOMObject_h |
| OLD | NEW |