Skip to content
This repository was archived by the owner on Nov 12, 2022. It is now read-only.

Commit 40823da

Browse files
committed
Add an API to retrieve the proxy family.
1 parent 57d27c3 commit 40823da

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/glue.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use jsapi::*;
2+
use std::os::raw::c_void;
23

34
pub enum Action { }
45
unsafe impl Sync for ProxyTraps { }
@@ -265,4 +266,5 @@ extern "C" {
265266
pub fn CallUnbarrieredObjectTracer(trc: *mut JSTracer,
266267
objp: *mut *mut JSObject,
267268
name: *const ::libc::c_char);
269+
pub fn GetProxyHandlerFamily() -> *const c_void;
268270
}

src/jsglue.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,12 @@ IsProxyHandlerFamily(JSObject* obj)
629629
return js::GetProxyHandler(obj)->family() == &HandlerFamily;
630630
}
631631

632+
const void*
633+
GetProxyHandlerFamily()
634+
{
635+
return &HandlerFamily;
636+
}
637+
632638
const void*
633639
GetProxyHandlerExtra(JSObject* obj)
634640
{

0 commit comments

Comments
 (0)