mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
For sandboxed renderer it may not have a node::Environment in the context, using a increasing counter as contextId works for all cases.
16 lines
381 B
C++
16 lines
381 B
C++
// Copyright (c) 2018 GitHub, Inc.
|
|
// Use of this source code is governed by the MIT license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef ATOM_COMMON_CONTEXT_COUNTER_H_
|
|
#define ATOM_COMMON_CONTEXT_COUNTER_H_
|
|
|
|
namespace atom {
|
|
|
|
// Increase the context counter, and return current count.
|
|
int GetNextContextId();
|
|
|
|
} // namespace atom
|
|
|
|
#endif // ATOM_COMMON_CONTEXT_COUNTER_H_
|