+2015-05-31 Yusuke Suzuki <utatane.tea@gmail.com>
+
+ [ES6] Drop WeakMap#clear
+ https://bugs.webkit.org/show_bug.cgi?id=145489
+
+ Reviewed by Mark Lam.
+
+ ES6 spec intentionally drops the WeakMap#clear
+ to allow engine to implement WeakMap as a per-object table.
+
+ This patch drops WeakMap.prototype.clear.
+
+ * runtime/WeakMapPrototype.cpp:
+ (JSC::WeakMapPrototype::finishCreation): Deleted.
+ (JSC::protoFuncWeakMapClear): Deleted.
+
2015-05-31 Jordan Harband <ljharb@gmail.com>
Array#reduce and reduceRight don't follow ToLength
const ClassInfo WeakMapPrototype::s_info = { "WeakMap", &Base::s_info, 0, CREATE_METHOD_TABLE(WeakMapPrototype) };
-static EncodedJSValue JSC_HOST_CALL protoFuncWeakMapClear(ExecState*);
static EncodedJSValue JSC_HOST_CALL protoFuncWeakMapDelete(ExecState*);
static EncodedJSValue JSC_HOST_CALL protoFuncWeakMapGet(ExecState*);
static EncodedJSValue JSC_HOST_CALL protoFuncWeakMapHas(ExecState*);
ASSERT(inherits(info()));
vm.prototypeMap.addPrototype(this);
- JSC_NATIVE_FUNCTION(vm.propertyNames->clear, protoFuncWeakMapClear, DontEnum, 0);
JSC_NATIVE_FUNCTION(vm.propertyNames->deleteKeyword, protoFuncWeakMapDelete, DontEnum, 1);
JSC_NATIVE_FUNCTION(vm.propertyNames->get, protoFuncWeakMapGet, DontEnum, 1);
JSC_NATIVE_FUNCTION(vm.propertyNames->has, protoFuncWeakMapHas, DontEnum, 1);
return nullptr;
}
-EncodedJSValue JSC_HOST_CALL protoFuncWeakMapClear(CallFrame* callFrame)
-{
- WeakMapData* map = getWeakMapData(callFrame, callFrame->thisValue());
- if (!map)
- return JSValue::encode(jsUndefined());
- map->clear();
- return JSValue::encode(jsUndefined());
-}
-
EncodedJSValue JSC_HOST_CALL protoFuncWeakMapDelete(CallFrame* callFrame)
{
WeakMapData* map = getWeakMapData(callFrame, callFrame->thisValue());