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

Unified Diff: third_party/WebKit/Source/modules/mediasource/URLMediaSource.cpp

Issue 2383503002: Measure usage of createObjectURL and srcObject (Closed)
Patch Set: Created 4 years, 3 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/mediasource/URLMediaSource.cpp
diff --git a/third_party/WebKit/Source/modules/mediasource/URLMediaSource.cpp b/third_party/WebKit/Source/modules/mediasource/URLMediaSource.cpp
index b5f232dcc1ca8415c5c4c3861e4e5c40cce8f3f1..cfa8aec10a67b1c250edbffc5e773c6b98d046f9 100644
--- a/third_party/WebKit/Source/modules/mediasource/URLMediaSource.cpp
+++ b/third_party/WebKit/Source/modules/mediasource/URLMediaSource.cpp
@@ -31,6 +31,7 @@
#include "modules/mediasource/URLMediaSource.h"
#include "core/dom/DOMURL.h"
+#include "core/frame/UseCounter.h"
#include "modules/mediasource/MediaSource.h"
namespace blink {
@@ -39,9 +40,10 @@ String URLMediaSource::createObjectURL(ExecutionContext* executionContext, Media
{
// Since WebWorkers cannot obtain MediaSource objects, we should be on the main thread.
DCHECK(isMainThread());
+ DCHECK(executionContext);
hta - Chromium 2016/09/29 13:46:33 Since you're now DCHECKing (and, I think, crashing
foolip 2016/09/29 14:54:45 executionContext and source cannot be null here, a
+ DCHECK(source);
- if (!executionContext)
- return String();
+ UseCounter::count(executionContext, UseCounter::CreateObjectURLMediaSource);
return DOMURL::createPublicURL(executionContext, source);
}

Powered by Google App Engine
This is Rietveld 408576698