Revert: [iOS] Generate a simulated crash when the WebThread starts in MobileSafari
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Jun 2017 00:45:13 +0000 (00:45 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Jun 2017 00:45:13 +0000 (00:45 +0000)
<https://webkit.org/b/173386>
<rdar://problem/32776426>

Revert r218347 and r218339 since we're going to take a different
approach to investigating a crash on the WebThread.

* WebCore.xcodeproj/project.pbxproj:
* platform/ios/CrashReporterSupportSoftLink.h: Remove.
* platform/ios/CrashReporterSupportSoftLink.mm: Remove.
* platform/ios/wak/WebCoreThread.mm:
(WebThreadEnable):
* platform/spi/ios/CrashReporterSupportSPI.h: Remove.

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

Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/ios/CrashReporterSupportSoftLink.h [deleted file]
Source/WebCore/platform/ios/CrashReporterSupportSoftLink.mm [deleted file]
Source/WebCore/platform/ios/wak/WebCoreThread.mm
Source/WebCore/platform/spi/ios/CrashReporterSupportSPI.h [deleted file]

index ba5268e..5407874 100644 (file)
@@ -1,3 +1,19 @@
+2017-06-15  David Kilzer  <ddkilzer@apple.com>
+
+        Revert: [iOS] Generate a simulated crash when the WebThread starts in MobileSafari
+        <https://webkit.org/b/173386>
+        <rdar://problem/32776426>
+
+        Revert r218347 and r218339 since we're going to take a different
+        approach to investigating a crash on the WebThread.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/ios/CrashReporterSupportSoftLink.h: Remove.
+        * platform/ios/CrashReporterSupportSoftLink.mm: Remove.
+        * platform/ios/wak/WebCoreThread.mm:
+        (WebThreadEnable):
+        * platform/spi/ios/CrashReporterSupportSPI.h: Remove.
+
 2017-06-15  Matt Lewis  <jlewis3@apple.com>
 
         Unreviewed, rolling out r218365.
index e5f0839..497dcb5 100644 (file)
                44C991860F3D1EBE00586670 /* ScrollbarThemeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 44C991850F3D1EBE00586670 /* ScrollbarThemeIOS.h */; };
                44C9919F0F3D210E00586670 /* ThemeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 44C9919D0F3D210E00586670 /* ThemeIOS.h */; };
                44C991A00F3D210E00586670 /* ThemeIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 44C9919E0F3D210E00586670 /* ThemeIOS.mm */; };
-               44CA12961EF23A4F00E4B3AD /* CrashReporterSupportSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 44CA12941EF23A2000E4B3AD /* CrashReporterSupportSoftLink.h */; };
-               44CA12981EF23A6900E4B3AD /* CrashReporterSupportSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 44CA12971EF23A6500E4B3AD /* CrashReporterSupportSPI.h */; };
-               44CA129B1EF2D9E800E4B3AD /* CrashReporterSupportSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 44CA12951EF23A2000E4B3AD /* CrashReporterSupportSoftLink.mm */; };
                44DAB5B115A623580097C1E4 /* Extensions3DOpenGLCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 44DAB5AF15A623580097C1E4 /* Extensions3DOpenGLCommon.cpp */; };
                44DAB5B215A623580097C1E4 /* Extensions3DOpenGLCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 44DAB5B015A623580097C1E4 /* Extensions3DOpenGLCommon.h */; };
                44DEF6431A6FF92700D45EEC /* IOReturnSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 44DEF6421A6FF92700D45EEC /* IOReturnSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
                44C991850F3D1EBE00586670 /* ScrollbarThemeIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollbarThemeIOS.h; sourceTree = "<group>"; };
                44C9919D0F3D210E00586670 /* ThemeIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThemeIOS.h; sourceTree = "<group>"; };
                44C9919E0F3D210E00586670 /* ThemeIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ThemeIOS.mm; sourceTree = "<group>"; };
-               44CA12941EF23A2000E4B3AD /* CrashReporterSupportSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrashReporterSupportSoftLink.h; sourceTree = "<group>"; };
-               44CA12951EF23A2000E4B3AD /* CrashReporterSupportSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CrashReporterSupportSoftLink.mm; sourceTree = "<group>"; };
-               44CA12971EF23A6500E4B3AD /* CrashReporterSupportSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrashReporterSupportSPI.h; sourceTree = "<group>"; };
                44D8DA98139545BE00337B75 /* SVGMPathElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGMPathElement.idl; sourceTree = "<group>"; };
                44D8DA9A139545CD00337B75 /* SVGAnimateMotionElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGAnimateMotionElement.idl; sourceTree = "<group>"; };
                44DAB5AF15A623580097C1E4 /* Extensions3DOpenGLCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Extensions3DOpenGLCommon.cpp; sourceTree = "<group>"; };
                        isa = PBXGroup;
                        children = (
                                CE1252421A16C01A00864480 /* CoreUISPI.h */,
-                               44CA12971EF23A6500E4B3AD /* CrashReporterSupportSPI.h */,
                                2DC4CF781D2DD98900ECCC94 /* DataDetectorsUISPI.h */,
                                CEC337AE1A46086D009B8523 /* GraphicsServicesSPI.h */,
                                7C4C96E21AD44ABF00365A50 /* LaunchServicesSPI.h */,
                        children = (
                                A148328B187F506800DA63A6 /* wak */,
                                F48223121E386E240066FC79 /* AbstractPasteboard.h */,
-                               44CA12941EF23A2000E4B3AD /* CrashReporterSupportSoftLink.h */,
-                               44CA12951EF23A2000E4B3AD /* CrashReporterSupportSoftLink.mm */,
                                2655414B1489AA2B000DFC5D /* CursorIOS.cpp */,
                                A1ED778A1BE3293F00DC1791 /* Device.cpp */,
                                A1ED778B1BE3294000DC1791 /* Device.h */,
                                BC5EB9510E82056B00B25965 /* CounterDirectives.h in Headers */,
                                9392F14C0AD1861B00691BD4 /* CounterNode.h in Headers */,
                                46C696CB1E7205F700597937 /* CPUMonitor.h in Headers */,
-                               44CA12961EF23A4F00E4B3AD /* CrashReporterSupportSoftLink.h in Headers */,
-                               44CA12981EF23A6900E4B3AD /* CrashReporterSupportSPI.h in Headers */,
                                D0B0556809C6700100307E43 /* CreateLinkCommand.h in Headers */,
                                514C766E0CE923A1007EF3CD /* Credential.h in Headers */,
                                3792917A1985EF3900F4B661 /* CredentialBase.h in Headers */,
                                BC5EB9500E82056B00B25965 /* CounterDirectives.cpp in Sources */,
                                9392F1500AD1862300691BD4 /* CounterNode.cpp in Sources */,
                                46C696CC1E7205FC00597937 /* CPUMonitor.cpp in Sources */,
-                               44CA129B1EF2D9E800E4B3AD /* CrashReporterSupportSoftLink.mm in Sources */,
                                D0B0556909C6700100307E43 /* CreateLinkCommand.cpp in Sources */,
                                514C766D0CE923A1007EF3CD /* CredentialBase.cpp in Sources */,
                                3792917D1987678F00F4B661 /* CredentialCocoa.mm in Sources */,
diff --git a/Source/WebCore/platform/ios/CrashReporterSupportSoftLink.h b/Source/WebCore/platform/ios/CrashReporterSupportSoftLink.h
deleted file mode 100644 (file)
index 65c0ee7..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR)
-
-#import "CrashReporterSupportSPI.h"
-#import "SoftLinking.h"
-
-SOFT_LINK_FRAMEWORK_FOR_HEADER(WebCore, CrashReporterSupport)
-
-SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CrashReporterSupport, SimulateCrash, BOOL, (pid_t pid, mach_exception_data_type_t exceptionCode, NSString *description), (pid, exceptionCode, description))
-#define SimulateCrash softLink_CrashReporterSupport_SimulateCrash
-
-using WebCore::softLink_CrashReporterSupport_SimulateCrash;
-
-#endif // PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR)
diff --git a/Source/WebCore/platform/ios/CrashReporterSupportSoftLink.mm b/Source/WebCore/platform/ios/CrashReporterSupportSoftLink.mm
deleted file mode 100644 (file)
index 7418be3..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-
-#if PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR)
-
-#import "CrashReporterSupportSPI.h"
-#import "SoftLinking.h"
-
-SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE(WebCore, CrashReporterSupport)
-
-SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CrashReporterSupport, SimulateCrash, BOOL, (pid_t pid, mach_exception_data_type_t exceptionCode, NSString *description), (pid, exceptionCode, description));
-
-#endif // PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR)
index b51d259..10bd779 100644 (file)
 #import "WebCoreThreadRun.h"
 #import "WKUtilities.h"
 
-#import <Foundation/NSInvocation.h>
-#import <libkern/OSAtomic.h>
-#import <objc/runtime.h>
 #import <runtime/InitializeThreading.h>
 #import <runtime/JSLock.h>
-#import <unistd.h>
 #import <wtf/Assertions.h>
 #import <wtf/MainThread.h>
 #import <wtf/RunLoop.h>
 #import <wtf/Threading.h>
 #import <wtf/text/AtomicString.h>
 
-#import "CrashReporterSupportSoftLink.h"
+#import <Foundation/NSInvocation.h>
+#import <libkern/OSAtomic.h>
+#import <objc/runtime.h>
 
 #define LOG_MESSAGES 0
 #define LOG_WEB_LOCK 0
@@ -1002,16 +1000,7 @@ void WebThreadSetDelegateSourceRunLoopMode(CFStringRef mode)
 
 void WebThreadEnable(void)
 {
-    if (WebCore::IOSApplication::isMobileSafari()) {
-        NSString *message = @"MobileSafari should never run a WebThread";
-#if !PLATFORM(IOS_SIMULATOR)
-        const mach_exception_data_type_t kExceptionCode = 0xbbadd0b1; // "Bad Dub 1" or Bad WK1.
-        SimulateCrash(getpid(), kExceptionCode, message);
-#else
-        NSLog(@"ERROR: %@\n%@", message, [NSThread callStackSymbols]);
-#endif
-    }
-    RELEASE_ASSERT_WITH_MESSAGE(!WebCore::IOSApplication::isWebProcess(), "The WebProcess should never run a WebThread");
+    RELEASE_ASSERT_WITH_MESSAGE(!WebCore::IOSApplication::isWebProcess(), "The WebProcess should never run a Web Thread");
 
     static pthread_once_t initControl = PTHREAD_ONCE_INIT;
     pthread_once(&initControl, StartWebThread);
diff --git a/Source/WebCore/platform/spi/ios/CrashReporterSupportSPI.h b/Source/WebCore/platform/spi/ios/CrashReporterSupportSPI.h
deleted file mode 100644 (file)
index 7e15e00..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Foundation/Foundation.h>
-#import <mach/exception_types.h>
-
-#if PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR)
-
-#if USE(APPLE_INTERNAL_SDK)
-
-WTF_EXTERN_C_BEGIN
-#import <CrashReporterSupport/CrashReporterSupport.h>
-WTF_EXTERN_C_END
-
-#endif
-
-WTF_EXTERN_C_BEGIN
-BOOL SimulateCrash(pid_t pid, mach_exception_data_type_t exceptionCode, NSString *description);
-WTF_EXTERN_C_END
-
-#endif // PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR)