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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 InstanceCounters::incrementCounter(InstanceCounters::ActiveDOMObjectCoun
ter); | 45 InstanceCounters::incrementCounter(InstanceCounters::ActiveDOMObjectCoun
ter); |
46 } | 46 } |
47 | 47 |
48 ActiveDOMObject::~ActiveDOMObject() | 48 ActiveDOMObject::~ActiveDOMObject() |
49 { | 49 { |
50 if (isMainThread()) | 50 if (isMainThread()) |
51 InstanceCounters::decrementCounter(InstanceCounters::ActiveDOMObjectCoun
ter); | 51 InstanceCounters::decrementCounter(InstanceCounters::ActiveDOMObjectCoun
ter); |
52 | 52 |
53 ASSERT(m_suspendIfNeededCalled); | 53 ASSERT(m_suspendIfNeededCalled); |
54 | 54 |
55 // Oilpan: not valid to access executionContext() in the destructor. | 55 // Oilpan: not valid to access getExecutionContext() in the destructor. |
56 #if !ENABLE(OILPAN) | 56 #if !ENABLE(OILPAN) |
57 ASSERT(!executionContext() || executionContext()->isContextThread()); | 57 ASSERT(!getExecutionContext() || getExecutionContext()->isContextThread()); |
58 #endif | 58 #endif |
59 } | 59 } |
60 | 60 |
61 void ActiveDOMObject::suspendIfNeeded() | 61 void ActiveDOMObject::suspendIfNeeded() |
62 { | 62 { |
63 #if ENABLE(ASSERT) | 63 #if ENABLE(ASSERT) |
64 ASSERT(!m_suspendIfNeededCalled); | 64 ASSERT(!m_suspendIfNeededCalled); |
65 m_suspendIfNeededCalled = true; | 65 m_suspendIfNeededCalled = true; |
66 #endif | 66 #endif |
67 if (ExecutionContext* context = executionContext()) | 67 if (ExecutionContext* context = getExecutionContext()) |
68 context->suspendActiveDOMObjectIfNeeded(this); | 68 context->suspendActiveDOMObjectIfNeeded(this); |
69 } | 69 } |
70 | 70 |
71 void ActiveDOMObject::suspend() | 71 void ActiveDOMObject::suspend() |
72 { | 72 { |
73 } | 73 } |
74 | 74 |
75 void ActiveDOMObject::resume() | 75 void ActiveDOMObject::resume() |
76 { | 76 { |
77 } | 77 } |
(...skipping 13 matching lines...) Expand all Loading... |
91 | 91 |
92 if (context->activeDOMObjectsAreSuspended()) { | 92 if (context->activeDOMObjectsAreSuspended()) { |
93 suspend(); | 93 suspend(); |
94 return; | 94 return; |
95 } | 95 } |
96 | 96 |
97 resume(); | 97 resume(); |
98 } | 98 } |
99 | 99 |
100 } // namespace blink | 100 } // namespace blink |
OLD | NEW |