Bug 718072 - WeakMaps constructor doesn't always get initialized on the global object. r=Waldo

This commit is contained in:
Bobby Holley 2012-01-18 19:10:04 -08:00
parent ab18051b4f
commit 1a624ca8b9
2 changed files with 3 additions and 0 deletions

View File

@ -1851,6 +1851,7 @@ static JSStdName standard_class_names[] = {
{js_InitTypedArrayClasses, EAGER_CLASS_ATOM(Uint8ClampedArray),
TYPED_ARRAY_CLASP(TYPE_UINT8_CLAMPED)},
{js_InitWeakMapClass, EAGER_ATOM_AND_CLASP(WeakMap)},
{js_InitProxyClass, EAGER_ATOM_AND_CLASP(Proxy)},
{NULL, 0, NULL, NULL}

View File

@ -44,6 +44,7 @@
#include "jsexn.h"
#include "jsmath.h"
#include "json.h"
#include "jsweakmap.h"
#include "builtin/RegExp.h"
#include "frontend/BytecodeEmitter.h"
@ -319,6 +320,7 @@ GlobalObject::initStandardClasses(JSContext *cx)
js_InitIteratorClasses(cx, this) &&
#endif
js_InitDateClass(cx, this) &&
js_InitWeakMapClass(cx, this) &&
js_InitProxyClass(cx, this);
}