2009-04-29 John Abd-El-Malek <jam@chromium.org>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Apr 2009 20:12:54 +0000 (20:12 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Apr 2009 20:12:54 +0000 (20:12 +0000)
        Reviewed by Darin Adler.

        Expose sudden termination to Chromium port.
        https://bugs.webkit.org/show_bug.cgi?id=25457

        * platform/SuddenTermination.h:
        * platform/chromium/ChromiumBridge.h:
        * platform/chromium/SuddenTerminationChromium.cpp: Added.
        (WebCore::disableSuddenTermination):
        (WebCore::enableSuddenTermination):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@43001 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/SuddenTermination.h
WebCore/platform/chromium/ChromiumBridge.h
WebCore/platform/chromium/SuddenTerminationChromium.cpp [new file with mode: 0644]

index ec2cb12fc1de747465a26138b10537f8eebf48f6..c8efa04dd823d92d8139e225cd6723bda73b0248 100644 (file)
@@ -1,3 +1,16 @@
+2009-04-29  John Abd-El-Malek  <jam@chromium.org>
+
+        Reviewed by Darin Adler.
+
+        Expose sudden termination to Chromium port.
+        https://bugs.webkit.org/show_bug.cgi?id=25457
+
+        * platform/SuddenTermination.h:
+        * platform/chromium/ChromiumBridge.h:
+        * platform/chromium/SuddenTerminationChromium.cpp: Added.
+        (WebCore::disableSuddenTermination):
+        (WebCore::enableSuddenTermination):
+
 2009-04-29  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Dimitri Glazkov.
index f7c6fbc3dcd9621a482f8c9bc232bafd8e16c6dc..71711024615ca9b9b43d9d4d7e4ab6e103a7f18e 100644 (file)
@@ -33,7 +33,7 @@ namespace WebCore {
     void disableSuddenTermination();
     void enableSuddenTermination();
 
-#if !PLATFORM(MAC) || defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)
+#if (!PLATFORM(MAC) || defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD)) && !PLATFORM(CHROMIUM)
     inline void disableSuddenTermination() { }
     inline void enableSuddenTermination() { }
 #endif
index 3e5c40433fd02a5bce4a89aaedcfc01d56d4a477..379546d3316d1c7814b03a0b7e634c60ad44b2ff 100644 (file)
@@ -135,6 +135,9 @@ namespace WebCore {
         static void decrementStatsCounter(const char* name);
         static void incrementStatsCounter(const char* name);
 
+        // Sudden Termination
+        static void suddenTerminationChanged(bool enabled);
+
         // SystemTime ---------------------------------------------------------
         static double currentTime();
 
diff --git a/WebCore/platform/chromium/SuddenTerminationChromium.cpp b/WebCore/platform/chromium/SuddenTerminationChromium.cpp
new file mode 100644 (file)
index 0000000..54b8304
--- /dev/null
@@ -0,0 +1,48 @@
+/*\r
+ * Copyright (C) 2009 Google Inc. All rights reserved.\r
+ *\r
+ * Redistribution and use in source and binary forms, with or without\r
+ * modification, are permitted provided that the following conditions are\r
+ * met:\r
+ *\r
+ *     * Redistributions of source code must retain the above copyright\r
+ * notice, this list of conditions and the following disclaimer.\r
+ *     * Redistributions in binary form must reproduce the above\r
+ * copyright notice, this list of conditions and the following disclaimer\r
+ * in the documentation and/or other materials provided with the\r
+ * distribution.\r
+ *     * Neither the name of Google Inc. nor the names of its\r
+ * contributors may be used to endorse or promote products derived from\r
+ * this software without specific prior written permission.\r
+ *\r
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ */\r
+\r
+#include "config.h"\r
+#include "SuddenTermination.h"\r
+\r
+#include "ChromiumBridge.h"\r
+\r
+namespace WebCore {\r
+\r
+void disableSuddenTermination()\r
+{\r
+    ChromiumBridge::suddenTerminationChanged(false);\r
+}\r
+\r
+void enableSuddenTermination()\r
+{\r
+    ChromiumBridge::suddenTerminationChanged(true);\r
+}\r
+\r
+} // namespace WebCore\r