Commit b2dfe5c1 authored by Sébastien Marchand's avatar Sébastien Marchand Committed by Commit Bot

Revert "Hook up the delay load failure function in the renderer processes."

This reverts commit 343f32e3.

Reason for revert: crbug.com/976241 

Original change's description:
> Hook up the delay load failure function in the renderer processes.
> 
> This allows getting a crash report when failing to delay load a DLL.
> 
> Example of the stack trace that this will provide:
> chrome_child!base::debug::BreakDebugger+0xc [C:\src\chrome\src\base\debug\debugger_win.cc @ 28]
> chrome_child!logging::LogMessage::~LogMessage+0x3f5 [C:\src\chrome\src\base\logging.cc @ 939]
> chrome_child!DllLoadHook+0x75 [C:\src\chrome\src\content\renderer\renderer_main_platform_delegate_win.cc @ 37]
> chrome_child!__delayLoadHelper2+0x13f [d:\agent\_work\3\s\src\vctools\delayimp\delayhlp.cpp @ 305]
> chrome_child!RtlUnwind+0x470
> chrome_child!SkFontMgr::legacyMakeTypeface+0x13 [C:\src\chrome\src\third_party\skia\src\core\SkFontMgr.cpp @ 164]
> chrome_child!blink::DWriteVersionSupportsVariations+0x7f
> chrome_child!blink::WebFontTypefaceFactory::FontManagerForVariations+0xc
> 
> Bug: 970893
> Change-Id: I922d5a3f7e62c7e25f954405bedd967678dd7a50
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1655909
> Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
> Reviewed-by: Daniel Cheng <dcheng@chromium.org>
> Reviewed-by: Will Harris <wfh@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#669339}

TBR=dcheng@chromium.org,wfh@chromium.org,sebmarchand@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 970893
Change-Id: I6a7dfd2ae97d6538d65888c04d8af36a356ae7ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1663363Reviewed-by: default avatarSébastien Marchand <sebmarchand@chromium.org>
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Cr-Commit-Position: refs/heads/master@{#670122}
parent f1af9b2a
...@@ -4,16 +4,13 @@ ...@@ -4,16 +4,13 @@
#include "content/renderer/renderer_main_platform_delegate.h" #include "content/renderer/renderer_main_platform_delegate.h"
#include <delayimp.h>
#include <dwrite.h> #include <dwrite.h>
#include <memory> #include <memory>
#include "base/command_line.h" #include "base/command_line.h"
#include "base/debug/alias.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "base/strings/string_util.h"
#include "base/win/win_util.h" #include "base/win/win_util.h"
#include "base/win/windows_version.h" #include "base/win/windows_version.h"
#include "content/child/dwrite_font_proxy/dwrite_font_proxy_init_impl_win.h" #include "content/child/dwrite_font_proxy/dwrite_font_proxy_init_impl_win.h"
...@@ -32,31 +29,6 @@ ...@@ -32,31 +29,6 @@
namespace content { namespace content {
namespace {
// Delay load failure hook that generates a crash report. By default a failure
// to delay load will trigger an exception handled by the delay load runtime and
// this won't generate a crash report.
extern "C" FARPROC WINAPI DelayLoadFailureHook(unsigned reason,
DelayLoadInfo* dll_info) {
char dll_name[256];
base::strlcpy(dll_name, dll_info->szDll, base::size(dll_name));
base::debug::Alias(&dll_name);
CHECK(false);
return 0;
}
// Set the delay load failure hook to the function above.
//
// The |__pfnDliFailureHook2| failure notification hook gets called
// automatically by the delay load runtime in case of failure, see
// https://docs.microsoft.com/en-us/cpp/build/reference/failure-hooks?view=vs-2019
// for more information about this.
extern "C" const PfnDliHook __pfnDliFailureHook2 = DelayLoadFailureHook;
} // namespace
RendererMainPlatformDelegate::RendererMainPlatformDelegate( RendererMainPlatformDelegate::RendererMainPlatformDelegate(
const MainFunctionParams& parameters) const MainFunctionParams& parameters)
: parameters_(parameters) {} : parameters_(parameters) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment