* Migrate to 2024 edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Allow unsafe_op_in_unsafe_fn lint
This lint warns by default in the 2024
edition, but is *way* too noisy for servo.
We might enable it in the future, but not now.
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Compile using the 2024 edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Use 2024 style edition
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Reformat all code
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
---------
Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* simple conversion from byte string to c-string
Signed-off-by: Bum Kim <bumcrystlbum@gmail.com>
* convert byte strings to c-strings to c_char ptr
Signed-off-by: Bum Kim <bumcrystlbum@gmail.com>
---------
Signed-off-by: Bum Kim <bumcrystlbum@gmail.com>
Several /webidl/ecmascript-binding/window-named-properties-object.html
subtests, including the “[[GetOwnProperty]]” and “[[HasProperty]]”
subtests, expect iframe.contentWindow.Window.prototype[0] to return an
element with id “0”.
This commit makes the getOwnPropertyDescriptor trap accept property
keys that are integer indices, by converting them to a DOMString just
like we would for a property key that is a JSString.
Calling throw_type_error in the [[DefineOwnProperty]] trap (and
returning false) makes the internal method throw a TypeError, which
means both Object#defineProperty and Reflect#defineProperty will throw
a TypeError, but we actually want the latter to return false.
This commit makes the trap set ObjectOpResult to a TypeError (and
return true), making the internal method return false per the spec [1]
and in turn allowing Reflect#defineProperty to return false.
[1] https://webidl.spec.whatwg.org/#named-properties-object-defineownproperty