blob: dfd51ae0c57b616655c3fd69a53c58593dbc4392 [file] [log] [blame]
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "services/accessibility/features/registered_wrappable.h"
#include "gin/public/isolate_holder.h"
#include "services/accessibility/features/v8_manager.h"
namespace ax {
RegisteredWrappable::RegisteredWrappable(v8::Local<v8::Context> context) {
observer_.Observe(V8Environment::GetFromContext(context));
}
RegisteredWrappable::~RegisteredWrappable() = default;
void RegisteredWrappable::OnIsolateWillDestroy() {
delete this;
}
void RegisteredWrappable::StopObserving() {
observer_.Reset();
}
} // namespace ax