@@ -795,7 +795,7 @@ already_AddRefed<Promise> ChromeUtils::RequestProcInfo(GlobalObject& aGlobal,
795795 global->EventTargetFor (TaskCategory::Performance);
796796
797797 // Getting the parent proc info
798- mozilla::GetProcInfo (parentPid, 0 , mozilla::ProcType::Browser, u "" _ns)
798+ mozilla::GetProcInfo (parentPid, 0 , mozilla::ProcType::Browser, " " _ns)
799799 ->Then (
800800 target, __func__,
801801 [target, domPromise, parentPid](ProcInfo aParentInfo) {
@@ -809,7 +809,7 @@ already_AddRefed<Promise> ChromeUtils::RequestProcInfo(GlobalObject& aGlobal,
809809 if (!aGeckoProcess->GetChildProcessHandle ()) {
810810 return ;
811811 }
812- nsAutoString origin;
812+ nsAutoCString origin;
813813 base::ProcessId childPid =
814814 base::GetProcId (aGeckoProcess->GetChildProcessHandle ());
815815 int32_t childId = 0 ;
@@ -832,50 +832,42 @@ already_AddRefed<Promise> ChromeUtils::RequestProcInfo(GlobalObject& aGlobal,
832832 // Converting the remoteType into a ProcType.
833833 // Ideally, the remoteType should be strongly typed
834834 // upstream, this would make the conversion less brittle.
835- nsAutoString remoteType (contentParent->GetRemoteType ());
835+ nsAutoCString remoteType (contentParent->GetRemoteType ());
836836 if (StringBeginsWith (remoteType,
837- NS_LITERAL_STRING_FROM_CSTRING (
838- FISSION_WEB_REMOTE_TYPE))) {
837+ FISSION_WEB_REMOTE_TYPE)) {
839838 // WARNING: Do not change the order, as
840839 // `DEFAULT_REMOTE_TYPE` is a prefix of
841840 // `FISSION_WEB_REMOTE_TYPE`.
842841 type = mozilla::ProcType::WebIsolated;
843- } else if (StringBeginsWith (
844- remoteType, NS_LITERAL_STRING_FROM_CSTRING(
845- DEFAULT_REMOTE_TYPE))) {
842+ } else if (StringBeginsWith (remoteType,
843+ DEFAULT_REMOTE_TYPE)) {
846844 type = mozilla::ProcType::Web;
847- } else if (remoteType. EqualsLiteral ( FILE_REMOTE_TYPE) ) {
845+ } else if (remoteType == FILE_REMOTE_TYPE) {
848846 type = mozilla::ProcType::File;
849- } else if (remoteType.EqualsLiteral (
850- EXTENSION_REMOTE_TYPE)) {
847+ } else if (remoteType == EXTENSION_REMOTE_TYPE) {
851848 type = mozilla::ProcType::Extension;
852- } else if (remoteType.EqualsLiteral (
853- PRIVILEGEDABOUT_REMOTE_TYPE)) {
849+ } else if (remoteType == PRIVILEGEDABOUT_REMOTE_TYPE) {
854850 type = mozilla::ProcType::PrivilegedAbout;
855- } else if (remoteType.EqualsLiteral (
856- PRIVILEGEDMOZILLA_REMOTE_TYPE)) {
851+ } else if (remoteType == PRIVILEGEDMOZILLA_REMOTE_TYPE) {
857852 type = mozilla::ProcType::PrivilegedMozilla;
858853 } else if (StringBeginsWith (
859854 remoteType,
860- NS_LITERAL_STRING_FROM_CSTRING (
861- WITH_COOP_COEP_REMOTE_TYPE_PREFIX))) {
855+ WITH_COOP_COEP_REMOTE_TYPE_PREFIX)) {
862856 type = mozilla::ProcType::WebCOOPCOEP;
863- } else if (remoteType.EqualsLiteral (
864- LARGE_ALLOCATION_REMOTE_TYPE)) {
857+ } else if (remoteType == LARGE_ALLOCATION_REMOTE_TYPE) {
865858 type = mozilla::ProcType::WebLargeAllocation;
866- } else if (remoteType.EqualsLiteral (
867- PREALLOC_REMOTE_TYPE)) {
859+ } else if (remoteType == PREALLOC_REMOTE_TYPE) {
868860 type = mozilla::ProcType::Preallocated;
869861 } else {
870862 MOZ_CRASH (" Unknown remoteType" );
871863 }
872864
873865 // By convention, everything after '=' is the origin.
874- nsAString ::const_iterator cursor;
875- nsAString ::const_iterator end;
866+ nsACString ::const_iterator cursor;
867+ nsACString ::const_iterator end;
876868 remoteType.BeginReading (cursor);
877869 remoteType.EndReading (end);
878- if (FindCharInReadable (u ' =' , cursor, end)) {
870+ if (FindCharInReadable (' =' , cursor, end)) {
879871 origin = Substring (++cursor, end);
880872 }
881873 childId = contentParent->ChildID ();
0 commit comments