Title: [140481] trunk/Source/WebCore
Revision
140481
Author
a...@apple.com
Date
2013-01-22 15:36:58 -0800 (Tue, 22 Jan 2013)

Log Message

        [WK2] WebProcessService is not terminated when page is closed
        https://bugs.webkit.org/show_bug.cgi?id=107595

        Reviewed by Anders Carlsson.

        * platform/mac/RunLoopMac.mm: (WebCore::RunLoop::stop): Allow stopping XPC service
        run loop. Also, harmonized NSApp vs. [NSApplication sharedApplication] usage.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (140480 => 140481)


--- trunk/Source/WebCore/ChangeLog	2013-01-22 23:33:18 UTC (rev 140480)
+++ trunk/Source/WebCore/ChangeLog	2013-01-22 23:36:58 UTC (rev 140481)
@@ -1,3 +1,13 @@
+2013-01-22  Alexey Proskuryakov  <a...@apple.com>
+
+        [WK2] WebProcessService is not terminated when page is closed
+        https://bugs.webkit.org/show_bug.cgi?id=107595
+
+        Reviewed by Anders Carlsson.
+
+        * platform/mac/RunLoopMac.mm: (WebCore::RunLoop::stop): Allow stopping XPC service
+        run loop. Also, harmonized NSApp vs. [NSApplication sharedApplication] usage.
+
 2013-01-22  Ojan Vafai  <o...@chromium.org>
 
         REGRESION(r130774): preferred width of tables does not take max-width into account

Modified: trunk/Source/WebCore/platform/mac/RunLoopMac.mm (140480 => 140481)


--- trunk/Source/WebCore/platform/mac/RunLoopMac.mm	2013-01-22 23:33:18 UTC (rev 140480)
+++ trunk/Source/WebCore/platform/mac/RunLoopMac.mm	2013-01-22 23:36:58 UTC (rev 140481)
@@ -52,9 +52,11 @@
 void RunLoop::stop()
 {
     ASSERT(m_runLoop == CFRunLoopGetCurrent());
-    
-    if (m_runLoop == main()->m_runLoop && m_nestingLevel == 1 && s_useApplicationRunLoopOnMainRunLoop) {
-        [[NSApplication sharedApplication] stop:nil];
+
+    // Nesting level can be 0 if the run loop is started externally (such as the case for XPC services).
+    if (m_runLoop == main()->m_runLoop && m_nestingLevel <= 1 && s_useApplicationRunLoopOnMainRunLoop) {
+        ASSERT([NSApp isRunning]);
+        [NSApp stop:nil];
         NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined
                                             location:NSMakePoint(0, 0)
                                        modifierFlags:0
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to