mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fix panic in webstorage/symbol-props.window.js (#33108)
Issue: https://github.com/servo/servo/issues/32987 Signed-off-by: Akash Pateria <pateria.akash77@gmail.com>
This commit is contained in:
parent
f3e6188502
commit
c76524e63b
2 changed files with 21 additions and 1 deletions
|
@ -5563,6 +5563,22 @@ class CGProxyNamedDeleter(CGProxyNamedOperation):
|
|||
def __init__(self, descriptor):
|
||||
CGProxySpecialOperation.__init__(self, descriptor, 'NamedDeleter')
|
||||
|
||||
def define(self):
|
||||
# Our first argument is the id we're getting.
|
||||
argName = self.arguments[0].identifier.name
|
||||
return ("if !id.is_symbol() {\n"
|
||||
f' let {argName} = match jsid_to_string(*cx, Handle::from_raw(id)) {{\n'
|
||||
" Some(val) => val,\n"
|
||||
" None => {\n"
|
||||
" throw_type_error(*cx, \"Not a string-convertible JSID\");\n"
|
||||
" return false;\n"
|
||||
" }\n"
|
||||
" };\n"
|
||||
" let this = UnwrapProxy(proxy);\n"
|
||||
" let this = &*this;\n"
|
||||
f" {CGProxySpecialOperation.define(self)}"
|
||||
"}\n")
|
||||
|
||||
|
||||
class CGProxyUnwrap(CGAbstractMethod):
|
||||
def __init__(self, descriptor):
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
[symbol-props.window.html]
|
||||
expected: CRASH
|
||||
[localStorage: defineProperty not configurable]
|
||||
expected: FAIL
|
||||
|
||||
[sessionStorage: defineProperty not configurable]
|
||||
expected: FAIL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue