| 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(); |
| 58 virtual void stop(); | 61 virtual void stop(); |
| 59 | 62 |
| 60 void didMoveToNewExecutionContext(ExecutionContext*); | 63 void didMoveToNewExecutionContext(ExecutionContext*); |
| 61 | 64 |
| 62 protected: | 65 protected: |
| 63 virtual ~ActiveDOMObject(); | 66 virtual ~ActiveDOMObject(); |
| 64 | 67 |
| 65 template<class T> void setPendingActivity(T* thisObject) | 68 template<class T> void setPendingActivity(T* thisObject) |
| 66 { | 69 { |
| 67 ASSERT(thisObject == this); | 70 ASSERT(thisObject == this); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 79 private: | 82 private: |
| 80 unsigned m_pendingActivityCount; | 83 unsigned m_pendingActivityCount; |
| 81 #if !ASSERT_DISABLED | 84 #if !ASSERT_DISABLED |
| 82 bool m_suspendIfNeededCalled; | 85 bool m_suspendIfNeededCalled; |
| 83 #endif | 86 #endif |
| 84 }; | 87 }; |
| 85 | 88 |
| 86 } // namespace WebCore | 89 } // namespace WebCore |
| 87 | 90 |
| 88 #endif // ActiveDOMObject_h | 91 #endif // ActiveDOMObject_h |
| OLD | NEW |