Sign in
webkit
/
WebKit
/
2459939e8cc33aa793cfbafafc3ea7911bf42db7
/
.
/
JSTests
/
es6
/
WeakMap_no_WeakMap.prototype.clear_method.js
blob: a17576f21304774fa4c990e460cda3418158cfd3 [
file
] [
log
] [
blame
]
function
test
()
{
if
(!(
"clear"
in
WeakMap
.
prototype
))
{
return
true
;
}
var
m
=
new
WeakMap
();
var
key
=
{};
m
.
set
(
key
,
2
);
m
.
clear
();
return
m
.
has
(
key
);
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);