electron/shell/common/gin_helper/locker.cc
Charles Kerr f6e8a42c48
refactor: remove unused fields, methods in gin_helper::Locker (#39803)
* refactor: remove unused field gin_helper::Locker::g_is_browser_process

refactor: remove unused field gin_helper::Locker::g_is_renderer_process

refactor: make field const gin_helper::Locker::locker_

* refactor: remove unused declaration gin_helper::Locker::new()

refactor: remove unused declaration gin_helper::Locker::delete()

* refactor: make field const electron::JavascriptEnvironment::locker_

* refactor: remove unused #include gin_helper/locker.h
2023-09-12 16:53:20 -07:00

17 lines
505 B
C++

// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE.chromium file.
#include "shell/common/gin_helper/locker.h"
#include "shell/common/process_util.h"
namespace gin_helper {
Locker::Locker(v8::Isolate* isolate)
: locker_{electron::IsBrowserProcess() ? new v8::Locker{isolate}
: nullptr} {}
Locker::~Locker() = default;
} // namespace gin_helper