Bug 510025 - make TestShell a subprotocol of ContentProcess so that it is useful for prototyping
authorBenjamin Smedberg <benjamin@smedbergs.us>
Wed, 12 Aug 2009 14:31:48 -0400
changeset 35851 f2966b784f9bdfd679517753b07bd85ee63b0f56
parent 35850 c20a46f6c859cb81dd2829b21616573a6f57a92d
child 35852 f5fc729e59a734dce1cb6362a2ac26ee7f9c2f06
push idunknown
push userunknown
push dateunknown
bugs510025
milestone1.9.2a1pre
Bug 510025 - make TestShell a subprotocol of ContentProcess so that it is useful for prototyping
dom/ipc/ContentProcess.ipdl
dom/ipc/ContentProcessChild.cpp
dom/ipc/ContentProcessChild.h
dom/ipc/ContentProcessParent.cpp
dom/ipc/ContentProcessParent.h
ipc/glue/ScopedXREEmbed.cpp
ipc/ipdl/ipdl/cxx/ast.py
ipc/ipdl/ipdl/cxx/cgen.py
ipc/testshell/Makefile.in
ipc/testshell/TestShell.ipdl
ipc/testshell/TestShellChild.cpp
ipc/testshell/TestShellThread.cpp
ipc/testshell/TestShellThread.h
toolkit/xre/nsEmbedFunctions.cpp
xpcom/build/nsXULAppAPI.h
--- a/dom/ipc/ContentProcess.ipdl
+++ b/dom/ipc/ContentProcess.ipdl
@@ -1,22 +1,27 @@
 /* -*- Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 8 -*- */
 
 include protocol "IFrameEmbedding.ipdl";
+include protocol "TestShell.ipdl";
 
 include "mozilla/TabTypes.h";
 
 using MagicWindowHandle;
 
 namespace mozilla {
 namespace dom {
 
-async protocol ContentProcess
+sync protocol ContentProcess
 {
     manages IFrameEmbedding;
+    manages TestShell;
 
 child:
     IFrameEmbedding(MagicWindowHandle parentWidget);
     ~IFrameEmbedding();
+
+    TestShell();
+    ~TestShell();
 };
 
 }
 }
--- a/dom/ipc/ContentProcessChild.cpp
+++ b/dom/ipc/ContentProcessChild.cpp
@@ -1,14 +1,18 @@
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* vim: sw=4 ts=4 et : */
 
 #include "ContentProcessChild.h"
 #include "TabChild.h"
 
+#include "mozilla/ipc/TestShellChild.h"
+
+using namespace mozilla::ipc;
+
 namespace mozilla {
 namespace dom {
 
 ContentProcessChild* ContentProcessChild::sSingleton;
 
 ContentProcessChild::ContentProcessChild()
 {
 }
@@ -36,10 +40,23 @@ ContentProcessChild::IFrameEmbeddingCons
 
 nsresult
 ContentProcessChild::IFrameEmbeddingDestructor(IFrameEmbeddingProtocolChild* iframe)
 {
     delete iframe;
     return NS_OK;
 }
 
+TestShellProtocolChild*
+ContentProcessChild::TestShellConstructor()
+{
+  return new TestShellChild();
+}
+
+nsresult
+ContentProcessChild::TestShellDestructor(TestShellProtocolChild* shell)
+{
+  delete shell;
+  return NS_OK;
+}
+
 } // namespace dom
 } // namespace mozilla
--- a/dom/ipc/ContentProcessChild.h
+++ b/dom/ipc/ContentProcessChild.h
@@ -21,16 +21,19 @@ public:
     static ContentProcessChild* GetSingleton() {
         NS_ASSERTION(sSingleton, "not initialized");
         return sSingleton;
     }
 
     virtual IFrameEmbeddingProtocolChild* IFrameEmbeddingConstructor(const MagicWindowHandle& hwnd);
     virtual nsresult IFrameEmbeddingDestructor(IFrameEmbeddingProtocolChild*);
 
+  virtual TestShellProtocolChild* TestShellConstructor();
+  virtual nsresult TestShellDestructor(TestShellProtocolChild*);
+
 private:
     static ContentProcessChild* sSingleton;
 
     DISALLOW_EVIL_CONSTRUCTORS(ContentProcessChild);
 };
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/ipc/ContentProcessParent.cpp
+++ b/dom/ipc/ContentProcessParent.cpp
@@ -1,15 +1,16 @@
 #include "ContentProcessParent.h"
-#include "TabParent.h"
 
 #include "mozilla/ipc/GeckoThread.h"
 
-using mozilla::ipc::BrowserProcessSubThread;
-using mozilla::dom::TabParent;
+#include "TabParent.h"
+#include "mozilla/ipc/TestShellParent.h"
+
+using namespace mozilla::ipc;
 
 namespace mozilla {
 namespace dom {
 
 ContentProcessParent* ContentProcessParent::gSingleton;
 
 ContentProcessParent*
 ContentProcessParent::GetSingleton()
@@ -21,16 +22,22 @@ ContentProcessParent::GetSingleton()
 }
 
 TabParent*
 ContentProcessParent::CreateTab(const MagicWindowHandle& hwnd)
 {
   return static_cast<TabParent*>(SendIFrameEmbeddingConstructor(hwnd));
 }
 
+TestShellParent*
+ContentProcessParent::CreateTestShell()
+{
+  return static_cast<TestShellParent*>(SendTestShellConstructor());
+}
+
 ContentProcessParent::ContentProcessParent()
     : mSubprocess(GeckoChildProcess_Tab)
 {
     // TODO: async launching!
     mSubprocess.SyncLaunch();
     Open(mSubprocess.GetChannel());
 }
 
@@ -46,10 +53,23 @@ ContentProcessParent::IFrameEmbeddingCon
 
 nsresult
 ContentProcessParent::IFrameEmbeddingDestructor(IFrameEmbeddingProtocolParent* frame)
 {
   delete frame;
   return NS_OK;
 }
 
+TestShellProtocolParent*
+ContentProcessParent::TestShellConstructor()
+{
+  return new TestShellParent();
+}
+
+nsresult
+ContentProcessParent::TestShellDestructor(TestShellProtocolParent* shell)
+{
+  delete shell;
+  return NS_OK;
+}
+
 } // namespace dom
 } // namespace mozilla
--- a/dom/ipc/ContentProcessParent.h
+++ b/dom/ipc/ContentProcessParent.h
@@ -3,16 +3,20 @@
 
 #ifndef mozilla_dom_ContentProcessParent_h
 #define mozilla_dom_ContentProcessParent_h
 
 #include "mozilla/dom/ContentProcessProtocolParent.h"
 #include "mozilla/ipc/GeckoChildProcessHost.h"
 
 namespace mozilla {
+namespace ipc {
+class TestShellParent;
+}
+
 namespace dom {
 
 class TabParent;
 
 class ContentProcessParent
     : private ContentProcessProtocolParent
 {
 private:
@@ -22,29 +26,34 @@ public:
     static ContentProcessParent* GetSingleton();
 
 #if 0
     // TODO: implement this somewhere!
     static ContentProcessParent* FreeSingleton();
 #endif
 
     TabParent* CreateTab(const MagicWindowHandle& hwnd);
+    mozilla::ipc::TestShellParent* CreateTestShell();
 
 private:
     static ContentProcessParent* gSingleton;
 
-    // hide SendIFrameEmbeddingConstructor since we don't want client code
-    // using it
+    // Hide the raw constructor methods since we don't want client code
+    // using them.
     using ContentProcessProtocolParent::SendIFrameEmbeddingConstructor;
+    using ContentProcessProtocolParent::SendTestShellConstructor;
 
     ContentProcessParent();
     virtual ~ContentProcessParent();
 
     virtual IFrameEmbeddingProtocolParent* IFrameEmbeddingConstructor(const MagicWindowHandle& parentWidget);
     virtual nsresult IFrameEmbeddingDestructor(IFrameEmbeddingProtocolParent* frame);
 
+    virtual TestShellProtocolParent* TestShellConstructor();
+    virtual nsresult TestShellDestructor(TestShellProtocolParent* shell);
+
     GeckoChildProcessHost mSubprocess;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif
--- a/ipc/glue/ScopedXREEmbed.cpp
+++ b/ipc/glue/ScopedXREEmbed.cpp
@@ -47,21 +47,23 @@
 #include "nsStringGlue.h"
 #include "nsXULAppAPI.h"
 
 using mozilla::ipc::ScopedXREEmbed;
 
 ScopedXREEmbed::ScopedXREEmbed()
 : mShouldKillEmbedding(false)
 {
+  NS_LogInit();
 }
 
 ScopedXREEmbed::~ScopedXREEmbed()
 {
   Stop();
+  NS_LogTerm();
 }
 
 void
 ScopedXREEmbed::Start()
 {
   std::string path = WideToUTF8(CommandLine::ForCurrentProcess()->program());
 
   nsCOMPtr<nsILocalFile> localFile;
--- a/ipc/ipdl/ipdl/cxx/ast.py
+++ b/ipc/ipdl/ipdl/cxx/ast.py
@@ -303,16 +303,17 @@ class Inherit(Node):
     def __init__(self, name, viz='public'):
         Node.__init__(self)
         self.name = name
         self.viz = viz
 
 class FriendClassDecl(Node):
     def __init__(self, friend):
         Node.__init__(self)
+        print "FriendClassDecl: %r" % friend
         self.friend = friend
 
 class MethodDecl(Node):
     def __init__(self, name, params=[ ], ret=Type('void'),
                  virtual=False, const=False, pure=False, static=False):
         assert not (virtual and static)
         assert not pure or virtual # pure => virtual
 
--- a/ipc/ipdl/ipdl/cxx/cgen.py
+++ b/ipc/ipdl/ipdl/cxx/cgen.py
@@ -129,16 +129,17 @@ class CxxCodeGen(CodePrinter, Visitor):
 
         self.dedent()
         self.printdentln('};')
 
     def visitInherit(self, inh):
         self.write(inh.viz +' '+ inh.name)
 
     def visitFriendClassDecl(self, fcd):
+        print >>sys.stderr, "visitFriendClassDecl: %r" % fcd
         self.printdentln('friend class '+ fcd.friend +';')
 
     def visitMethodDecl(self, md):
         assert not (md.static and md.virtual)
         if md.static:
             self.write('static ')
         if md.virtual:
             self.write('virtual ')
--- a/ipc/testshell/Makefile.in
+++ b/ipc/testshell/Makefile.in
@@ -47,24 +47,22 @@ FORCE_STATIC_LIB = 1
 LIBXUL_LIBRARY = 1
 EXPORT_LIBRARY = 1
 
 EXPORTS_NAMESPACES = mozilla/ipc
 
 EXPORTS_mozilla/ipc = \
   TestShellChild.h \
   TestShellParent.h \
-  TestShellThread.h \
   XPCShellEnvironment.h \
   $(NULL)
 
 CPPSRCS += \
   TestShellChild.cpp \
   TestShellParent.cpp \
-  TestShellThread.cpp \
   XPCShellEnvironment.cpp \
   $(NULL)
 
 
 # For xpcshell error messages and nsDependentJSString
 LOCAL_INCLUDES += \
   -I$(topsrcdir)/js/src/xpconnect/shell \
   -I$(topsrcdir)/dom/base \
--- a/ipc/testshell/TestShell.ipdl
+++ b/ipc/testshell/TestShell.ipdl
@@ -1,8 +1,9 @@
+/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
 /* ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  *
  * The contents of this file are subject to the Mozilla Public License Version
  * 1.1 (the "License"); you may not use this file except in compliance with
  * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
  *
@@ -29,20 +30,24 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
+include protocol "ContentProcess.ipdl";
+
 namespace mozilla {
 namespace ipc {
 
 sync protocol TestShell
 {
-  child:
-    async SendCommand(nsString aCommand);
-    sync SendCommandWithResponse(nsString aCommand) returns (nsString aResponse);
+  manager ContentProcess;
+
+child:
+  async SendCommand(nsString aCommand);
+  sync SendCommandWithResponse(nsString aCommand) returns (nsString aResponse);
 };
 
 } // namespace ipc
 } // namespace mozilla
--- a/ipc/testshell/TestShellChild.cpp
+++ b/ipc/testshell/TestShellChild.cpp
@@ -37,17 +37,17 @@
 #include "TestShellChild.h"
 
 #include "XPCShellEnvironment.h"
 
 using mozilla::ipc::TestShellChild;
 using mozilla::ipc::XPCShellEnvironment;
 
 TestShellChild::TestShellChild()
-: mXPCShell(nsnull)
+  : mXPCShell(XPCShellEnvironment::CreateEnvironment())
 {
 
 }
 
 TestShellChild::~TestShellChild()
 {
 
 }
deleted file mode 100644
--- a/ipc/testshell/TestShellThread.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla IPCShell.
- *
- * The Initial Developer of the Original Code is
- *   Ben Turner <bent.mozilla@gmail.com>.
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "TestShellThread.h"
-
-#include "XPCShellEnvironment.h"
-
-#include "base/message_loop.h"
-
-using mozilla::ipc::TestShellThread;
-using mozilla::ipc::XPCShellEnvironment;
-
-TestShellThread::TestShellThread()
-: mXPCShell(nsnull)
-{
-
-}
-
-TestShellThread::~TestShellThread()
-{
-
-}
-
-void
-TestShellThread::Init()
-{
-    GeckoThread::Init();
-    mXPCShell = XPCShellEnvironment::CreateEnvironment();
-    if (mXPCShell && mXPCShell->DefineIPCCommands(&mTestShellChild)) {
-        if (mTestShellChild.Open(channel(), owner_loop())) {
-            mTestShellChild.SetXPCShell(mXPCShell);
-        }
-    }
-}
-
-void
-TestShellThread::CleanUp()
-{
-    if (mXPCShell) {
-        XPCShellEnvironment::DestroyEnvironment(mXPCShell);
-        mTestShellChild.Close();
-    }
-    GeckoThread::CleanUp();
-}
deleted file mode 100644
--- a/ipc/testshell/TestShellThread.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla IPCShell.
- *
- * The Initial Developer of the Original Code is
- *   Ben Turner <bent.mozilla@gmail.com>.
- * Portions created by the Initial Developer are Copyright (C) 2009
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef _IPC_TESTSHELL_TESTSHELLTHREAD_H_
-#define _IPC_TESTSHELL_TESTSHELLTHREAD_H_
-
-#include "mozilla/ipc/GeckoThread.h"
-#include "TestShellChild.h"
-
-namespace mozilla {
-namespace ipc {
-
-class XPCShellEnvironment;
-
-class TestShellThread : public GeckoThread
-{
-public:
-    TestShellThread();
-    ~TestShellThread();
-
-protected:
-    virtual void Init();
-    virtual void CleanUp();
-
-private:
-    XPCShellEnvironment* mXPCShell;
-    TestShellChild mTestShellChild;
-};
-
-} /* namespace ipc */
-} /* namespace mozilla */
-
-#endif /* _IPC_TESTSHELL_TESTSHELLTHREAD_H_ */
\ No newline at end of file
--- a/toolkit/xre/nsEmbedFunctions.cpp
+++ b/toolkit/xre/nsEmbedFunctions.cpp
@@ -66,34 +66,34 @@
 #include "chrome/common/child_process.h"
 
 #include "mozilla/ipc/GeckoChildProcessHost.h"
 #include "mozilla/ipc/GeckoThread.h"
 #include "ScopedXREEmbed.h"
 
 #include "mozilla/plugins/PluginThreadChild.h"
 #include "ContentProcessThread.h"
+#include "ContentProcessParent.h"
 
 #include "mozilla/ipc/TestShellParent.h"
-#include "mozilla/ipc/TestShellThread.h"
 #include "mozilla/ipc/XPCShellEnvironment.h"
 #include "mozilla/test/TestParent.h"
 #include "mozilla/test/TestProcessParent.h"
 #include "mozilla/test/TestThreadChild.h"
 #include "mozilla/Monitor.h"
 
 using mozilla::ipc::BrowserProcessSubThread;
 using mozilla::ipc::GeckoChildProcessHost;
 using mozilla::ipc::GeckoThread;
 using mozilla::ipc::ScopedXREEmbed;
 
 using mozilla::plugins::PluginThreadChild;
 using mozilla::dom::ContentProcessThread;
+using mozilla::dom::ContentProcessParent;
 using mozilla::ipc::TestShellParent;
-using mozilla::ipc::TestShellThread;
 using mozilla::ipc::XPCShellEnvironment;
 
 using mozilla::test::TestParent;
 using mozilla::test::TestProcessParent;
 using mozilla::test::TestThreadChild;
 
 using mozilla::Monitor;
 using mozilla::MonitorAutoEnter;
@@ -269,20 +269,16 @@ XRE_InitChildProcess(int aArgc,
     case GeckoChildProcess_Tab:
       mainThread = new ContentProcessThread();
       break;
 
     case GeckoChildProcess_TestHarness:
       mainThread = new TestThreadChild();
       break;
 
-    case GeckoChildProcess_TestShell:
-      mainThread = new TestShellThread();
-      break;
-
     default:
       NS_RUNTIMEABORT("Unknown main thread class");
     }
 
     ChildProcess process(mainThread);
 
     // Do IPC event loop
     MessageLoop::current()->Run();
@@ -327,16 +323,17 @@ XRE_InitParentProcess(int aArgc,
                       void* aMainFunctionData)
 {
   NS_ENSURE_ARG_MIN(aArgc, 1);
   NS_ENSURE_ARG_POINTER(aArgv);
   NS_ENSURE_ARG_POINTER(aArgv[0]);
 
   base::AtExitManager exitManager;
   CommandLine::Init(aArgc, aArgv);
+  ScopedXREEmbed embed;
   MessageLoopForUI mainMessageLoop;
 
   {
     // Make chromium's IPC thread
 #if defined(OS_LINUX)
     // The lifetime of the BACKGROUND_X11 thread is a subset of the IO thread so
     // we start it now.
     scoped_ptr<base::Thread> x11Thread(
@@ -350,17 +347,16 @@ XRE_InitParentProcess(int aArgc,
       new BrowserProcessSubThread(BrowserProcessSubThread::IO));
     base::Thread::Options options;
     options.message_loop_type = MessageLoop::TYPE_IO;
     if (NS_UNLIKELY(!ipcThread->StartWithOptions(options))) {
       NS_ERROR("Failed to create chromium's IO thread!");
       return NS_ERROR_FAILURE;
     }
 
-    ScopedXREEmbed embed;
     embed.Start();
 
     nsCOMPtr<nsIAppShell> appShell(do_GetService(kAppShellCID));
     NS_ENSURE_TRUE(appShell, NS_ERROR_FAILURE);
 
     if (aMainFunction) {
       nsCOMPtr<nsIRunnable> runnable =
         new MainFunctionRunnable(aMainFunction, aMainFunctionData);
@@ -411,39 +407,23 @@ TestShellMain(int argc, char** argv)
   NS_ENSURE_TRUE(quitRunnable, 1);
 
   nsresult rv = NS_DispatchToCurrentThread(quitRunnable);
   NS_ENSURE_SUCCESS(rv, 1);
 
   nsAutoRef<XPCShellEnvironment> env(XPCShellEnvironment::CreateEnvironment());
   NS_ENSURE_TRUE(env, 1);
 
-  GeckoChildProcessHost* host =
-    new GeckoChildProcessHost(GeckoChildProcess_TestShell);
-  NS_ENSURE_TRUE(host, 1);
-
-  if (!host->SyncLaunch()) {
-    NS_WARNING("Failed to launch child process!");
-    delete host;
+  ContentProcessParent* childProcess = ContentProcessParent::GetSingleton();
+  if (!childProcess)
     return 1;
-  }
 
-  IPC::Channel* channel = host->GetChannel();
-  NS_ENSURE_TRUE(channel, 1);
+  TestShellParent* testShellParent = childProcess->CreateTestShell();
 
-  TestShellParent testShellParent;
-  if (!testShellParent.Open(channel)) {
-    NS_WARNING("Failed to open channel!");
-    return 1;
-  }
-
-  if (!env->DefineIPCCommands(&testShellParent)) {
-    NS_WARNING("DefineChildObject failed!");
-    return 1;
-  }
+  env->DefineIPCCommands(testShellParent);
 
   const char* filename = argc > 1 ? argv[1] : nsnull;
   env->Process(filename);
 
   return env->ExitCode();
 }
 
 struct TestShellData {
--- a/xpcom/build/nsXULAppAPI.h
+++ b/xpcom/build/nsXULAppAPI.h
@@ -421,28 +421,26 @@ XRE_API(void,
 
 enum GeckoChildProcessType {
   GeckoChildProcess_Default = 0,
 
   GeckoChildProcess_Plugin,
   GeckoChildProcess_Tab,
 
   GeckoChildProcess_TestHarness,
-  GeckoChildProcess_TestShell,
 
   GeckoChildProcess_End,
   GeckoChildProcess_Invalid = GeckoChildProcess_End
 };
 
 static const char* const kGeckoChildProcessTypeString[] = {
   "default",
   "plugin",
   "tab",
   "testharness",
-  "testshell"
 };
 
 PR_STATIC_ASSERT(sizeof(kGeckoChildProcessTypeString) /
                  sizeof(kGeckoChildProcessTypeString[0]) ==
                  GeckoChildProcess_End);
 
 
 XRE_API(const char*,