Chromium Code Reviews| Index: third_party/WebKit/Source/modules/mediasource/URLMediaSource.cpp |
| diff --git a/third_party/WebKit/Source/modules/mediasource/URLMediaSource.cpp b/third_party/WebKit/Source/modules/mediasource/URLMediaSource.cpp |
| index b7bd93243edc4a651a94e7b76627d0a232c8ccb6..fefa2eb7dbaa0ee5a3623e1842d843d3ba39fbfe 100644 |
| --- a/third_party/WebKit/Source/modules/mediasource/URLMediaSource.cpp |
| +++ b/third_party/WebKit/Source/modules/mediasource/URLMediaSource.cpp |
| @@ -31,6 +31,8 @@ |
| #include "modules/mediasource/URLMediaSource.h" |
| #include "core/dom/DOMURL.h" |
| +#include "core/frame/Deprecation.h" |
| +#include "core/frame/UseCounter.h" |
| #include "modules/mediasource/MediaSource.h" |
| namespace blink { |
| @@ -40,8 +42,12 @@ String URLMediaSource::createObjectURL(ExecutionContext* executionContext, Media |
| // Since WebWorkers cannot obtain MediaSource objects, we should be on the main thread. |
| ASSERT(isMainThread()); |
| + if (executionContext && executionContext->isServiceWorkerGlobalScope()) |
|
Rick Byers
2016/05/04 20:42:18
nit: you could eliminate some redundancy by adding
jsbell
2016/05/04 23:05:57
Noted - given that this is temporary (famous last
|
| + Deprecation::countDeprecation(executionContext, UseCounter::URL_Method_CreateObjectURL_ServiceWorker); |
| + |
| if (!executionContext) |
| return String(); |
| + |
| return DOMURL::createPublicURL(executionContext, source); |
| } |