Bug 1027993 - Remove plstr.h usages under xpfe. r=neil
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 23 Jun 2014 13:58:43 +0900
changeset 210784 a5a361e955d19f8e89d73d759cbb1415d066e95c
parent 210783 10b09f643dd60842df09a1f0e1b59a4f4f2db2f5
child 210785 a35c6a47a9299a5559d3dd6b987e58f711e25816
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersneil
bugs1027993
milestone33.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 1027993 - Remove plstr.h usages under xpfe. r=neil
xpfe/appshell/src/nsAppShellService.cpp
xpfe/appshell/src/nsWindowMediator.h
xpfe/appshell/src/nsXULWindow.cpp
xpfe/components/directory/nsDirectoryViewer.cpp
--- a/xpfe/appshell/src/nsAppShellService.cpp
+++ b/xpfe/appshell/src/nsAppShellService.cpp
@@ -15,17 +15,16 @@
 
 #include "nsIWindowMediator.h"
 #include "nsIWindowWatcher.h"
 #include "nsPIWindowWatcher.h"
 #include "nsIDOMWindow.h"
 #include "nsPIDOMWindow.h"
 #include "nsWebShellWindow.h"
 
-#include "nsCRT.h"
 #include "prprf.h"
 
 #include "nsWidgetInitData.h"
 #include "nsWidgetsCID.h"
 #include "nsIWidget.h"
 #include "nsIRequestObserver.h"
 
 /* For implementing GetHiddenWindowAndJSContext */
--- a/xpfe/appshell/src/nsWindowMediator.h
+++ b/xpfe/appshell/src/nsWindowMediator.h
@@ -8,17 +8,16 @@
 
 #include "mozilla/Mutex.h"
 #include "nsCOMPtr.h"
 #include "nsIWindowMediator.h"
 #include "nsIObserver.h"
 #include "nsTArray.h"
 #include "nsXPIDLString.h"
 #include "nsWeakReference.h"
-#include "nsCRT.h"
 #include "nsCOMArray.h"
 
 class nsAppShellWindowEnumerator;
 class nsASXULWindowEarlyToLateEnumerator;
 class nsASDOMWindowEarlyToLateEnumerator;
 class nsASDOMWindowFrontToBackEnumerator;
 class nsASXULWindowFrontToBackEnumerator;
 class nsASDOMWindowBackToFrontEnumerator;
--- a/xpfe/appshell/src/nsXULWindow.cpp
+++ b/xpfe/appshell/src/nsXULWindow.cpp
@@ -10,17 +10,16 @@
 #include "nsXULWindow.h"
 #include <algorithm>
 
 // Helper classes
 #include "nsPrintfCString.h"
 #include "nsString.h"
 #include "nsWidgetsCID.h"
 #include "prprf.h"
-#include "nsCRT.h"
 #include "nsThreadUtils.h"
 #include "nsNetCID.h"
 
 //Interfaces needed to be included
 #include "nsIAppShell.h"
 #include "nsIAppShellService.h"
 #include "nsIServiceManager.h"
 #include "nsIContentViewer.h"
--- a/xpfe/components/directory/nsDirectoryViewer.cpp
+++ b/xpfe/components/directory/nsDirectoryViewer.cpp
@@ -15,17 +15,16 @@
 
 */
 
 #include "nsDirectoryViewer.h"
 #include "nsIDirIndex.h"
 #include "nsIDocShell.h"
 #include "jsapi.h"
 #include "nsCOMPtr.h"
-#include "nsCRT.h"
 #include "nsEnumeratorUtils.h"
 #include "nsEscape.h"
 #include "nsIRDFService.h"
 #include "nsRDFCID.h"
 #include "rdf.h"
 #include "nsIScriptContext.h"
 #include "nsIScriptGlobalObject.h"
 #include "nsIServiceManager.h"
@@ -1265,17 +1264,17 @@ nsDirectoryViewerFactory::CreateInstance
                                          const char* aContentType, 
                                          nsIDocShell* aContainer,
                                          nsISupports* aExtraInfo,
                                          nsIStreamListener** aDocListenerResult,
                                          nsIContentViewer** aDocViewerResult)
 {
   nsresult rv;
 
-  bool viewSource = (PL_strstr(aContentType,"view-source") != 0);
+  bool viewSource = aContentType && strstr(aContentType, "view-source");
 
   if (!viewSource &&
       Preferences::GetInt("network.dir.format", FORMAT_XUL) == FORMAT_XUL) {
     // ... and setup the original channel's content type
     (void)aChannel->SetContentType(NS_LITERAL_CSTRING("application/vnd.mozilla.xul+xml"));
 
     // This is where we shunt the HTTP/Index stream into our datasource,
     // and open the directory viewer XUL file as the content stream to