Title: [201321] branches/safari-602.1.32-branch/Source/WebCore

Diff

Modified: branches/safari-602.1.32-branch/Source/WebCore/ChangeLog (201320 => 201321)


--- branches/safari-602.1.32-branch/Source/WebCore/ChangeLog	2016-05-24 05:58:29 UTC (rev 201320)
+++ branches/safari-602.1.32-branch/Source/WebCore/ChangeLog	2016-05-24 06:15:05 UTC (rev 201321)
@@ -1,3 +1,23 @@
+2016-05-23  Babak Shafiei  <[email protected]>
+
+        Merge r200965. rdar://problem/26237934
+
+    2016-05-12  Ada Chan  <[email protected]>
+
+            Don't execute _javascript_ within HTMLMediaElement::stop()
+            https://bugs.webkit.org/show_bug.cgi?id=157655
+
+            Reviewed by Chris Dumez.
+
+            * dom/ScriptExecutionContext.cpp:
+            (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
+            Move the setting of m_activeDOMObjectsAreSuspended to true earlier so we won't execute
+            any JS while suspending the objects.
+            * html/HTMLMediaElement.cpp:
+            (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
+            Bail early if the controls script hasn't been injected yet or the DOM object has been
+            stopped or suspended.
+
 2016-05-22  Babak Shafiei  <[email protected]>
 
         Merge r201241. rdar://problem/26396532

Modified: branches/safari-602.1.32-branch/Source/WebCore/dom/ScriptExecutionContext.cpp (201320 => 201321)


--- branches/safari-602.1.32-branch/Source/WebCore/dom/ScriptExecutionContext.cpp	2016-05-24 05:58:29 UTC (rev 201320)
+++ branches/safari-602.1.32-branch/Source/WebCore/dom/ScriptExecutionContext.cpp	2016-05-24 06:15:05 UTC (rev 201321)
@@ -224,6 +224,8 @@
         return;
     }
 
+    m_activeDOMObjectsAreSuspended = true;
+
     m_activeDOMObjectAdditionForbidden = true;
 #if !ASSERT_DISABLED || ENABLE(SECURITY_ASSERTIONS)
     m_activeDOMObjectRemovalForbidden = true;
@@ -242,7 +244,6 @@
     m_activeDOMObjectRemovalForbidden = false;
 #endif
 
-    m_activeDOMObjectsAreSuspended = true;
     m_reasonForSuspendingActiveDOMObjects = why;
 }
 

Modified: branches/safari-602.1.32-branch/Source/WebCore/html/HTMLMediaElement.cpp (201320 => 201321)


--- branches/safari-602.1.32-branch/Source/WebCore/html/HTMLMediaElement.cpp	2016-05-24 05:58:29 UTC (rev 201320)
+++ branches/safari-602.1.32-branch/Source/WebCore/html/HTMLMediaElement.cpp	2016-05-24 06:15:05 UTC (rev 201321)
@@ -6481,6 +6481,11 @@
 
 void HTMLMediaElement::updateMediaControlsAfterPresentationModeChange()
 {
+    // Don't execute script if the controls script hasn't been injected yet, or we have
+    // stopped/suspended the object.
+    if (!m_mediaControlsHost || document().activeDOMObjectsAreSuspended() || document().activeDOMObjectsAreStopped())
+        return;
+
     DOMWrapperWorld& world = ensureIsolatedWorld();
     ScriptController& scriptController = document().frame()->script();
     JSDOMGlobalObject* globalObject = JSC::jsCast<JSDOMGlobalObject*>(scriptController.globalObject(world));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to