Call |cb| before WebVTTListener::AsyncOnChannelRedirect returns. draft
authorHenry Chang <hchang@mozilla.com>
Thu, 02 Feb 2017 11:26:56 +0800
changeset 470012 e2eb085aa02ee1074ca62c3d668ba704c6360a9f
parent 470011 a01bead75258ccfb59f7e781abc4a73cc3cb914c
child 544355 b8aedca7cba2a92f076b15236966dafbf0ab3516
push id43899
push userhchang@mozilla.com
push dateFri, 03 Feb 2017 02:45:46 +0000
milestone54.0a1
Call |cb| before WebVTTListener::AsyncOnChannelRedirect returns. MozReview-Commit-ID: 32nXdFpgCjg
dom/media/WebVTTListener.cpp
--- a/dom/media/WebVTTListener.cpp
+++ b/dom/media/WebVTTListener.cpp
@@ -6,16 +6,17 @@
 #include "WebVTTListener.h"
 #include "mozilla/dom/TextTrackCue.h"
 #include "mozilla/dom/TextTrackRegion.h"
 #include "mozilla/dom/VTTRegionBinding.h"
 #include "mozilla/dom/HTMLTrackElement.h"
 #include "nsIInputStream.h"
 #include "nsIWebVTTParserWrapper.h"
 #include "nsComponentManagerUtils.h"
+#include "nsIAsyncVerifyRedirectCallback.h"
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_CYCLE_COLLECTION(WebVTTListener, mElement, mParserWrapper)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(WebVTTListener)
   NS_INTERFACE_MAP_ENTRY(nsIWebVTTListener)
@@ -72,16 +73,17 @@ NS_IMETHODIMP
 WebVTTListener::AsyncOnChannelRedirect(nsIChannel* aOldChannel,
                                        nsIChannel* aNewChannel,
                                        uint32_t aFlags,
                                        nsIAsyncVerifyRedirectCallback* cb)
 {
   if (mElement) {
     mElement->OnChannelRedirect(aOldChannel, aNewChannel, aFlags);
   }
+  cb->OnRedirectVerifyCallback(NS_OK);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 WebVTTListener::OnStartRequest(nsIRequest* aRequest,
                                nsISupports* aContext)
 {
   VTT_LOG("WebVTTListener::OnStartRequest\n");