Title: [175685] tags/Safari-601.1.8/Source/WebCore
Revision
175685
Author
bshaf...@apple.com
Date
2014-11-05 22:56:40 -0800 (Wed, 05 Nov 2014)

Log Message

Merged r175657.  rdar://problem/18883681

Modified Paths

Diff

Modified: tags/Safari-601.1.8/Source/WebCore/ChangeLog (175684 => 175685)


--- tags/Safari-601.1.8/Source/WebCore/ChangeLog	2014-11-06 06:53:25 UTC (rev 175684)
+++ tags/Safari-601.1.8/Source/WebCore/ChangeLog	2014-11-06 06:56:40 UTC (rev 175685)
@@ -1,3 +1,26 @@
+2014-11-05  Babak Shafiei  <bshaf...@apple.com>
+
+        Merge r175657.
+
+    2014-11-05  Chris Dumez  <cdu...@apple.com>
+
+            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.
+
 2014-11-04  Chris Dumez  <cdu...@apple.com>
 
         Avoid double hash table lookup in SpaceSplitStringData::create()

Modified: tags/Safari-601.1.8/Source/WebCore/page/DOMTimer.cpp (175684 => 175685)


--- tags/Safari-601.1.8/Source/WebCore/page/DOMTimer.cpp	2014-11-06 06:53:25 UTC (rev 175684)
+++ tags/Safari-601.1.8/Source/WebCore/page/DOMTimer.cpp	2014-11-06 06:56:40 UTC (rev 175685)
@@ -84,42 +84,6 @@
 
 DOMTimerFireState* DOMTimerFireState::current = nullptr;
 
-struct NestedTimersVector {
-    typedef Vector<DOMTimer*, 1>::const_iterator const_iterator;
-
-    NestedTimersVector(ScriptExecutionContext* context)
-        : shouldSetCurrent(context->isDocument())
-    {
-        if (shouldSetCurrent) {
-            previous = current;
-            current = this;
-        }
-    }
-
-    ~NestedTimersVector()
-    {
-        if (shouldSetCurrent)
-            current = previous;
-    }
-
-    static NestedTimersVector* current;
-
-    void registerTimer(DOMTimer* timer)
-    {
-        nestedTimers.append(timer);
-    }
-
-    const_iterator begin() const { return nestedTimers.begin(); }
-    const_iterator end() const { return nestedTimers.end(); }
-
-private:
-    bool shouldSetCurrent;
-    NestedTimersVector* previous;
-    Vector<DOMTimer*, 1> nestedTimers;
-};
-
-NestedTimersVector* NestedTimersVector::current = nullptr;
-
 static inline bool shouldForwardUserGesture(int interval, int nestingLevel)
 {
     return UserGestureIndicator::processingUserGesture()
@@ -169,10 +133,6 @@
     timer->suspendIfNeeded();
     InspectorInstrumentation::didInstallTimer(context, timer->m_timeoutId, timeout, singleShot);
 
-    // Keep track of nested timer installs.
-    if (NestedTimersVector::current)
-        NestedTimersVector::current->registerTimer(timer);
-
     return timer->m_timeoutId;
 }
 
@@ -273,8 +233,6 @@
     }
 #endif
 
-    // Keep track nested timer installs.
-    NestedTimersVector nestedTimers(context);
     m_action->execute(context);
 
 #if PLATFORM(IOS)
@@ -289,12 +247,6 @@
 
     InspectorInstrumentation::didFireTimer(cookie);
 
-    // Check if we should throttle nested single-shot timers.
-    for (auto* timer : nestedTimers) {
-        if (!timer->repeatInterval())
-            timer->updateThrottlingStateIfNecessary(fireState);
-    }
-
     context->setTimerNestingLevel(0);
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to