Title: [214949] trunk/Source/WebCore
Revision
214949
Author
[email protected]
Date
2017-04-05 10:15:55 -0700 (Wed, 05 Apr 2017)

Log Message

[Webrtc] Mock realtime sources factories should be static after r213941
https://bugs.webkit.org/show_bug.cgi?id=170282

Patch by Alejandro G. Castro <[email protected]> on 2017-04-05
Reviewed by Alex Christensen.

If we don't make the variables static we would be returning a
local variable.

* platform/mock/MockRealtimeAudioSource.cpp:
(WebCore::MockRealtimeAudioSource::factory):
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::factory):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (214948 => 214949)


--- trunk/Source/WebCore/ChangeLog	2017-04-05 17:02:24 UTC (rev 214948)
+++ trunk/Source/WebCore/ChangeLog	2017-04-05 17:15:55 UTC (rev 214949)
@@ -1,3 +1,18 @@
+2017-04-05  Alejandro G. Castro  <[email protected]>
+
+        [Webrtc] Mock realtime sources factories should be static after r213941
+        https://bugs.webkit.org/show_bug.cgi?id=170282
+
+        Reviewed by Alex Christensen.
+
+        If we don't make the variables static we would be returning a
+        local variable.
+
+        * platform/mock/MockRealtimeAudioSource.cpp:
+        (WebCore::MockRealtimeAudioSource::factory):
+        * platform/mock/MockRealtimeVideoSource.cpp:
+        (WebCore::MockRealtimeVideoSource::factory):
+
 2017-04-05  Alex Christensen  <[email protected]>
 
         Fix CMake build.

Modified: trunk/Source/WebCore/platform/mock/MockRealtimeAudioSource.cpp (214948 => 214949)


--- trunk/Source/WebCore/platform/mock/MockRealtimeAudioSource.cpp	2017-04-05 17:02:24 UTC (rev 214948)
+++ trunk/Source/WebCore/platform/mock/MockRealtimeAudioSource.cpp	2017-04-05 17:15:55 UTC (rev 214949)
@@ -70,7 +70,7 @@
 
 RealtimeMediaSource::CaptureFactory& MockRealtimeAudioSource::factory()
 {
-    NeverDestroyed<MockRealtimeAudioSourceFactory> factory;
+    static NeverDestroyed<MockRealtimeAudioSourceFactory> factory;
     return factory.get();
 }
 

Modified: trunk/Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp (214948 => 214949)


--- trunk/Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp	2017-04-05 17:02:24 UTC (rev 214948)
+++ trunk/Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp	2017-04-05 17:15:55 UTC (rev 214949)
@@ -77,7 +77,7 @@
 
 RealtimeMediaSource::CaptureFactory& MockRealtimeVideoSource::factory()
 {
-    NeverDestroyed<MockRealtimeVideoSourceFactory> factory;
+    static NeverDestroyed<MockRealtimeVideoSourceFactory> factory;
     return factory.get();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to