linux: Fix building
This commit is contained in:
parent
8a92ef34a7
commit
c4d192b9a4
3 changed files with 7 additions and 47 deletions
|
@ -10,11 +10,8 @@
|
|||
#include "browser/media/media_capture_devices_dispatcher.h"
|
||||
#include "browser/platform_notification_service_impl.h"
|
||||
|
||||
#include "base/base_paths.h"
|
||||
#include "base/path_service.h"
|
||||
#include "content/public/common/content_descriptors.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "gin/public/isolate_holder.h"
|
||||
|
||||
namespace brightray {
|
||||
|
||||
|
@ -32,11 +29,6 @@ BrowserClient::BrowserClient()
|
|||
: browser_main_parts_(nullptr) {
|
||||
DCHECK(!g_browser_client);
|
||||
g_browser_client = this;
|
||||
|
||||
#if defined(OS_POSIX) && !defined(OS_MACOSX)
|
||||
v8_natives_fd_.reset(-1);
|
||||
v8_snapshot_fd_.reset(-1);
|
||||
#endif // OS_POSIX && !OS_MACOSX
|
||||
}
|
||||
|
||||
BrowserClient::~BrowserClient() {
|
||||
|
@ -99,31 +91,4 @@ content::DevToolsManagerDelegate* BrowserClient::GetDevToolsManagerDelegate() {
|
|||
return new DevToolsManagerDelegate;
|
||||
}
|
||||
|
||||
#if defined(OS_POSIX) && !defined(OS_MACOSX)
|
||||
void BrowserClient::GetAdditionalMappedFilesForChildProcess(
|
||||
const base::CommandLine& command_line,
|
||||
int child_process_id,
|
||||
content::FileDescriptorInfo* mappings) {
|
||||
if (v8_snapshot_fd_.get() == -1 && v8_natives_fd_.get() == -1) {
|
||||
base::FilePath v8_data_path;
|
||||
PathService::Get(gin::IsolateHolder::kV8SnapshotBasePathKey, &v8_data_path);
|
||||
DCHECK(!v8_data_path.empty());
|
||||
|
||||
int file_flags = base::File::FLAG_OPEN | base::File::FLAG_READ;
|
||||
base::FilePath v8_natives_data_path =
|
||||
v8_data_path.AppendASCII(gin::IsolateHolder::kNativesFileName);
|
||||
base::FilePath v8_snapshot_data_path =
|
||||
v8_data_path.AppendASCII(gin::IsolateHolder::kSnapshotFileName);
|
||||
base::File v8_natives_data_file(v8_natives_data_path, file_flags);
|
||||
base::File v8_snapshot_data_file(v8_snapshot_data_path, file_flags);
|
||||
DCHECK(v8_natives_data_file.IsValid());
|
||||
DCHECK(v8_snapshot_data_file.IsValid());
|
||||
v8_natives_fd_.reset(v8_natives_data_file.TakePlatformFile());
|
||||
v8_snapshot_fd_.reset(v8_snapshot_data_file.TakePlatformFile());
|
||||
}
|
||||
mappings->Share(kV8NativesDataDescriptor, v8_natives_fd_.get());
|
||||
mappings->Share(kV8SnapshotDataDescriptor, v8_snapshot_fd_.get());
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace brightray
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue