Title: [263040] trunk/Source/WebCore
Revision
263040
Author
[email protected]
Date
2020-06-15 09:42:29 -0700 (Mon, 15 Jun 2020)

Log Message

[GTK] Use GRefPtr for ManetteMonitor
https://bugs.webkit.org/show_bug.cgi?id=213094

Reviewed by Carlos Garcia Campos.

We should use GRefPtr for ManetteMonitor, but not GUniquePtr. Because it is a gobject instance.

No new tests because of no functionality changed.

* platform/gamepad/manette/ManetteGamepadProvider.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (263039 => 263040)


--- trunk/Source/WebCore/ChangeLog	2020-06-15 15:57:39 UTC (rev 263039)
+++ trunk/Source/WebCore/ChangeLog	2020-06-15 16:42:29 UTC (rev 263040)
@@ -1,3 +1,16 @@
+2020-06-15  ChangSeok Oh  <[email protected]>
+
+        [GTK] Use GRefPtr for ManetteMonitor
+        https://bugs.webkit.org/show_bug.cgi?id=213094
+
+        Reviewed by Carlos Garcia Campos.
+
+        We should use GRefPtr for ManetteMonitor, but not GUniquePtr. Because it is a gobject instance.
+
+        No new tests because of no functionality changed.
+
+        * platform/gamepad/manette/ManetteGamepadProvider.h:
+
 2020-06-15  Alexey Shvayka  <[email protected]>
 
         super should not depend on __proto__

Modified: trunk/Source/WebCore/platform/gamepad/manette/ManetteGamepadProvider.cpp (263039 => 263040)


--- trunk/Source/WebCore/platform/gamepad/manette/ManetteGamepadProvider.cpp	2020-06-15 15:57:39 UTC (rev 263039)
+++ trunk/Source/WebCore/platform/gamepad/manette/ManetteGamepadProvider.cpp	2020-06-15 16:42:29 UTC (rev 263040)
@@ -57,7 +57,7 @@
 }
 
 ManetteGamepadProvider::ManetteGamepadProvider()
-    : m_monitor(manette_monitor_new())
+    : m_monitor(adoptGRef(manette_monitor_new()))
     , m_connectionDelayTimer(RunLoop::current(), this, &ManetteGamepadProvider::connectionDelayTimerFired)
     , m_inputNotificationTimer(RunLoop::current(), this, &ManetteGamepadProvider::inputNotificationTimerFired)
 {

Modified: trunk/Source/WebCore/platform/gamepad/manette/ManetteGamepadProvider.h (263039 => 263040)


--- trunk/Source/WebCore/platform/gamepad/manette/ManetteGamepadProvider.h	2020-06-15 15:57:39 UTC (rev 263039)
+++ trunk/Source/WebCore/platform/gamepad/manette/ManetteGamepadProvider.h	2020-06-15 16:42:29 UTC (rev 263040)
@@ -69,7 +69,7 @@
     HashMap<ManetteDevice*, std::unique_ptr<ManetteGamepad>> m_gamepadMap;
     bool m_shouldDispatchCallbacks { false };
 
-    GUniquePtr<ManetteMonitor> m_monitor;
+    GRefPtr<ManetteMonitor> m_monitor;
     RunLoop::Timer<ManetteGamepadProvider> m_connectionDelayTimer;
     RunLoop::Timer<ManetteGamepadProvider> m_inputNotificationTimer;
 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to