Title: [165733] trunk/Source/WebCore
Revision
165733
Author
[email protected]
Date
2014-03-17 08:02:50 -0700 (Mon, 17 Mar 2014)

Log Message

Only supplement Page with UserMediaController once
https://bugs.webkit.org/show_bug.cgi?id=130311

Reviewed by Darin Adler.

Don't supplement the Page with an UserMediaController object if that Page was
already supplemented with one. This avoids triggering an assertion in
Supplementable::provideSupplement() that ensures no supplement with the same key
exists yet. The cause of this is calling provideUserMediaTo() in the Internals
constructor that's using the same Page for two subsequent tests.

* Modules/mediastream/UserMediaController.cpp:
(WebCore::provideUserMediaTo):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (165732 => 165733)


--- trunk/Source/WebCore/ChangeLog	2014-03-17 14:59:03 UTC (rev 165732)
+++ trunk/Source/WebCore/ChangeLog	2014-03-17 15:02:50 UTC (rev 165733)
@@ -1,5 +1,21 @@
 2014-03-17  Zan Dobersek  <[email protected]>
 
+        Only supplement Page with UserMediaController once
+        https://bugs.webkit.org/show_bug.cgi?id=130311
+
+        Reviewed by Darin Adler.
+
+        Don't supplement the Page with an UserMediaController object if that Page was
+        already supplemented with one. This avoids triggering an assertion in
+        Supplementable::provideSupplement() that ensures no supplement with the same key
+        exists yet. The cause of this is calling provideUserMediaTo() in the Internals
+        constructor that's using the same Page for two subsequent tests.
+
+        * Modules/mediastream/UserMediaController.cpp:
+        (WebCore::provideUserMediaTo):
+
+2014-03-17  Zan Dobersek  <[email protected]>
+
         Explicitly include cstdio header for debug builds in InlineTextBox, RenderLayer, RenderObject
         https://bugs.webkit.org/show_bug.cgi?id=130310
 

Modified: trunk/Source/WebCore/Modules/mediastream/UserMediaController.cpp (165732 => 165733)


--- trunk/Source/WebCore/Modules/mediastream/UserMediaController.cpp	2014-03-17 14:59:03 UTC (rev 165732)
+++ trunk/Source/WebCore/Modules/mediastream/UserMediaController.cpp	2014-03-17 15:02:50 UTC (rev 165733)
@@ -51,7 +51,8 @@
 
 void provideUserMediaTo(Page* page, UserMediaClient* client)
 {
-    UserMediaController::provideTo(page, UserMediaController::supplementName(), UserMediaController::create(client));
+    if (!Supplement<Page>::from(page, UserMediaController::supplementName()))
+        UserMediaController::provideTo(page, UserMediaController::supplementName(), UserMediaController::create(client));
 }
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to