Changeset 175657 in webkit
- Timestamp:
- Nov 5, 2014 6:37:45 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r175656 r175657 1 2014-11-05 Chris Dumez <cdumez@apple.com> 2 3 Revert r175441 as it seems to be causing intermittent crashes in DOMTimer 4 https://bugs.webkit.org/show_bug.cgi?id=138449 5 6 Unreviewed roll out. 7 8 Revert r175441 as it seems to be causing intermittent crashes in DOMTimer due 9 to the scriptExecutionContext going away. See <rdar://problem/18883681>. 10 11 * page/DOMTimer.cpp: 12 (WebCore::DOMTimer::install): 13 (WebCore::DOMTimer::fired): 14 (WebCore::NestedTimersVector::NestedTimersVector): Deleted. 15 (WebCore::NestedTimersVector::~NestedTimersVector): Deleted. 16 (WebCore::NestedTimersVector::registerTimer): Deleted. 17 (WebCore::NestedTimersVector::begin): Deleted. 18 (WebCore::NestedTimersVector::end): Deleted. 19 1 20 2014-11-05 Simon Fraser <simon.fraser@apple.com> 2 21 -
trunk/Source/WebCore/page/DOMTimer.cpp
r175655 r175657 86 86 DOMTimerFireState* DOMTimerFireState::current = nullptr; 87 87 88 struct NestedTimersVector {89 typedef Vector<DOMTimer*, 1>::const_iterator const_iterator;90 91 NestedTimersVector(ScriptExecutionContext* context)92 : shouldSetCurrent(context->isDocument())93 {94 if (shouldSetCurrent) {95 previous = current;96 current = this;97 }98 }99 100 ~NestedTimersVector()101 {102 if (shouldSetCurrent)103 current = previous;104 }105 106 static NestedTimersVector* current;107 108 void registerTimer(DOMTimer* timer)109 {110 nestedTimers.append(timer);111 }112 113 const_iterator begin() const { return nestedTimers.begin(); }114 const_iterator end() const { return nestedTimers.end(); }115 116 private:117 bool shouldSetCurrent;118 NestedTimersVector* previous;119 Vector<DOMTimer*, 1> nestedTimers;120 };121 122 NestedTimersVector* NestedTimersVector::current = nullptr;123 124 88 static inline bool shouldForwardUserGesture(int interval, int nestingLevel) 125 89 { … … 171 135 InspectorInstrumentation::didInstallTimer(context, timer->m_timeoutId, timeout, singleShot); 172 136 173 // Keep track of nested timer installs.174 if (NestedTimersVector::current)175 NestedTimersVector::current->registerTimer(timer);176 177 137 return timer->m_timeoutId; 178 138 } … … 279 239 #endif 280 240 281 // Keep track nested timer installs.282 NestedTimersVector nestedTimers(context);283 241 m_action->execute(context); 284 242 … … 294 252 295 253 InspectorInstrumentation::didFireTimer(cookie); 296 297 // Check if we should throttle nested single-shot timers.298 for (auto* timer : nestedTimers) {299 if (!timer->repeatInterval())300 timer->updateThrottlingStateIfNecessary(fireState);301 }302 254 303 255 context->setTimerNestingLevel(0);
Note: See TracChangeset
for help on using the changeset viewer.