Skip to content

Commit db1f77b

Browse files
committed
Fix IPC message logging
Register Qt IPC messages for logging. The usage of content::RegisterIPCLogger function adds the content_common.content_ipc_logging.o to the link dependency. Thus it will register the Chromium Content IPC messages too. Task-number: QTBUG-57224 Change-Id: I2c45691feb22a34f6074940cc35b8a4ba7804370 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
1 parent 5fc3be5 commit db1f77b

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

src/core/common/qt_ipc_logging.cpp

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/****************************************************************************
2+
**
3+
** Copyright (C) 2016 The Qt Company Ltd.
4+
** Contact: https://www.qt.io/licensing/
5+
**
6+
** This file is part of the QtWebEngine module of the Qt Toolkit.
7+
**
8+
** $QT_BEGIN_LICENSE:LGPL$
9+
** Commercial License Usage
10+
** Licensees holding valid commercial Qt licenses may use this file in
11+
** accordance with the commercial license agreement provided with the
12+
** Software or, alternatively, in accordance with the terms contained in
13+
** a written agreement between you and The Qt Company. For licensing terms
14+
** and conditions see https://www.qt.io/terms-conditions. For further
15+
** information use the contact form at https://www.qt.io/contact-us.
16+
**
17+
** GNU Lesser General Public License Usage
18+
** Alternatively, this file may be used under the terms of the GNU Lesser
19+
** General Public License version 3 as published by the Free Software
20+
** Foundation and appearing in the file LICENSE.LGPL3 included in the
21+
** packaging of this file. Please review the following information to
22+
** ensure the GNU Lesser General Public License version 3 requirements
23+
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24+
**
25+
** GNU General Public License Usage
26+
** Alternatively, this file may be used under the terms of the GNU
27+
** General Public License version 2.0 or (at your option) the GNU General
28+
** Public license version 3 or any later version approved by the KDE Free
29+
** Qt Foundation. The licenses are as published by the Free Software
30+
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31+
** included in the packaging of this file. Please review the following
32+
** information to ensure the GNU General Public License requirements will
33+
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34+
** https://www.gnu.org/licenses/gpl-3.0.html.
35+
**
36+
** $QT_END_LICENSE$
37+
**
38+
****************************************************************************/
39+
40+
#include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED
41+
42+
#if defined(IPC_MESSAGE_LOG_ENABLED)
43+
#define IPC_MESSAGE_MACROS_LOG_ENABLED
44+
#include "content/public/common/content_ipc_logging.h"
45+
#define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger) \
46+
content::RegisterIPCLogger(msg_id, logger)
47+
#include "common/qt_messages.h"
48+
#endif

src/core/core_gyp_generator.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ SOURCES = \
4444
chromium_gpu_helper.cpp \
4545
chromium_overrides.cpp \
4646
clipboard_qt.cpp \
47+
common/qt_ipc_logging.cpp \
4748
common/qt_messages.cpp \
4849
common/user_script_data.cpp \
4950
content_client_qt.cpp \

0 commit comments

Comments
 (0)