mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
feat(script): implement some of the non-ordinary internal methods of Location
<https://html.spec.whatwg.org/multipage/#the-location-interface> - `[[GetPrototypeOf]]`: not yet - `[[SetPrototypeOf]]`: not yet - `[[IsExtensible]]`: `proxyhandler::is_extensible` - `[[PreventExtensions]]`: `proxyhandler::prevent_extensions` - `[[GetOwnProperty]]`: `CGDOMJSProxyHandler_getOwnPropertyDescriptor` (updated) - `[[DefineOwnProperty]]`: `CGDOMJSProxyHandler_defineProperty` (updated) - `[[Get]]`: `CGDOMJSProxyHandler_get` (updated) - `[[Set]]`: not yet - `[[Delete]]`: `CGDOMJSProxyHandler_delete` (updated) - `[[OwnPropertyKeys]]`: `CGDOMJSProxyHandler_ownPropertyKeys` (updated)
This commit is contained in:
parent
1a033ba8a9
commit
41cce140bc
4 changed files with 557 additions and 30 deletions
|
@ -1084,6 +1084,9 @@ pub fn new_window_proxy_handler() -> WindowProxyHandler {
|
|||
// These traps often throw security errors, and only pass on calls to methods
|
||||
// defined in the DissimilarOriginWindow IDL.
|
||||
|
||||
// TODO: reuse the infrastructure in `proxyhandler.rs`. For starters, the calls
|
||||
// to this function should be replaced with those to
|
||||
// `report_cross_origin_denial`.
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn throw_security_error(cx: *mut JSContext, realm: InRealm) -> bool {
|
||||
if !JS_IsExceptionPending(cx) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue