From 3715e03ac3aa0ec733129d1035ee6ccc1d1828d1 Mon Sep 17 00:00:00 2001 From: "cpu@chromium.org" Date: Tue, 29 Sep 2009 02:13:28 +0000 Subject: Change again the way we do ResolveNTFunctionPtr - This version is different from last two TEST=chrome should start and you can browse BUG=11789 Review URL: http://codereview.chromium.org/246026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27453 0039d316-1c4b-4281-b951-d872f2087c98 --- sandbox/src/win_utils.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sandbox') diff --git a/sandbox/src/win_utils.cc b/sandbox/src/win_utils.cc index c20caf9..d42ec51 100644 --- a/sandbox/src/win_utils.cc +++ b/sandbox/src/win_utils.cc @@ -197,12 +197,16 @@ bool GetPathFromHandle(HANDLE handle, std::wstring* path) { }; // namespace sandbox -// TODO(cpu): Revert this change to use a map to speed up the function once -// this has been deployed in the dev channel for a week. See bug 11789. +// TODO(cpu): This is not the final code we want here but we are yet +// to understand what is going on. See bug 11789. void ResolveNTFunctionPtr(const char* name, void* ptr) { static HMODULE ntdll = ::GetModuleHandle(sandbox::kNtdllName); FARPROC* function_ptr = reinterpret_cast(ptr); *function_ptr = ::GetProcAddress(ntdll, name); - CHECK(*function_ptr) << "Failed to resolve NTDLL function"; + if (*function_ptr) + return; + // We have data that re-trying helps. + *function_ptr = ::GetProcAddress(ntdll, name); + CHECK(*function_ptr); } -- cgit v1.1