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

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

Issue 2610233002: Check ExecutionContext before calling isContextDestroyed() (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/mediastream/MediaStream.cpp
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStream.cpp b/third_party/WebKit/Source/modules/mediastream/MediaStream.cpp
index bb279db1088116d2ab85487eb6fd46401ca03fcd..5faaad6ca4f787794c2e554f43dbe34292ad7406 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStream.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStream.cpp
@@ -295,7 +295,7 @@ void MediaStream::trackEnded() {
}
void MediaStream::streamEnded() {
- if (m_executionContext->isContextDestroyed())
+ if (!m_executionContext || m_executionContext->isContextDestroyed())
return;
if (active()) {
@@ -323,7 +323,7 @@ const AtomicString& MediaStream::interfaceName() const {
void MediaStream::addRemoteTrack(MediaStreamComponent* component) {
DCHECK(component);
- if (m_executionContext->isContextDestroyed())
+ if (!m_executionContext || m_executionContext->isContextDestroyed())
return;
MediaStreamTrack* track =
@@ -350,7 +350,7 @@ void MediaStream::addRemoteTrack(MediaStreamComponent* component) {
void MediaStream::removeRemoteTrack(MediaStreamComponent* component) {
DCHECK(component);
- if (m_executionContext->isContextDestroyed())
+ if (!m_executionContext || m_executionContext->isContextDestroyed())
return;
MediaStreamTrackVector* tracks = 0;
@@ -395,7 +395,7 @@ void MediaStream::scheduleDispatchEvent(Event* event) {
}
void MediaStream::scheduledEventTimerFired(TimerBase*) {
- if (m_executionContext->isContextDestroyed())
+ if (!m_executionContext || m_executionContext->isContextDestroyed())
return;
HeapVector<Member<Event>> events;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698