Backout bug 684110 (08b6eaf6aad0, cf8b35fa1010, 25ee45edabe1, 659f5c7d2cc9, 870f6dd82586 & e1ad65d6a7fd) and bug 684344 (cd1957f6628d) on a CLOSED TREE; a=bustage-fairies

This commit is contained in:
Ed Morley
2011-09-03 03:21:25 +01:00
parent cb5431e87b
commit ee57bf1d01
75 changed files with 1010 additions and 740 deletions

View File

@@ -78,6 +78,12 @@ WeakMapBase::sweepAll(JSTracer *tracer)
} /* namespace js */
bool
JSObject::isWeakMap() const
{
return getClass() == &WeakMapClass;
}
typedef WeakMap<JSObject *, Value> ObjectValueMap;
static ObjectValueMap *
@@ -258,7 +264,9 @@ WeakMap_construct(JSContext *cx, uintN argc, Value *vp)
return true;
}
Class js::WeakMapClass = {
namespace js {
Class WeakMapClass = {
"WeakMap",
JSCLASS_HAS_PRIVATE |
JSCLASS_HAS_CACHED_PROTO(JSProto_WeakMap),
@@ -279,6 +287,8 @@ Class js::WeakMapClass = {
WeakMap_mark
};
}
static JSFunctionSpec weak_map_methods[] = {
JS_FN("has", WeakMap_has, 1, 0),
JS_FN("get", WeakMap_get, 2, 0),