Bug 1550633 - part15 : return error when we failed to create channel. r=jya
The channel might not be created correctly if we pass invaild url (eg. "invalid://url"), we should handle this error. Differential Revision: https://phabricator.services.mozilla.com/D32038
This commit is contained in:
@@ -358,7 +358,11 @@ void HTMLTrackElement::LoadResource(RefPtr<WebVTTListener>&& aWebVTTListener) {
|
||||
nullptr, // PerformanceStorage
|
||||
loadGroup);
|
||||
|
||||
NS_ENSURE_TRUE_VOID(NS_SUCCEEDED(rv));
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG("create channel failed.");
|
||||
SetReadyState(TextTrackReadyState::FailedToLoad);
|
||||
return;
|
||||
}
|
||||
|
||||
channel->SetNotificationCallbacks(mListener);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user