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

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

Issue 1862163002: WebKit MediaStream cleanup: ASSERT-->DCHECK and ASSERT_NOT_REACHED-->NOTREACHED etc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted CHECK --> RELEASE_ASSERT and added TODO Created 4 years, 8 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/MediaStreamRegistry.cpp
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamRegistry.cpp b/third_party/WebKit/Source/modules/mediastream/MediaStreamRegistry.cpp
index a1f6580732f68121922be7e60cc273df9627c82e..f90f9a94179c335b585344f047c3e3cb15ad6a8c 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamRegistry.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamRegistry.cpp
@@ -33,33 +33,33 @@ namespace blink {
MediaStreamRegistry& MediaStreamRegistry::registry()
{
// Since WebWorkers cannot obtain MediaStream objects, we should be on the main thread.
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
DEFINE_STATIC_LOCAL(MediaStreamRegistry, instance, ());
return instance;
}
void MediaStreamRegistry::registerURL(SecurityOrigin*, const KURL& url, URLRegistrable* stream)
{
- ASSERT(&stream->registry() == this);
- ASSERT(isMainThread());
+ DCHECK(&stream->registry() == this);
+ DCHECK(isMainThread());
m_streamDescriptors.set(url.getString(), static_cast<MediaStream*>(stream)->descriptor());
}
void MediaStreamRegistry::unregisterURL(const KURL& url)
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
m_streamDescriptors.remove(url.getString());
}
bool MediaStreamRegistry::contains(const String& url)
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
return m_streamDescriptors.contains(url);
}
MediaStreamDescriptor* MediaStreamRegistry::lookupMediaStreamDescriptor(const String& url)
{
- ASSERT(isMainThread());
+ DCHECK(isMainThread());
return m_streamDescriptors.get(url);
}

Powered by Google App Engine
This is Rietveld 408576698