Bug 1511654 - Port bug 1505601 [Change nsIDocShell constant lists to be a CEnum type] to SeaMonkey. r=frg DONTBUILD
authorBill Gianopoulos <wgianopoulos@gmail.com>
Fri, 30 Nov 2018 18:27:03 -0500
changeset 33837 d8d0149c9c8806ff81fcdab3d18cf35f7b30083a
parent 33836 0e9bf22a6b17f5859686fd464e11f4f8a078fdc7
child 33838 a04f9cd37145330e23e94c04933ac3ab69e1608d
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersfrg
bugs1511654, 1505601
Bug 1511654 - Port bug 1505601 [Change nsIDocShell constant lists to be a CEnum type] to SeaMonkey. r=frg DONTBUILD
mailnews/base/src/nsMsgContentPolicy.cpp
--- a/mailnews/base/src/nsMsgContentPolicy.cpp
+++ b/mailnews/base/src/nsMsgContentPolicy.cpp
@@ -184,20 +184,18 @@ nsMsgContentPolicy::ShouldLoad(nsIURI   
 #ifndef MOZ_THUNDERBIRD
   // Go find out if we are dealing with mailnews. Anything else
   // isn't our concern and we accept content.
   nsCOMPtr<nsIDocShell> rootDocShell;
   rv = GetRootDocShellForContext(aRequestingContext,
                                  getter_AddRefs(rootDocShell));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  uint32_t appType;
-  rv = rootDocShell->GetAppType(&appType);
   // We only want to deal with mailnews
-  if (NS_FAILED(rv) || appType != nsIDocShell::APP_TYPE_MAIL)
+  if (rootDocShell->GetAppType() != nsIDocShell::APP_TYPE_MAIL)
     return NS_OK;
 #endif
 
   switch(aContentType) {
     // Plugins (nsIContentPolicy::TYPE_OBJECT) are blocked on document load.
   case nsIContentPolicy::TYPE_DOCUMENT:
     // At this point, we have no intention of supporting a different JS
     // setting on a subdocument, so we don't worry about TYPE_SUBDOCUMENT here.