mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Remove all traces of C wrappers for SpiderMonkey class stubs.
This commit is contained in:
parent
7541b57526
commit
b87d351fee
4 changed files with 57 additions and 57 deletions
|
@ -6,11 +6,11 @@ use dom::bindings::utils::is_dom_proxy;
|
|||
use js::jsapi::{JSContext, jsid, JSPropertyDescriptor, JSObject, JSString, jschar};
|
||||
use js::jsapi::{JS_GetPropertyDescriptorById, JS_NewUCString, JS_malloc, JS_free};
|
||||
use js::jsapi::{JSBool, JS_DefinePropertyById, JS_NewObjectWithGivenProto};
|
||||
use js::jsapi::JS_StrictPropertyStub;
|
||||
use js::jsval::ObjectValue;
|
||||
use js::glue::GetProxyExtra;
|
||||
use js::glue::{GetObjectProto, GetObjectParent, SetProxyExtra, GetProxyHandler};
|
||||
use js::glue::InvokeGetOwnPropertyDescriptor;
|
||||
use js::crust::{JS_StrictPropertyStub};
|
||||
use js::{JSPROP_GETTER, JSPROP_ENUMERATE, JSPROP_READONLY, JSRESOLVE_QUALIFIED};
|
||||
|
||||
use std::cast;
|
||||
|
@ -46,7 +46,10 @@ pub extern fn getPropertyDescriptor(cx: *JSContext, proxy: *JSObject, id: jsid,
|
|||
pub fn defineProperty_(cx: *JSContext, proxy: *JSObject, id: jsid,
|
||||
desc: *JSPropertyDescriptor) -> JSBool {
|
||||
unsafe {
|
||||
if ((*desc).attrs & JSPROP_GETTER) != 0 && (*desc).setter == Some(JS_StrictPropertyStub) {
|
||||
//FIXME: Workaround for https://github.com/mozilla/rust/issues/13385
|
||||
let setter: *libc::c_void = cast::transmute((*desc).setter);
|
||||
let setter_stub: *libc::c_void = cast::transmute(JS_StrictPropertyStub);
|
||||
if ((*desc).attrs & JSPROP_GETTER) != 0 && setter == setter_stub {
|
||||
/*return JS_ReportErrorFlagsAndNumber(cx,
|
||||
JSREPORT_WARNING | JSREPORT_STRICT |
|
||||
JSREPORT_STRICT_MODE_ERROR,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue