Backed out changeset 9180c9b4adc0 (bug 1343550) for failing e.g. its own crashtest. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 09 Mar 2017 14:49:30 +0100
changeset 346805 a4653bf663786a398fb3b971cb8bd2f9da4d554d
parent 346804 7792317543c7af77568934202f16f763116117b7
child 346806 f6bd0eb2c8bab71df7e23af5a33d1e30ceac37bd
push id31479
push userkwierso@gmail.com
push dateFri, 10 Mar 2017 00:33:39 +0000
treeherdermozilla-central@35398cae65c1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1343550
milestone55.0a1
backs out9180c9b4adc072e25e78a300986a11fba2f868bb
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
Backed out changeset 9180c9b4adc0 (bug 1343550) for failing e.g. its own crashtest. r=backout
dom/media/webaudio/AudioContext.cpp
dom/media/webaudio/AudioContext.h
dom/media/webaudio/ConstantSourceNode.cpp
--- a/dom/media/webaudio/AudioContext.cpp
+++ b/dom/media/webaudio/AudioContext.cpp
@@ -255,18 +255,17 @@ AudioContext::Constructor(const GlobalOb
 
   RegisterWeakMemoryReporter(object);
 
   return object.forget();
 }
 
 bool AudioContext::CheckClosed(ErrorResult& aRv)
 {
-  if (mAudioContextState == AudioContextState::Closed ||
-      mIsShutDown) {
+  if (mAudioContextState == AudioContextState::Closed) {
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
     return true;
   }
   return false;
 }
 
 already_AddRefed<AudioBufferSourceNode>
 AudioContext::CreateBufferSource(ErrorResult& aRv)
@@ -636,22 +635,16 @@ AudioContext::DestinationStream() const
 
 double
 AudioContext::CurrentTime() const
 {
   MediaStream* stream = Destination()->Stream();
   return stream->StreamTimeToSeconds(stream->GetCurrentTime());
 }
 
-void AudioContext::DisconnectFromOwner()
-{
-  Shutdown();
-  DOMEventTargetHelper::DisconnectFromOwner();
-}
-
 void
 AudioContext::Shutdown()
 {
   mIsShutDown = true;
 
   if (!mIsOffline) {
     ErrorResult dummy;
     RefPtr<Promise> ignored = Close(dummy);
--- a/dom/media/webaudio/AudioContext.h
+++ b/dom/media/webaudio/AudioContext.h
@@ -137,18 +137,16 @@ public:
                                            DOMEventTargetHelper)
   MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf)
 
   nsPIDOMWindowInner* GetParentObject() const
   {
     return GetOwner();
   }
 
-  virtual void DisconnectFromOwner() override;
-
   void Shutdown(); // idempotent
 
   JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   using DOMEventTargetHelper::DispatchTrustedEvent;
 
   // Constructor for regular AudioContext
   static already_AddRefed<AudioContext>
--- a/dom/media/webaudio/ConstantSourceNode.cpp
+++ b/dom/media/webaudio/ConstantSourceNode.cpp
@@ -184,20 +184,16 @@ ConstantSourceNode::WrapObject(JSContext
 }
 
 already_AddRefed<ConstantSourceNode>
 ConstantSourceNode::Constructor(const GlobalObject& aGlobal,
                                 AudioContext& aContext,
                                 const ConstantSourceOptions& aOptions,
                                 ErrorResult& aRv)
 {
-  if (aContext.CheckClosed(aRv)) {
-    return nullptr;
-  }
-
   RefPtr<ConstantSourceNode> object = new ConstantSourceNode(&aContext);
   object->mOffset->SetValue(aOptions.mOffset);
   return object.forget();
 }
 
 void
 ConstantSourceNode::DestroyMediaStream()
 {