зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1726476 - Adjust GetSandboxedRLBoxPath for the changes in rlbox_wasm2c_sandbox. r=nika
rlbox_wasm2c_sandbox was adjusted to avoid using LoadLibraryA (rejected by build/clang-plugin/LoadLibraryUsageChecker.cpp), so we adjust GetSandboxedRLBoxPath (which is used to feed it) to return an UTF-16 string on Windows. Differential Revision: https://phabricator.services.mozilla.com/D123025
This commit is contained in:
Родитель
ce86abf62b
Коммит
14a11072e2
|
@ -12,7 +12,7 @@
|
|||
namespace mozilla {
|
||||
namespace ipc {
|
||||
|
||||
nsCString GetSandboxedRLBoxPath() {
|
||||
PathString GetSandboxedRLBoxPath() {
|
||||
nsCOMPtr<nsIFile> libFile;
|
||||
nsresult rv = mozilla::BinaryPath::GetFile(getter_AddRefs(libFile));
|
||||
if (NS_FAILED(rv)) {
|
||||
|
@ -24,12 +24,7 @@ nsCString GetSandboxedRLBoxPath() {
|
|||
MOZ_CRASH("Library preload failure: Failed to get library file\n");
|
||||
}
|
||||
|
||||
PathString fullPath = libFile->NativePath();
|
||||
#ifdef XP_WIN
|
||||
return NS_ConvertUTF16toUTF8(fullPath);
|
||||
#else
|
||||
return fullPath;
|
||||
#endif
|
||||
return libFile->NativePath();
|
||||
}
|
||||
|
||||
PRLibrary* PreloadLibrary(const nsCString& path) {
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
#ifndef ipc_glue_LibrarySandboxPreload_h
|
||||
#define ipc_glue_LibrarySandboxPreload_h
|
||||
|
||||
#include "nsString.h"
|
||||
#include "mozilla/FileUtils.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace ipc {
|
||||
nsCString GetSandboxedRLBoxPath();
|
||||
PathString GetSandboxedRLBoxPath();
|
||||
void PreloadSandboxedDynamicLibrary();
|
||||
} // namespace ipc
|
||||
} // namespace mozilla
|
||||
|
|
Загрузка…
Ссылка в новой задаче