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

Commit a4a693b

Browse files
author
bors-servo
authored
Auto merge of #289 - jdm:proxyfamily, r=nox
Add an API to retrieve the proxy family. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-mozjs/289) <!-- Reviewable:end -->
2 parents c5a3b61 + 40823da commit a4a693b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/glue.rs

+2
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

+6
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)