Bug 1656801 - Fix typo in UserInteractionTimer name. r=mccr8
authorCameron McCormack <cam@mcc.id.au>
Tue, 04 Aug 2020 15:06:11 +0000
changeset 607939 638b017e37685ebf85a24b303387beba20a75f03
parent 607938 c338925bb4f3a67673682be9738f203c5c14dcb9
child 607940 5bb2ecb2e12ba5d1ba89981c0b2d6638cc23a65b
push id13553
push userffxbld-merge
push dateMon, 24 Aug 2020 12:51:36 +0000
treeherdermozilla-beta@a54f8b5d0977 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1656801
milestone81.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 1656801 - Fix typo in UserInteractionTimer name. r=mccr8 Differential Revision: https://phabricator.services.mozilla.com/D85696
dom/base/Document.cpp
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -15386,24 +15386,24 @@ void Document::MaybeAllowStorageForOpene
 namespace {
 
 // Documents can stay alive for days. We don't want to update the permission
 // value at any user-interaction, and, using a timer triggered any X seconds
 // should be good enough. 'X' is taken from
 // privacy.userInteraction.document.interval pref.
 //  We also want to store the user-interaction before shutting down, and, for
 //  this reason, this class implements nsIAsyncShutdownBlocker interface.
-class UserIntractionTimer final : public Runnable,
-                                  public nsITimerCallback,
-                                  public nsIAsyncShutdownBlocker {
+class UserInteractionTimer final : public Runnable,
+                                   public nsITimerCallback,
+                                   public nsIAsyncShutdownBlocker {
  public:
   NS_DECL_ISUPPORTS_INHERITED
 
-  explicit UserIntractionTimer(Document* aDocument)
-      : Runnable("UserIntractionTimer"),
+  explicit UserInteractionTimer(Document* aDocument)
+      : Runnable("UserInteractionTimer"),
         mPrincipal(aDocument->NodePrincipal()),
         mDocument(do_GetWeakReference(aDocument)) {
     static int32_t userInteractionTimerId = 0;
     // Blocker names must be unique. Let's create it now because when needed,
     // the document could be already gone.
     mBlockerName.AppendPrintf("UserInteractionTimer %d for document %p",
                               ++userInteractionTimerId, aDocument);
   }
@@ -15413,29 +15413,29 @@ class UserIntractionTimer final : public
   NS_IMETHOD
   Run() override {
     uint32_t interval =
         StaticPrefs::privacy_userInteraction_document_interval();
     if (!interval) {
       return NS_OK;
     }
 
-    RefPtr<UserIntractionTimer> self = this;
+    RefPtr<UserInteractionTimer> self = this;
     auto raii =
         MakeScopeExit([self] { self->CancelTimerAndStoreUserInteraction(); });
 
     nsresult rv = NS_NewTimerWithCallback(
         getter_AddRefs(mTimer), this, interval * 1000, nsITimer::TYPE_ONE_SHOT);
     NS_ENSURE_SUCCESS(rv, NS_OK);
 
     nsCOMPtr<nsIAsyncShutdownClient> phase = GetShutdownPhase();
     NS_ENSURE_TRUE(!!phase, NS_OK);
 
     rv = phase->AddBlocker(this, NS_LITERAL_STRING_FROM_CSTRING(__FILE__),
-                           __LINE__, u"UserIntractionTimer shutdown"_ns);
+                           __LINE__, u"UserInteractionTimer shutdown"_ns);
     NS_ENSURE_SUCCESS(rv, NS_OK);
 
     raii.release();
     return NS_OK;
   }
 
   // nsITimerCallback interface
 
@@ -15462,17 +15462,17 @@ class UserIntractionTimer final : public
     CancelTimerAndStoreUserInteraction();
     return NS_OK;
   }
 
   NS_IMETHOD
   GetState(nsIPropertyBag**) override { return NS_OK; }
 
  private:
-  ~UserIntractionTimer() = default;
+  ~UserInteractionTimer() = default;
 
   void StoreUserInteraction() {
     // Remove the shutting down blocker
     nsCOMPtr<nsIAsyncShutdownClient> phase = GetShutdownPhase();
     if (phase) {
       phase->RemoveBlocker(this);
     }
 
@@ -15507,17 +15507,17 @@ class UserIntractionTimer final : public
   nsCOMPtr<nsIPrincipal> mPrincipal;
   nsWeakPtr mDocument;
 
   nsCOMPtr<nsITimer> mTimer;
 
   nsString mBlockerName;
 };
 
-NS_IMPL_ISUPPORTS_INHERITED(UserIntractionTimer, Runnable, nsITimerCallback,
+NS_IMPL_ISUPPORTS_INHERITED(UserInteractionTimer, Runnable, nsITimerCallback,
                             nsIAsyncShutdownBlocker)
 
 }  // namespace
 
 void Document::MaybeStoreUserInteractionAsPermission() {
   // We care about user-interaction stored only for top-level documents.
   if (!IsTopLevelContentDocument()) {
     return;
@@ -15528,17 +15528,17 @@ void Document::MaybeStoreUserInteraction
     ContentBlockingUserInteraction::Observe(NodePrincipal());
     return;
   }
 
   if (mHasUserInteractionTimerScheduled) {
     return;
   }
 
-  nsCOMPtr<nsIRunnable> task = new UserIntractionTimer(this);
+  nsCOMPtr<nsIRunnable> task = new UserInteractionTimer(this);
   nsresult rv = NS_DispatchToCurrentThreadQueue(task.forget(), 2500,
                                                 EventQueuePriority::Idle);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return;
   }
 
   // This value will be reset by the timer.
   mHasUserInteractionTimerScheduled = true;