Skip to content

Commit

Permalink
feat: support ScopedPersistent<v8::Context>
Browse files Browse the repository at this point in the history
  • Loading branch information
david committed Aug 14, 2024
1 parent 903550a commit b67f643
Show file tree
Hide file tree
Showing 11 changed files with 54 additions and 408 deletions.
1 change: 0 additions & 1 deletion bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,6 @@ elseif ($ENV{WEBF_JS_ENGINE} MATCHES "v8")
bindings/v8/wrapper_type_info.cc
bindings/v8/v8_interface_bridge_base.cc
bindings/v8/v8_initializer.cc
# bindings/v8/platform/script_state.cc
bindings/v8/platform/scoped_persistent.h
bindings/v8/platform/v8_per_context_data.cc
bindings/v8/platform/v8_per_isolate_data.cc
Expand Down
4 changes: 2 additions & 2 deletions bridge/bindings/v8/platform/scoped_persistent.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class ScopedPersistent {

~ScopedPersistent() { Clear(); }

ALWAYS_INLINE v8::Local<T> NewLocal(v8::Isolate* isolate) const {
inline v8::Local<T> NewLocal(v8::Isolate* isolate) const {
return v8::Local<T>::New(isolate, handle_);
}

Expand Down Expand Up @@ -66,7 +66,7 @@ class ScopedPersistent {
return handle_ == other;
}

ALWAYS_INLINE v8::Persistent<T>& Get() { return handle_; }
inline v8::Persistent<T>& Get() { return handle_; }

private:
v8::Persistent<T> handle_;
Expand Down
87 changes: 0 additions & 87 deletions bridge/bindings/v8/platform/script_state.cc

This file was deleted.

Loading

0 comments on commit b67f643

Please sign in to comment.