fix: crash in utilityProcess when generating code from strings (#38014)
This commit is contained in:
parent
f12e12b341
commit
0240f6664e
14 changed files with 72 additions and 48 deletions
|
@ -4,19 +4,15 @@
|
|||
|
||||
#include "shell/common/gin_helper/locker.h"
|
||||
|
||||
#include "shell/common/process_util.h"
|
||||
|
||||
namespace gin_helper {
|
||||
|
||||
Locker::Locker(v8::Isolate* isolate) {
|
||||
if (IsBrowserProcess())
|
||||
if (electron::IsBrowserProcess())
|
||||
locker_ = std::make_unique<v8::Locker>(isolate);
|
||||
}
|
||||
|
||||
Locker::~Locker() = default;
|
||||
|
||||
void Locker::SetIsBrowserProcess(bool is_browser_process) {
|
||||
g_is_browser_process = is_browser_process;
|
||||
}
|
||||
|
||||
bool Locker::g_is_browser_process = false;
|
||||
|
||||
} // namespace gin_helper
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue