Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Allow ELOK to leak some memory instead of crashing on reload after wi…
Browse files Browse the repository at this point in the history
…ndow.open (#123)
  • Loading branch information
chase authored Feb 1, 2024
2 parents e643c6c + 5851d8f commit 29def8d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion src/electron/ELECTRON_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.3.0-rc18
20.3.0-rc19
8 changes: 0 additions & 8 deletions src/electron/office/office_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ v8::Local<v8::Value> OfficeClient::GetHandle(v8::Isolate* isolate) {
return self_.Get(isolate);
}

// static
base::AtomicRefCount g_client_counter{0};

// instance
namespace {
static void GetOfficeHandle(v8::Local<v8::Name> name,
Expand Down Expand Up @@ -98,7 +95,6 @@ void OfficeClient::InstallToContext(v8::Local<v8::Context> context) {
}
client->self_.Reset(isolate, wrapper);
lazy_tls->Set(std::move(client));
g_client_counter.Increment();

context->Global()
->SetAccessor(
Expand All @@ -118,10 +114,6 @@ void OfficeClient::RemoveFromContext(v8::Local<v8::Context> /*context*/) {
if (lazy_tls->Get())
lazy_tls->Get()->Unset();
lazy_tls->Set(nullptr);

if (!g_client_counter.Decrement()) {
OfficeInstance::Unset();
}
}

OfficeClient::OfficeClient()
Expand Down

0 comments on commit 29def8d

Please sign in to comment.