Bug 905513 - Fix typo in AsyncEventRunner and BufferDecoder. r=doublec
authorMatthew Gregan <kinetik@flim.org>
Fri, 27 Sep 2013 17:22:37 +1200
changeset 148938 ba062e4be8fd4c05051f20aa3e85ba8952a4a774
parent 148937 6837a1ce616b882f35998d4996d95b2c92023eca
child 148939 07179c6176b865a3c8a839d848e57f941bc761aa
push id25366
push userkwierso@gmail.com
push dateSat, 28 Sep 2013 02:13:38 +0000
treeherdermozilla-central@e1914e294152 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdoublec
bugs905513
milestone27.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
Bug 905513 - Fix typo in AsyncEventRunner and BufferDecoder. r=doublec
content/media/BufferDecoder.h
content/media/mediasource/AsyncEventRunner.h
content/media/mediasource/MediaSource.cpp
content/media/mediasource/MediaSource.h
content/media/mediasource/SourceBuffer.cpp
content/media/mediasource/SourceBuffer.h
content/media/mediasource/SourceBufferList.cpp
content/media/mediasource/SourceBufferList.h
--- a/content/media/BufferDecoder.h
+++ b/content/media/BufferDecoder.h
@@ -15,17 +15,17 @@ namespace mozilla {
 
 /**
  * This class provides a decoder object which decodes a media file that lives in
  * a memory buffer.
  */
 class BufferDecoder : public AbstractMediaDecoder
 {
 public:
-  // This class holds a weak pointer to MediaResouce.  It's the responsibility
+  // This class holds a weak pointer to MediaResource.  It's the responsibility
   // of the caller to manage the memory of the MediaResource object.
   explicit BufferDecoder(MediaResource* aResource);
   virtual ~BufferDecoder();
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
   // This has to be called before decoding begins
   void BeginDecoding(nsIThread* aDecodeThread);
--- a/content/media/mediasource/AsyncEventRunner.h
+++ b/content/media/mediasource/AsyncEventRunner.h
@@ -7,20 +7,20 @@
 #ifndef MOZILLA_ASYNCEVENTRUNNER_H_
 #define MOZILLA_ASYNCEVENTRUNNER_H_
 
 #include "nsThreadUtils.h"
 
 namespace mozilla {
 
 template <typename T>
-class AsyncEventRunnner : public nsRunnable
+class AsyncEventRunner : public nsRunnable
 {
 public:
-  AsyncEventRunnner(T* aTarget, const char* aName)
+  AsyncEventRunner(T* aTarget, const char* aName)
     : mTarget(aTarget)
     , mName(aName)
   {}
 
   NS_IMETHOD Run()
   {
     mTarget->DispatchSimpleEvent(mName);
     return NS_OK;
--- a/content/media/mediasource/MediaSource.cpp
+++ b/content/media/mediasource/MediaSource.cpp
@@ -264,17 +264,17 @@ MediaSource::DispatchSimpleEvent(const c
   LOG(PR_LOG_DEBUG, ("%p Dispatching event %s to MediaSource", this, aName));
   DispatchTrustedEvent(NS_ConvertUTF8toUTF16(aName));
 }
 
 void
 MediaSource::QueueAsyncSimpleEvent(const char* aName)
 {
   LOG(PR_LOG_DEBUG, ("%p Queuing event %s to MediaSource", this, aName));
-  nsCOMPtr<nsIRunnable> event = new AsyncEventRunnner<MediaSource>(this, aName);
+  nsCOMPtr<nsIRunnable> event = new AsyncEventRunner<MediaSource>(this, aName);
   NS_DispatchToMainThread(event, NS_DISPATCH_NORMAL);
 }
 
 void
 MediaSource::NotifyListeners()
 {
   for (uint32_t i = 0; i < mAdapters.Length(); ++i) {
     mAdapters[i]->NotifyListener();
--- a/content/media/mediasource/MediaSource.h
+++ b/content/media/mediasource/MediaSource.h
@@ -16,16 +16,20 @@
 #include "nsCycleCollectionParticipant.h"
 #include "nsDOMEventTargetHelper.h"
 #include "nsWrapperCache.h"
 #include "nscore.h"
 
 class nsIInputStream;
 
 namespace mozilla {
+
+class ErrorResult;
+template <typename T> class AsyncEventRunner;
+
 namespace dom {
 
 class HTMLMediaElement;
 class MediaSourceInputAdapter;
 class SourceBufferList;
 class SourceBuffer;
 class TimeRanges;
 
@@ -97,17 +101,17 @@ public:
   // Set mReadyState to aState and fire the required events at the MediaSource.
   void SetReadyState(MediaSourceReadyState aState);
 
   void GetBuffered(TimeRanges* aRanges);
 
 private:
   explicit MediaSource(nsPIDOMWindow* aWindow);
 
-  friend class AsyncEventRunnner<MediaSource>;
+  friend class AsyncEventRunner<MediaSource>;
   void DispatchSimpleEvent(const char* aName);
   void QueueAsyncSimpleEvent(const char* aName);
 
   void NotifyListeners();
 
   void DurationChange(double aNewDuration, ErrorResult& aRv);
   void EndOfStreamInternal(const Optional<MediaSourceEndOfStreamError>& aError, ErrorResult& aRv);
 
--- a/content/media/mediasource/SourceBuffer.cpp
+++ b/content/media/mediasource/SourceBuffer.cpp
@@ -182,17 +182,17 @@ SourceBuffer::DispatchSimpleEvent(const 
   LOG(PR_LOG_DEBUG, ("%p Dispatching event %s to SourceBuffer", this, aName));
   DispatchTrustedEvent(NS_ConvertUTF8toUTF16(aName));
 }
 
 void
 SourceBuffer::QueueAsyncSimpleEvent(const char* aName)
 {
   LOG(PR_LOG_DEBUG, ("%p Queuing event %s to SourceBuffer", this, aName));
-  nsCOMPtr<nsIRunnable> event = new AsyncEventRunnner<SourceBuffer>(this, aName);
+  nsCOMPtr<nsIRunnable> event = new AsyncEventRunner<SourceBuffer>(this, aName);
   NS_DispatchToMainThread(event, NS_DISPATCH_NORMAL);
 }
 
 void
 SourceBuffer::StartUpdating()
 {
   MOZ_ASSERT(!mUpdating);
   mUpdating = true;
--- a/content/media/mediasource/SourceBuffer.h
+++ b/content/media/mediasource/SourceBuffer.h
@@ -16,16 +16,19 @@
 #include "mozilla/ErrorResult.h"
 #include "nsCOMPtr.h"
 #include "nscore.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDOMEventTargetHelper.h"
 #include "nsWrapperCache.h"
 
 namespace mozilla {
+
+template <typename T> class AsyncEventRunner;
+
 namespace dom {
 
 class SourceBuffer MOZ_FINAL : public nsDOMEventTargetHelper
 {
 public:
   /** WebIDL Methods. */
   SourceBufferAppendMode Mode() const
   {
@@ -80,17 +83,17 @@ public:
   JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
 
   // Notify the SourceBuffer that it has been attached to or detached from
   // the MediaSource's sourceBuffer list.
   void Attach();
   void Detach();
 
 private:
-  friend class AsyncEventRunnner<SourceBuffer>;
+  friend class AsyncEventRunner<SourceBuffer>;
   void DispatchSimpleEvent(const char* aName);
   void QueueAsyncSimpleEvent(const char* aName);
 
   // Update mUpdating and fire the appropriate events.
   void StartUpdating();
   void StopUpdating();
   void AbortUpdating();
 
--- a/content/media/mediasource/SourceBufferList.cpp
+++ b/content/media/mediasource/SourceBufferList.cpp
@@ -101,17 +101,17 @@ SourceBufferList::DispatchSimpleEvent(co
   LOG(PR_LOG_DEBUG, ("%p Dispatching event %s to SourceBufferList", this, aName));
   DispatchTrustedEvent(NS_ConvertUTF8toUTF16(aName));
 }
 
 void
 SourceBufferList::QueueAsyncSimpleEvent(const char* aName)
 {
   LOG(PR_LOG_DEBUG, ("%p Queuing event %s to SourceBufferList", this, aName));
-  nsCOMPtr<nsIRunnable> event = new AsyncEventRunnner<SourceBufferList>(this, aName);
+  nsCOMPtr<nsIRunnable> event = new AsyncEventRunner<SourceBufferList>(this, aName);
   NS_DispatchToMainThread(event, NS_DISPATCH_NORMAL);
 }
 
 SourceBufferList::SourceBufferList(MediaSource* aMediaSource)
   : nsDOMEventTargetHelper(aMediaSource->GetParentObject())
   , mMediaSource(aMediaSource)
 {
   MOZ_ASSERT(aMediaSource);
--- a/content/media/mediasource/SourceBufferList.h
+++ b/content/media/mediasource/SourceBufferList.h
@@ -13,16 +13,20 @@
 #include "mozilla/Attributes.h"
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsDOMEventTargetHelper.h"
 #include "nsWrapperCache.h"
 #include "nscore.h"
 
 namespace mozilla {
+
+class ErrorResult;
+template <typename T> class AsyncEventRunner;
+
 namespace dom {
 
 class MediaSource;
 
 class SourceBufferList MOZ_FINAL : public nsDOMEventTargetHelper
 {
 public:
   /** WebIDL Methods. */
@@ -61,17 +65,17 @@ public:
   // Returns true if updating is true on any SourceBuffers in the list.
   bool AnyUpdating();
 
   // Calls Remove(aStart, aEnd) on each SourceBuffer in the list.  Aborts on
   // first error, with result returned in aRv.
   void Remove(double aStart, double aEnd, ErrorResult& aRv);
 
 private:
-  friend class AsyncEventRunnner<SourceBufferList>;
+  friend class AsyncEventRunner<SourceBufferList>;
   void DispatchSimpleEvent(const char* aName);
   void QueueAsyncSimpleEvent(const char* aName);
 
   nsRefPtr<MediaSource> mMediaSource;
   nsTArray<nsRefPtr<SourceBuffer> > mSourceBuffers;
 };
 
 } // namespace dom