Bug 1446568: Remove an unneeded cast. r=smaug draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 15 Mar 2018 18:45:29 +0100
changeset 768877 6c5d2cd2e61b92ad2933395fea891a995136f255
parent 768876 f5cad5baa6b49d388673d1d0c6a41cacd4592649
child 768878 dfe32f2fe3cb5823529fcf3a29ea1e6a76dd3b53
push id102997
push userbmo:emilio@crisal.io
push dateSat, 17 Mar 2018 00:00:09 +0000
reviewerssmaug
bugs1446568
milestone61.0a1
Bug 1446568: Remove an unneeded cast. r=smaug MozReview-Commit-ID: ILtm9ybRwJ7
dom/base/nsDocument.cpp
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -9935,17 +9935,17 @@ nsIDocument::WarnOnceAbout(DeprecatedOpe
   MOZ_ASSERT(NS_IsMainThread());
   if (HasWarnedAbout(aOperation)) {
     return;
   }
   mDeprecationWarnedAbout[aOperation] = true;
   // Don't count deprecated operations for about pages since those pages
   // are almost in our control, and we always need to remove uses there
   // before we remove the operation itself anyway.
-  if (!static_cast<const nsDocument*>(this)->IsAboutPage()) {
+  if (!IsAboutPage()) {
     const_cast<nsIDocument*>(this)->
       SetDocumentAndPageUseCounter(OperationToUseCounter(aOperation));
   }
   uint32_t flags = asError ? nsIScriptError::errorFlag
                            : nsIScriptError::warningFlag;
   nsContentUtils::ReportToConsole(flags,
                                   NS_LITERAL_CSTRING("DOM Core"), this,
                                   nsContentUtils::eDOM_PROPERTIES,