locker.cc 539 B

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