Commit 2740c2cd authored by Xi Cheng's avatar Xi Cheng Committed by Commit Bot

Address TODO for native_library_win

Bug: 701944
Change-Id: Idf06f127aba7d4a50fa23d631ff78604b3a57258
Reviewed-on: https://chromium-review.googlesource.com/c/1342672Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Xi Cheng <chengx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609826}
parent 13e54a1a
......@@ -109,13 +109,7 @@ NativeLibrary LoadNativeLibraryHelper(const FilePath& library_path,
}
// If LoadLibraryExW API/flags are unavailable or API call fails, try
// LoadLibraryW API.
// TODO(chengx): Currently, if LoadLibraryExW API call fails, LoadLibraryW is
// still tried. We should strictly prefer the LoadLibraryExW over the
// LoadLibraryW if LoadLibraryW is statistically showing no extra benefits. If
// UMA metric shows that FAIL_AND_FAIL is the primary failure mode and/or
// FAIL_AND_SUCCESS is close to zero, we should remove this fallback.
// (http://crbug.com/701944)
// LoadLibraryW API. From UMA, this fallback is necessary for many users.
// Switch the current directory to the library directory as the library
// may have dependencies on DLLs in this directory.
......@@ -128,7 +122,6 @@ NativeLibrary LoadNativeLibraryHelper(const FilePath& library_path,
restore_directory = true;
}
}
module = ::LoadLibraryW(library_path.value().c_str());
// GetLastError() needs to be called immediately after LoadLibraryW call.
......
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