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

Unified Diff: Source/core/loader/TextTrackLoader.cpp

Issue 53213002: Handle resource fetch failure in TextTrackLoader::load (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@refTextTrackLoaderClient
Patch Set: blank lines Created 7 years, 2 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: Source/core/loader/TextTrackLoader.cpp
diff --git a/Source/core/loader/TextTrackLoader.cpp b/Source/core/loader/TextTrackLoader.cpp
index 1d442a7e0defe393c0ee8723c98c320529eaf504..279796ad4680530e46e5cd2aaebfee61f6764712 100644
--- a/Source/core/loader/TextTrackLoader.cpp
+++ b/Source/core/loader/TextTrackLoader.cpp
@@ -138,11 +138,10 @@ bool TextTrackLoader::load(const KURL& url, const String& crossOriginMode)
ResourceFetcher* fetcher = m_document.fetcher();
m_resource = fetcher->fetchRawResource(cueRequest);
- if (m_resource)
- m_resource->addClient(this);
-
+ if (!m_resource)
+ return false;
+ m_resource->addClient(this);
m_client.cueLoadingStarted(this);
-
return true;
}
@@ -185,5 +184,5 @@ void TextTrackLoader::getNewRegions(Vector<RefPtr<TextTrackRegion> >& outputRegi
if (m_cueParser)
m_cueParser->getNewRegions(outputRegions);
}
-}
+}
« 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