chore: remove native_mate (Part 14) (#21365)
* chore: remove uses of mate::Dictionary and mate::Handle * chore: move CreateConstructor to gin_helper * chore: remove native_mate * chore: remove unneeded gin patch
This commit is contained in:
parent
113b47d871
commit
0a741670a9
74 changed files with 215 additions and 2120 deletions
|
@ -55,14 +55,14 @@ class TrackableObject : public TrackableObjectBase, public EventEmitter<T> {
|
|||
public:
|
||||
// Mark the JS object as destroyed.
|
||||
void MarkDestroyed() {
|
||||
v8::Local<v8::Object> wrapper = mate::Wrappable<T>::GetWrapper();
|
||||
v8::Local<v8::Object> wrapper = gin_helper::Wrappable<T>::GetWrapper();
|
||||
if (!wrapper.IsEmpty()) {
|
||||
wrapper->SetAlignedPointerInInternalField(0, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
bool IsDestroyed() {
|
||||
v8::Local<v8::Object> wrapper = mate::Wrappable<T>::GetWrapper();
|
||||
v8::Local<v8::Object> wrapper = gin_helper::Wrappable<T>::GetWrapper();
|
||||
return wrapper->InternalFieldCount() == 0 ||
|
||||
wrapper->GetAlignedPointerFromInternalField(0) == nullptr;
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ class TrackableObject : public TrackableObjectBase, public EventEmitter<T> {
|
|||
~TrackableObject() override { RemoveFromWeakMap(); }
|
||||
|
||||
void InitWith(v8::Isolate* isolate, v8::Local<v8::Object> wrapper) override {
|
||||
mate::WrappableBase::InitWith(isolate, wrapper);
|
||||
gin_helper::WrappableBase::InitWith(isolate, wrapper);
|
||||
if (!weak_map_) {
|
||||
weak_map_ = new electron::KeyWeakMap<int32_t>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue