We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fde94b commit bc90962Copy full SHA for bc90962
src/rust/jsg-macros/lib.rs
@@ -58,6 +58,9 @@ pub fn jsg_struct(attr: TokenStream, item: TokenStream) -> TokenStream {
58
fn wrap<'a, 'b>(this: Self::This, lock: &'a mut jsg::Lock) -> jsg::v8::Local<'b, jsg::v8::Value>
59
where 'b: 'a,
60
{
61
+ // TODO(soon): Use a precached ObjectTemplate instance to create the object,
62
+ // similar to how C++ JSG optimizes object creation. This would avoid recreating
63
+ // the object shape on every wrap() call and improve performance.
64
unsafe {
65
let mut obj = lock.new_object();
66
#(#field_assignments)*
0 commit comments