diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-06-07 17:00:15 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-06-07 17:00:15 +0200 |
commit | e5ee4480d362efcae7089ee2163e8c88007f94db (patch) | |
tree | a76d5434ef0d318370cedb9ea95772c4d03e7460 /src/core | |
parent | 2c86c348d7a94f27d1e9e7a71c2435565cbe6fb5 (diff) | |
parent | 80674ddb452c6926a01fcb0f35699252cf452043 (diff) |
Merge remote-tracking branch 'origin/5.12.4' into 5.12
Change-Id: I243662eee18709478038e918ff6b16aabd1f0662
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/configure.json | 10 | ||||
-rw-r--r-- | src/core/core_chromium.pri | 2 | ||||
-rw-r--r-- | src/core/core_common.pri | 4 | ||||
-rw-r--r-- | src/core/core_headers.pro | 1 | ||||
-rw-r--r-- | src/core/core_module.pro | 28 | ||||
-rw-r--r-- | src/core/profile_io_data_qt.cpp | 16 |
6 files changed, 37 insertions, 24 deletions
diff --git a/src/core/configure.json b/src/core/configure.json index fc23785df..6dccd1644 100644 --- a/src/core/configure.json +++ b/src/core/configure.json @@ -327,6 +327,11 @@ "webengine-arm-thumb" : { "label": "thumb instruction set", "type": "hasThumbFlag" + }, + "webengine-noexecstack" : { + "label": "linker supports -z noexecstack", + "type": "linkerSupportsFlag", + "flag": "-z,noexecstack" } }, @@ -658,6 +663,11 @@ "label": "Thumb instruction set", "condition": "config.linux && features.webengine-embedded-build && arch.arm && tests.webengine-arm-thumb", "output": [ "privateFeature" ] + }, + "webengine-noexecstack": { + "label": "linker supports -z noexecstack", + "condition": "config.unix && tests.webengine-noexecstack", + "output": [ "privateFeature" ] } }, diff --git a/src/core/core_chromium.pri b/src/core/core_chromium.pri index e92dd60ff..60eaf1f06 100644 --- a/src/core/core_chromium.pri +++ b/src/core/core_chromium.pri @@ -33,8 +33,6 @@ RCC_DIR = $$OUT_PWD/$$getConfigDir()/.rcc # whenever we are cross compiling. qtConfig(webengine-embedded-build): DEFINES += QTWEBENGINE_EMBEDDED_SWITCHES -qtConfig(egl): CONFIG += egl - INCLUDEPATH += $$PWD $$PWD/api SOURCES = \ diff --git a/src/core/core_common.pri b/src/core/core_common.pri index 5f9f3c4f6..01f40eb09 100644 --- a/src/core/core_common.pri +++ b/src/core/core_common.pri @@ -2,8 +2,8 @@ # gyp/ninja will take care of the compilation, qmake/make will finish with linking and install. TARGET = QtWebEngineCore -QT += qml quick -QT_PRIVATE += quick-private gui-private core-private webenginecoreheaders-private +QT += qml-private quick-private gui-private core-private +QT_PRIVATE += webenginecoreheaders-private qtConfig(webengine-geolocation): QT += positioning qtConfig(webengine-webchannel): QT += webchannel diff --git a/src/core/core_headers.pro b/src/core/core_headers.pro index 21b5d58c3..cd5352eb7 100644 --- a/src/core/core_headers.pro +++ b/src/core/core_headers.pro @@ -1,5 +1,6 @@ TARGET = QtWebEngineCore CONFIG += no_private_module header_module internal_module no_plist +QT -= core gui MODULE = webenginecoreheaders MODULE_CFG_FILE = qtwebenginecore-config load(qt_module) diff --git a/src/core/core_module.pro b/src/core/core_module.pro index 3b5d37f29..9bd56f9de 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -10,8 +10,6 @@ linking_pri = $$OUT_PWD/$$getConfigDir()/$${TARGET}.pri error("Could not find the linking information that gn should have generated.") } -load(qt_module) - api_library_name = qtwebenginecoreapi$$qtPlatformTargetSuffix() api_library_path = $$OUT_PWD/api/$$getConfigDir() @@ -25,19 +23,24 @@ isEmpty(NINJA_LIBS): error("Missing library files from QtWebEngineCore linking p NINJA_OBJECTS = $$eval($$list($$NINJA_OBJECTS)) # Do manual response file linking for macOS and Linux -RSP_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}.rsp -for(object, NINJA_OBJECTS): RSP_CONTENT += $$object -write_file($$RSP_FILE, RSP_CONTENT) -macos:LIBS_PRIVATE += -Wl,-filelist,$$shell_quote($$RSP_FILE) -linux:LIBS_PRIVATE += @$$RSP_FILE +RSP_OBJECT_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}_o.rsp +for(object, NINJA_OBJECTS): RSP_O_CONTENT += $$object +write_file($$RSP_OBJECT_FILE, RSP_O_CONTENT) +RSP_ARCHIVE_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}_a.rsp +for(archive, NINJA_ARCHIVES): RSP_A_CONTENT += $$archive +write_file($$RSP_ARCHIVE_FILE, RSP_A_CONTENT) +macos:LIBS_PRIVATE += -Wl,-filelist,$$shell_quote($$RSP_OBJECT_FILE) +linux:QMAKE_LFLAGS += @$${RSP_OBJECT_FILE} # QTBUG-58710 add main rsp file on windows -win32:QMAKE_LFLAGS += @$$RSP_FILE -linux: LIBS_PRIVATE += -Wl,--start-group $$NINJA_ARCHIVES -Wl,--end-group +win32:QMAKE_LFLAGS += @$${RSP_OBJECT_FILE} +linux:QMAKE_LFLAGS += -Wl,--start-group @$${RSP_ARCHIVE_FILE} -Wl,--end-group else: LIBS_PRIVATE += $$NINJA_ARCHIVES LIBS_PRIVATE += $$NINJA_LIB_DIRS $$NINJA_LIBS # GN's LFLAGS doesn't always work across all the Linux configurations we support. # The Windows and macOS ones from GN does provide a few useful flags however +unix:qtConfig(webengine-noexecstack): \ + QMAKE_LFLAGS += -Wl,-z,noexecstack linux { QMAKE_LFLAGS += -Wl,--gc-sections -Wl,-O1 -Wl,-z,now # Embedded address sanitizer symbols are undefined and are picked up by the dynamic link loader @@ -71,7 +74,7 @@ osx { # API library as response file to the linker. QMAKE_LFLAGS += @$${api_library_path}$${QMAKE_DIR_SEP}$${api_library_name}.lib.objects } else { - LIBS_PRIVATE += -Wl,-whole-archive -l$$api_library_name -Wl,-no-whole-archive + QMAKE_LFLAGS += -Wl,-whole-archive -l$$api_library_name -Wl,-no-whole-archive } win32-msvc* { @@ -84,8 +87,6 @@ win32-msvc* { # and doesn't let Chromium get access to libc symbols through dlsym. CONFIG -= bsymbolic_functions -qtConfig(egl): CONFIG += egl - linux:qtConfig(separate_debug_info): QMAKE_POST_LINK="cd $(DESTDIR) && $(STRIP) --strip-unneeded $(TARGET)" REPACK_DIR = $$OUT_PWD/$$getConfigDir() @@ -154,3 +155,6 @@ OTHER_FILES = \ $$files(../3rdparty/chromium/*.gypi, true) \ $$files(../3rdparty/chromium/*.gn, true) \ $$files(../3rdparty/chromium/*.gni, true) + +load(qt_module) + diff --git a/src/core/profile_io_data_qt.cpp b/src/core/profile_io_data_qt.cpp index 63585b2c3..dd363f74d 100644 --- a/src/core/profile_io_data_qt.cpp +++ b/src/core/profile_io_data_qt.cpp @@ -48,6 +48,7 @@ #include "content/public/common/content_features.h" #include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h" #include "chrome/browser/net/chrome_mojo_proxy_resolver_factory.h" +#include "chrome/common/chrome_switches.h" #include "net/cert/cert_verifier.h" #include "net/cert/ct_log_verifier.h" #include "net/cert/ct_policy_enforcer.h" @@ -88,13 +89,6 @@ namespace QtWebEngineCore { -static const char* const kDefaultAuthSchemes[] = { net::kBasicAuthScheme, - net::kDigestAuthScheme, -#if QT_CONFIG(webengine_kerberos) - net::kNegotiateAuthScheme, -#endif - net::kNtlmAuthScheme }; - static bool doNetworkSessionParamsMatch(const net::HttpNetworkSession::Params &first, const net::HttpNetworkSession::Params &second) { @@ -297,8 +291,14 @@ void ProfileIODataQt::generateStorage() m_storage->set_ct_policy_enforcer(base::WrapUnique(new net::DefaultCTPolicyEnforcer())); m_storage->set_host_resolver(net::HostResolver::CreateDefaultResolver(NULL)); m_storage->set_ssl_config_service(std::make_unique<net::SSLConfigServiceDefaults>()); + if (!m_httpAuthPreferences) { + m_httpAuthPreferences.reset(new net::HttpAuthPreferences()); + std::string serverWhitelist = base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kAuthServerWhitelist); + m_httpAuthPreferences->SetServerWhitelist(serverWhitelist); + } m_storage->set_http_auth_handler_factory(net::HttpAuthHandlerFactory::CreateDefault( - m_urlRequestContext->host_resolver())); + m_urlRequestContext->host_resolver(), + m_httpAuthPreferences.get())); m_storage->set_transport_security_state(std::make_unique<net::TransportSecurityState>()); if (!m_dataPath.isEmpty()) { |