Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Unified Diff: third_party/WebKit/Source/modules/mediastream/URLMediaStream.cpp

Issue 1938183002: Deprecate URL.createObjectURL/revokeObjectURL in Service Workers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: derp Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/mediastream/URLMediaStream.cpp
diff --git a/third_party/WebKit/Source/modules/mediastream/URLMediaStream.cpp b/third_party/WebKit/Source/modules/mediastream/URLMediaStream.cpp
index 8f10116f5b25c89907e2bc90f05b3842895cbf5f..d552d043670140bc0a7452ad28041fa289c52861 100644
--- a/third_party/WebKit/Source/modules/mediastream/URLMediaStream.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/URLMediaStream.cpp
@@ -31,6 +31,8 @@
#include "modules/mediastream/URLMediaStream.h"
#include "core/dom/DOMURL.h"
+#include "core/frame/Deprecation.h"
+#include "core/frame/UseCounter.h"
#include "modules/mediastream/MediaStream.h"
namespace blink {
@@ -40,6 +42,9 @@ String URLMediaStream::createObjectURL(ExecutionContext* executionContext, Media
// Since WebWorkers cannot obtain Stream objects, we should be on the main thread.
DCHECK(isMainThread());
+ if (executionContext && executionContext->isServiceWorkerGlobalScope())
+ Deprecation::countDeprecation(executionContext, UseCounter::URLMethodCreateObjectURLServiceWorker);
+
if (!executionContext || !stream)
return String();
return DOMURL::createPublicURL(executionContext, stream);
« no previous file with comments | « third_party/WebKit/Source/modules/mediasource/URLMediaSource.cpp ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698