Changeset 275247 in webkit
- Timestamp:
- Mar 30, 2021, 4:12:22 PM (4 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r275243 r275247 1 2021-03-30 Mark Lam <mark.lam@apple.com> 2 3 Add disableForwardingVPrintfStdErrToOSLog() and use it in the jsc shell. 4 https://bugs.webkit.org/show_bug.cgi?id=223963 5 6 Reviewed by Saam Barati. 7 8 This prevents automatic forwarding of vprintf_stderr_common() to os_log_with_args(), 9 which results in duplicate output when using the jsc shell. As a result, ASSERT 10 fail messages and crash stack traces will be more readable. 11 12 * jsc.cpp: 13 (main): 14 1 15 2021-03-30 Mark Lam <mark.lam@apple.com> 2 16 -
trunk/Source/JavaScriptCore/jsc.cpp
r274724 r275247 2825 2825 // have a chance to parse options. 2826 2826 WTF::initialize(); 2827 #if PLATFORM(COCOA) 2828 WTF::disableForwardingVPrintfStdErrToOSLog(); 2829 #endif 2827 2830 2828 2831 // We can't use destructors in the following code because it uses Windows -
trunk/Source/WTF/ChangeLog
r275172 r275247 1 2021-03-30 Mark Lam <mark.lam@apple.com> 2 3 Add disableForwardingVPrintfStdErrToOSLog() and use it in the jsc shell. 4 https://bugs.webkit.org/show_bug.cgi?id=223963 5 6 Reviewed by Saam Barati. 7 8 * wtf/Assertions.cpp: 9 (WTF::disableForwardingVPrintfStdErrToOSLog): 10 * wtf/Assertions.h: 11 * wtf/WTFConfig.h: 12 1 13 2021-03-29 Alex Christensen <achristensen@webkit.org> 2 14 -
trunk/Source/WTF/wtf/Assertions.cpp
r272892 r275247 1 1 /* 2 * Copyright (C) 2003-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2003-2021 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2007-2009 Torch Mobile, Inc. 4 4 * Copyright (C) 2011 University of Szeged. All rights reserved. … … 38 38 #include <wtf/PrintStream.h> 39 39 #include <wtf/StackTrace.h> 40 #include <wtf/WTFConfig.h> 40 41 #include <wtf/text/CString.h> 41 42 #include <wtf/text/StringBuilder.h> … … 115 116 } 116 117 117 } 118 #if PLATFORM(COCOA) 119 void disableForwardingVPrintfStdErrToOSLog() 120 { 121 g_wtfConfig.disableForwardingVPrintfStdErrToOSLog = true; 122 } 123 #endif 124 125 } // namespace WTF 118 126 119 127 extern "C" { … … 148 156 149 157 #if PLATFORM(COCOA) 150 va_list copyOfArgs; 151 va_copy(copyOfArgs, args); 152 os_log_with_args(OS_LOG_DEFAULT, OS_LOG_TYPE_DEFAULT, format, copyOfArgs, __builtin_return_address(0)); 153 va_end(copyOfArgs); 158 if (!g_wtfConfig.disableForwardingVPrintfStdErrToOSLog) { 159 va_list copyOfArgs; 160 va_copy(copyOfArgs, args); 161 os_log_with_args(OS_LOG_DEFAULT, OS_LOG_TYPE_DEFAULT, format, copyOfArgs, __builtin_return_address(0)); 162 va_end(copyOfArgs); 163 } 154 164 #endif 155 165 -
trunk/Source/WTF/wtf/Assertions.h
r272892 r275247 681 681 isIntegralOrPointerType(types...); 682 682 } 683 } 683 684 #if PLATFORM(COCOA) 685 WTF_EXPORT_PRIVATE void disableForwardingVPrintfStdErrToOSLog(); 686 #endif 687 688 } // namespace WTF 684 689 685 690 inline void compilerFenceForCrash() -
trunk/Source/WTF/wtf/WTFConfig.h
r274325 r275247 1 1 /* 2 * Copyright (C) 2020 Apple Inc. All rights reserved.2 * Copyright (C) 2020-2021 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 70 70 71 71 bool isPermanentlyFrozen; 72 #if PLATFORM(COCOA) 73 bool disableForwardingVPrintfStdErrToOSLog; 74 #endif 72 75 73 76 #if USE(PTHREADS)
Note:
See TracChangeset
for help on using the changeset viewer.