diff options
author | yvt <i@yvt.jp> | 2021-07-16 01:01:24 +0900 |
---|---|---|
committer | yvt <i@yvt.jp> | 2021-07-16 01:26:05 +0900 |
commit | 41cce140bce74d12d487ff363f0daad54dc7c30f (patch) | |
tree | b49c1cda55c3a2f2f8f623eef407ce9ead8effc7 /components/script/dom/windowproxy.rs | |
parent | 1a033ba8a99bd74fa487a68e81a681441e8eea0b (diff) | |
download | servo-41cce140bce74d12d487ff363f0daad54dc7c30f.tar.gz servo-41cce140bce74d12d487ff363f0daad54dc7c30f.zip |
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)
Diffstat (limited to 'components/script/dom/windowproxy.rs')
-rw-r--r-- | components/script/dom/windowproxy.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/components/script/dom/windowproxy.rs b/components/script/dom/windowproxy.rs index 244b42dc8a5..bccded0f43c 100644 --- a/components/script/dom/windowproxy.rs +++ b/components/script/dom/windowproxy.rs @@ -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) { |