UserMediaPermissionRequestManagerProxy should not use WebCore::Timer
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Jul 2017 23:56:34 +0000 (23:56 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Jul 2017 23:56:34 +0000 (23:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174599
<rdar://problem/33362600>

Reviewed by Tim Horton.

UserMediaPermissionRequestManagerProxy should not use WebCore::Timer since it runs in the
UIProcess. Switch to using RunLoop::Timer instead.

* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy):
* UIProcess/UserMediaPermissionRequestManagerProxy.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219588 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h

index 62cdc79..d52f82a 100644 (file)
@@ -1,5 +1,20 @@
 2017-07-17  Chris Dumez  <cdumez@apple.com>
 
+        UserMediaPermissionRequestManagerProxy should not use WebCore::Timer
+        https://bugs.webkit.org/show_bug.cgi?id=174599
+        <rdar://problem/33362600>
+
+        Reviewed by Tim Horton.
+
+        UserMediaPermissionRequestManagerProxy should not use WebCore::Timer since it runs in the
+        UIProcess. Switch to using RunLoop::Timer instead.
+
+        * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
+        (WebKit::UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy):
+        * UIProcess/UserMediaPermissionRequestManagerProxy.h:
+
+2017-07-17  Chris Dumez  <cdumez@apple.com>
+
         NETWORK_SESSION does not need didReceiveAuthenticationChallenge(uint64_t, uint64_t, const AuthenticationChallenge&)
         https://bugs.webkit.org/show_bug.cgi?id=174595
 
index 72ac981..716a564 100644 (file)
@@ -42,7 +42,7 @@ namespace WebKit {
 
 UserMediaPermissionRequestManagerProxy::UserMediaPermissionRequestManagerProxy(WebPageProxy& page)
     : m_page(page)
-    , m_rejectionTimer(*this, &UserMediaPermissionRequestManagerProxy::rejectionTimerFired)
+    , m_rejectionTimer(RunLoop::main(), this, &UserMediaPermissionRequestManagerProxy::rejectionTimerFired)
 {
 #if ENABLE(MEDIA_STREAM)
     UserMediaProcessManager::singleton().addUserMediaPermissionRequestManagerProxy(*this);
index 731a47e..3e1a624 100644 (file)
@@ -23,8 +23,8 @@
 #include "UserMediaPermissionRequestProxy.h"
 #include <WebCore/MediaProducer.h>
 #include <WebCore/SecurityOrigin.h>
-#include <WebCore/Timer.h>
 #include <wtf/HashMap.h>
+#include <wtf/RunLoop.h>
 #include <wtf/Seconds.h>
 
 namespace WebCore {
@@ -81,7 +81,7 @@ private:
 
     WebPageProxy& m_page;
 
-    WebCore::Timer m_rejectionTimer;
+    RunLoop::Timer<UserMediaPermissionRequestManagerProxy> m_rejectionTimer;
     Vector<uint64_t> m_pendingRejections;
 
     Vector<Ref<UserMediaPermissionRequestProxy>> m_pregrantedRequests;