summaryrefslogtreecommitdiff
path: root/chromium/chrome_elf
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-04-05 14:08:31 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-04-11 07:46:53 +0000
commit6a4cabb866f66d4128a97cdc6d9d08ce074f1247 (patch)
treeab00f70a5e89278d6a0d16ff0c42578dc4d84a2d /chromium/chrome_elf
parente733310db58160074f574c429d48f8308c0afe17 (diff)
downloadqtwebengine-chromium-6a4cabb866f66d4128a97cdc6d9d08ce074f1247.tar.gz
BASELINE: Update Chromium to 57.0.2987.144
Change-Id: I29db402ff696c71a04c4dbaec822c2e53efe0267 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'chromium/chrome_elf')
-rw-r--r--chromium/chrome_elf/chrome_elf.def1
-rw-r--r--chromium/chrome_elf/chrome_elf_main.cc24
2 files changed, 19 insertions, 6 deletions
diff --git a/chromium/chrome_elf/chrome_elf.def b/chromium/chrome_elf/chrome_elf.def
index 02a99fd2065..b4c3936e3f0 100644
--- a/chromium/chrome_elf/chrome_elf.def
+++ b/chromium/chrome_elf/chrome_elf.def
@@ -8,6 +8,7 @@ EXPORTS
AddDllToBlacklist
GetBlacklistIndex
GetInstallDetailsPayload
+ GetUserDataDirectoryThunk
IsBlacklistInitialized
SignalChromeElf
SignalInitializeCrashReporting
diff --git a/chromium/chrome_elf/chrome_elf_main.cc b/chromium/chrome_elf/chrome_elf_main.cc
index 3a10376bae3..926668c54d3 100644
--- a/chromium/chrome_elf/chrome_elf_main.cc
+++ b/chromium/chrome_elf/chrome_elf_main.cc
@@ -10,6 +10,7 @@
#include "chrome/install_static/install_details.h"
#include "chrome/install_static/install_util.h"
#include "chrome/install_static/product_install_details.h"
+#include "chrome/install_static/user_data_dir.h"
#include "chrome_elf/blacklist/blacklist.h"
#include "chrome_elf/crash/crash_helper.h"
@@ -28,17 +29,28 @@ void SignalChromeElf() {
blacklist::ResetBeacon();
}
+extern "C" void GetUserDataDirectoryThunk(wchar_t* user_data_dir,
+ size_t user_data_dir_length,
+ wchar_t* invalid_user_data_dir,
+ size_t invalid_user_data_dir_length) {
+ std::wstring user_data_dir_str, invalid_user_data_dir_str;
+ bool ret = install_static::GetUserDataDirectory(&user_data_dir_str,
+ &invalid_user_data_dir_str);
+ assert(ret);
+ install_static::IgnoreUnused(ret);
+ wcsncpy_s(user_data_dir, user_data_dir_length, user_data_dir_str.c_str(),
+ _TRUNCATE);
+ wcsncpy_s(invalid_user_data_dir, invalid_user_data_dir_length,
+ invalid_user_data_dir_str.c_str(), _TRUNCATE);
+}
+
BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) {
if (reason == DLL_PROCESS_ATTACH) {
install_static::InitializeProductDetailsForPrimaryModule();
-// CRT on initialization installs an exception filter which calls
-// TerminateProcess. We need to hook CRT's attempt to set an exception.
-// NOTE: Do not hook if ASan is present, or ASan will fail to install
-// its own unhandled exception filter.
-#if !defined(ADDRESS_SANITIZER)
+ // CRT on initialization installs an exception filter which calls
+ // TerminateProcess. We need to hook CRT's attempt to set an exception.
elf_crash::DisableSetUnhandledExceptionFilter();
-#endif // !defined (ADDRESS_SANITIZER)
install_static::InitializeProcessType();