Bug 1071217 - Explicitly initialize the image module from gfxPlatform::Init. r=bas

--HG--
extra : rebase_source : c4c96ff051347dd85e053669533bd00d6120c75a
This commit is contained in:
Seth Fowler 2014-11-11 17:28:50 -08:00
parent baa28ca708
commit aa9efcdeea
2 changed files with 8 additions and 1 deletions

View File

@ -374,7 +374,6 @@ skip-if = toolkit == 'android' || (os == 'win' && !debug) || (os == 'mac' && !de
skip-if = (toolkit == 'android' && processor == 'x86') #x86 only bug 914439
[test_fastSeek-forwards.html]
[test_imagecapture.html]
skip-if = toolkit == 'android' # bug 1071217 - crashes on 2.3
[test_info_leak.html]
[test_invalid_reject.html]
[test_invalid_reject_play.html]

View File

@ -66,6 +66,8 @@
#include "cairo.h"
#include "qcms.h"
#include "imgITools.h"
#include "plstr.h"
#include "nsCRT.h"
#include "GLContext.h"
@ -445,6 +447,12 @@ gfxPlatform::Init()
obs->AddObserver(gPlatform->mMemoryPressureObserver, "memory-pressure", false);
}
// Request the imgITools service, implicitly initializing ImageLib.
nsCOMPtr<imgITools> imgTools = do_GetService("@mozilla.org/image/tools;1");
if (!imgTools) {
NS_RUNTIMEABORT("Could not initialize ImageLib");
}
RegisterStrongMemoryReporter(new GfxMemoryImageReporter());
}