Merge mozilla-central to mozilla-inbound
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Mon, 12 Sep 2016 13:22:44 +0200
changeset 357025 e8b53c6a566ec9f6d9abb194498044a6003c2b86
parent 357024 cdc7be84b21a4092e04f1665e5eba5b31e54b63f (current diff)
parent 357002 1851b78b5a9673ee422f189b92e5f1e86b82a01c (diff)
child 357026 13e09cb5ffe9e9da162fbf048885aa2a4a9020d3
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge mozilla-central to mozilla-inbound
--- a/browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js
+++ b/browser/components/extensions/test/browser/browser_ext_tabs_onUpdated.js
@@ -25,17 +25,21 @@ add_task(function* () {
       let expectedSequence = [
         {status: "loading"},
         {status: "loading", url: pageURL},
         {status: "complete"},
       ];
       let collectedSequence = [];
 
       browser.tabs.onUpdated.addListener(function(tabId, updatedInfo) {
-        collectedSequence.push(updatedInfo);
+        // onUpdated also fires with updatedInfo.faviconUrl, so explicitly
+        // check for updatedInfo.status before recording the event.
+        if ("status" in updatedInfo) {
+          collectedSequence.push(updatedInfo);
+        }
       });
 
       browser.runtime.onMessage.addListener(function() {
         if (collectedSequence.length !== expectedSequence.length) {
           browser.test.assertEq(
             JSON.stringify(expectedSequence),
             JSON.stringify(collectedSequence),
             "got unexpected number of updateInfo data"
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -219,16 +219,17 @@ public:
   virtual void Enter() {}; // Entry action.
   virtual void Exit() {};  // Exit action.
   virtual void Step() {}   // Perform a 'cycle' of this state object.
   virtual State GetState() const = 0;
 
   // Event handlers for various events.
   // Return true if the event is handled by this state object.
   virtual bool HandleDormant(bool aDormant) { return false; }
+  virtual bool HandleCDMProxyReady() { return false; }
 
 protected:
   using Master = MediaDecoderStateMachine;
   explicit StateObject(Master* aPtr) : mMaster(aPtr) {}
   TaskQueue* OwnerThread() const { return mMaster->mTaskQueue; }
   MediaResource* Resource() const { return mMaster->mResource; }
   MediaDecoderReaderWrapper* Reader() const { return mMaster->mReader; }
 
@@ -374,16 +375,22 @@ class MediaDecoderStateMachine::WaitForC
 {
 public:
   explicit WaitForCDMState(Master* aPtr) : StateObject(aPtr) {}
 
   State GetState() const override
   {
     return DECODER_STATE_WAIT_FOR_CDM;
   }
+
+  bool HandleCDMProxyReady() override
+  {
+    SetState(DECODER_STATE_DECODING_FIRSTFRAME);
+    return true;
+  }
 };
 
 class MediaDecoderStateMachine::DormantState
   : public MediaDecoderStateMachine::StateObject
 {
 public:
   explicit DormantState(Master* aPtr) : StateObject(aPtr) {}
 
@@ -2949,19 +2956,17 @@ void MediaDecoderStateMachine::OnMediaSi
 #ifdef MOZ_EME
 void
 MediaDecoderStateMachine::OnCDMProxyReady(RefPtr<CDMProxy> aProxy)
 {
   MOZ_ASSERT(OnTaskQueue());
   mCDMProxyPromise.Complete();
   mCDMProxy = aProxy;
   mReader->SetCDMProxy(aProxy);
-  if (mState == DECODER_STATE_WAIT_FOR_CDM) {
-    SetState(DECODER_STATE_DECODING_FIRSTFRAME);
-  }
+  mStateObj->HandleCDMProxyReady();
 }
 
 void
 MediaDecoderStateMachine::OnCDMProxyNotReady()
 {
   MOZ_ASSERT(OnTaskQueue());
   mCDMProxyPromise.Complete();
 }