Changeset 175657 in webkit


Ignore:
Timestamp:
Nov 5, 2014 6:37:45 PM (9 years ago)
Author:
Chris Dumez
Message:

Revert r175441 as it seems to be causing intermittent crashes in DOMTimer
https://bugs.webkit.org/show_bug.cgi?id=138449

Unreviewed roll out.

Revert r175441 as it seems to be causing intermittent crashes in DOMTimer due
to the scriptExecutionContext going away. See <rdar://problem/18883681>.

  • page/DOMTimer.cpp:

(WebCore::DOMTimer::install):
(WebCore::DOMTimer::fired):
(WebCore::NestedTimersVector::NestedTimersVector): Deleted.
(WebCore::NestedTimersVector::~NestedTimersVector): Deleted.
(WebCore::NestedTimersVector::registerTimer): Deleted.
(WebCore::NestedTimersVector::begin): Deleted.
(WebCore::NestedTimersVector::end): Deleted.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r175656 r175657  
     12014-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
    1202014-11-05  Simon Fraser  <simon.fraser@apple.com>
    221
  • trunk/Source/WebCore/page/DOMTimer.cpp

    r175655 r175657  
    8686DOMTimerFireState* DOMTimerFireState::current = nullptr;
    8787
    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 
    12488static inline bool shouldForwardUserGesture(int interval, int nestingLevel)
    12589{
     
    171135    InspectorInstrumentation::didInstallTimer(context, timer->m_timeoutId, timeout, singleShot);
    172136
    173     // Keep track of nested timer installs.
    174     if (NestedTimersVector::current)
    175         NestedTimersVector::current->registerTimer(timer);
    176 
    177137    return timer->m_timeoutId;
    178138}
     
    279239#endif
    280240
    281     // Keep track nested timer installs.
    282     NestedTimersVector nestedTimers(context);
    283241    m_action->execute(context);
    284242
     
    294252
    295253    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     }
    302254
    303255    context->setTimerNestingLevel(0);
Note: See TracChangeset for help on using the changeset viewer.