Index: /trunk/src/VBox/Main/glue/NativeEventQueue.cpp
===================================================================
--- /trunk/src/VBox/Main/glue/NativeEventQueue.cpp	(revision 46650)
+++ /trunk/src/VBox/Main/glue/NativeEventQueue.cpp	(revision 46651)
@@ -81,6 +81,6 @@
 struct MyPLEvent : public PLEvent
 {
-    MyPLEvent(Event *e) : event(e) {}
-    Event *event;
+    MyPLEvent(NativeEvent *e) : event(e) {}
+    NativeEvent *event;
 };
 
@@ -88,5 +88,5 @@
 void *PR_CALLBACK com::NativeEventQueue::plEventHandler(PLEvent *self)
 {
-    Event *ev = ((MyPLEvent *)self)->event;
+    NativeEvent *ev = ((MyPLEvent *)self)->event;
     if (ev)
         ev->handler();
@@ -103,5 +103,5 @@
 void PR_CALLBACK com::NativeEventQueue::plEventDestructor(PLEvent *self)
 {
-    Event *ev = ((MyPLEvent *)self)->event;
+    NativeEvent *ev = ((MyPLEvent *)self)->event;
     if (ev)
         delete ev;
@@ -222,5 +222,5 @@
         /* Check that it actually is the main event queue, i.e. that
            we're called on the right thread. */
-        nsCOMPtr<nsINativeEventQueue> q;
+        nsCOMPtr<nsIEventQueue> q;
         nsresult rv = NS_GetMainEventQ(getter_AddRefs(q));
         Assert(NS_SUCCEEDED(rv));
@@ -646,5 +646,5 @@
 {
 #ifdef VBOX_WITH_XPCOM
-    return mEventQ->GetNativeEventQueueSelectFD();
+    return mEventQ->GetEventQueueSelectFD();
 #else
     return -1;
Index: /trunk/src/VBox/Main/glue/initterm.cpp
===================================================================
--- /trunk/src/VBox/Main/glue/initterm.cpp	(revision 46650)
+++ /trunk/src/VBox/Main/glue/initterm.cpp	(revision 46651)
@@ -556,5 +556,5 @@
             if (--gXPCOMInitCount == 0)
             {
-                MainEventQueue::uninit();
+                NativeEventQueue::uninit();
                 rc = NS_ShutdownXPCOM(nsnull);
 
Index: /trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp	(revision 46650)
+++ /trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp	(revision 46651)
@@ -5380,6 +5380,14 @@
          * See @bugref{5724}.
          */
-        while (pEventQueue->processEventQueue(RT_INDEFINITE_WAIT) != VERR_INTERRUPTED)
-            /* nothing */ ;
+        for (;;)
+        {
+            rc = pEventQueue->processEventQueue(RT_INDEFINITE_WAIT);
+            if (rc == VERR_INTERRUPTED)
+            {
+                LogFlow(("Event queue processing ended with rc=%Rrc\n", rc));
+                rc = VINF_SUCCESS; /* Set success when exiting. */
+                break;
+            }
+        }
 
         delete pEventQueue;
Index: /trunk/src/VBox/Main/webservice/vboxweb.cpp
===================================================================
--- /trunk/src/VBox/Main/webservice/vboxweb.cpp	(revision 46650)
+++ /trunk/src/VBox/Main/webservice/vboxweb.cpp	(revision 46651)
@@ -26,6 +26,6 @@
 #include <VBox/com/ErrorInfo.h>
 #include <VBox/com/errorprint.h>
-#include <VBox/com/EventQueue.h>
 #include <VBox/com/listeners.h>
+#include <VBox/com/NativeEventQueue.h>
 #include <VBox/VBoxAuth.h>
 #include <VBox/version.h>
@@ -1232,5 +1232,5 @@
     }
 
-    com::EventQueue *pQ = com::EventQueue::getMainEventQueue();
+    com::NativeEventQueue *pQ = com::NativeEventQueue::getMainEventQueue();
     for (;;)
     {
