Bug 934889: Use JS_InitStandardClasses everywhere now that it works. r=bz

This commit is contained in:
Kyle Huey 2016-04-01 11:28:47 -07:00
Родитель b3613ec89e
Коммит e0648b2c3a
1 изменённых файлов: 0 добавлений и 5 удалений

Просмотреть файл

@ -3003,9 +3003,6 @@ struct CreateGlobalOptions
{
static MOZ_CONSTEXPR_VAR ProtoAndIfaceCache::Kind ProtoAndIfaceCacheKind =
ProtoAndIfaceCache::NonWindowLike;
// Intl API is broken and makes JS_InitStandardClasses fail intermittently,
// see bug 934889.
static MOZ_CONSTEXPR_VAR bool ForceInitStandardClassesToFalse = true;
static void TraceGlobal(JSTracer* aTrc, JSObject* aObj)
{
mozilla::dom::TraceProtoAndIfaceCache(aTrc, aObj);
@ -3023,7 +3020,6 @@ struct CreateGlobalOptions<nsGlobalWindow>
{
static MOZ_CONSTEXPR_VAR ProtoAndIfaceCache::Kind ProtoAndIfaceCacheKind =
ProtoAndIfaceCache::WindowLike;
static MOZ_CONSTEXPR_VAR bool ForceInitStandardClassesToFalse = false;
static void TraceGlobal(JSTracer* aTrc, JSObject* aObj);
static bool PostCreateGlobal(JSContext* aCx, JS::Handle<JSObject*> aGlobal);
};
@ -3074,7 +3070,6 @@ CreateGlobal(JSContext* aCx, T* aNative, nsWrapperCache* aCache,
}
if (aInitStandardClasses &&
!CreateGlobalOptions<T>::ForceInitStandardClassesToFalse &&
!JS_InitStandardClasses(aCx, aGlobal)) {
NS_WARNING("Failed to init standard classes");
return nullptr;