[JSC] Remove unnecessary PLATFORM guards
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jun 2018 09:26:22 +0000 (09:26 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Jun 2018 09:26:22 +0000 (09:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=186995

Reviewed by Mark Lam.

* assembler/AssemblerCommon.h:
(JSC::isIOS):
Add constexpr.

* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::appendAPIBacktrace):
StackFrame works in all the platforms. If StackFrame::demangle failed,
it just returns std::nullopt. And it is correctly handled in this code.

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/assembler/AssemblerCommon.h
Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp

index ee293a7..90eb2c0 100644 (file)
@@ -1,3 +1,19 @@
+2018-06-25  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [JSC] Remove unnecessary PLATFORM guards
+        https://bugs.webkit.org/show_bug.cgi?id=186995
+
+        Reviewed by Mark Lam.
+
+        * assembler/AssemblerCommon.h:
+        (JSC::isIOS):
+        Add constexpr.
+
+        * inspector/JSGlobalObjectInspectorController.cpp:
+        (Inspector::JSGlobalObjectInspectorController::appendAPIBacktrace):
+        StackFrame works in all the platforms. If StackFrame::demangle failed,
+        it just returns std::nullopt. And it is correctly handled in this code.
+
 2018-06-23  Mark Lam  <mark.lam@apple.com>
 
         Add more debugging features to $vm.
index 2c6cb35..762a7a6 100644 (file)
@@ -27,7 +27,7 @@
 
 namespace JSC {
 
-ALWAYS_INLINE bool isIOS()
+ALWAYS_INLINE constexpr bool isIOS()
 {
 #if PLATFORM(IOS)
     return true;
index b4305b7..d4d7aa1 100644 (file)
@@ -180,7 +180,6 @@ void JSGlobalObjectInspectorController::dispatchMessageFromFrontend(const String
 
 void JSGlobalObjectInspectorController::appendAPIBacktrace(ScriptCallStack& callStack)
 {
-#if OS(DARWIN) || (OS(LINUX) && !PLATFORM(GTK))
     static const int framesToShow = 31;
     static const int framesToSkip = 3; // WTFGetBacktrace, appendAPIBacktrace, reportAPIException.
 
@@ -197,9 +196,6 @@ void JSGlobalObjectInspectorController::appendAPIBacktrace(ScriptCallStack& call
         else
             callStack.append(ScriptCallFrame("?"_s, "[native code]"_s, noSourceID, 0, 0));
     }
-#else
-    UNUSED_PARAM(callStack);
-#endif
 }
 
 void JSGlobalObjectInspectorController::reportAPIException(ExecState* exec, Exception* exception)