mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Use the custom defineProperty trap when it exists.
This commit is contained in:
parent
c82eb3b1a4
commit
ade0b7be8e
3 changed files with 5 additions and 19 deletions
|
@ -2086,11 +2086,14 @@ class CGDefineProxyHandler(CGAbstractMethod):
|
||||||
return CGAbstractMethod.define(self)
|
return CGAbstractMethod.define(self)
|
||||||
|
|
||||||
def definition_body(self):
|
def definition_body(self):
|
||||||
|
customDefineProperty = 'defineProperty_'
|
||||||
|
if self.descriptor.operations['IndexedSetter'] or self.descriptor.operations['NamedSetter']:
|
||||||
|
customDefineProperty = 'defineProperty'
|
||||||
body = """\
|
body = """\
|
||||||
let traps = ProxyTraps {
|
let traps = ProxyTraps {
|
||||||
getPropertyDescriptor: Some(getPropertyDescriptor),
|
getPropertyDescriptor: Some(getPropertyDescriptor),
|
||||||
getOwnPropertyDescriptor: Some(getOwnPropertyDescriptor),
|
getOwnPropertyDescriptor: Some(getOwnPropertyDescriptor),
|
||||||
defineProperty: Some(defineProperty_),
|
defineProperty: Some(%s),
|
||||||
getOwnPropertyNames: ptr::null(),
|
getOwnPropertyNames: ptr::null(),
|
||||||
delete_: Some(delete_),
|
delete_: Some(delete_),
|
||||||
enumerate: ptr::null(),
|
enumerate: ptr::null(),
|
||||||
|
@ -2120,7 +2123,7 @@ let traps = ProxyTraps {
|
||||||
};
|
};
|
||||||
|
|
||||||
CreateProxyHandler(&traps, &Class as *const _ as *const _)
|
CreateProxyHandler(&traps, &Class as *const _ as *const _)
|
||||||
""" % (FINALIZE_HOOK_NAME,
|
""" % (customDefineProperty, FINALIZE_HOOK_NAME,
|
||||||
TRACE_HOOK_NAME)
|
TRACE_HOOK_NAME)
|
||||||
return CGGeneric(body)
|
return CGGeneric(body)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[storage_session_length_js.html]
|
|
||||||
type: testharness
|
|
||||||
[Web Storage]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
[storage_session_setitem_js.html]
|
[storage_session_setitem_js.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
[Web Storage 2]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Web Storage 3]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Web Storage 4]
|
[Web Storage 4]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -24,9 +18,3 @@
|
||||||
[Web Storage 10]
|
[Web Storage 10]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Web Storage 12]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Web Storage 14]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue