Sign in
webkit
/
WebKit
/
9f9c15eb6fdc193d77c7e606d643d4b8ec49399b
/
.
/
JSTests
/
es6
/
WeakSet_constructor_invokes_add.js
blob: d4d650aa007a695999204a9053ccbc0970696d46 [
file
] [
log
] [
blame
]
function
test
()
{
var
passed
=
false
;
var
_add
=
WeakSet
.
prototype
.
add
;
WeakSet
.
prototype
.
add
=
function
(
v
)
{
passed
=
true
;
};
new
WeakSet
([
{
}
]);
WeakSet
.
prototype
.
add
=
_add
;
return
passed
;
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);