try {
List<Future<CompileResult>> futures = Lists.newLinkedList();
// Process each content for work
for (JsContent code : content) {
JsResponse defaultCompiled = defaultCompiler.compile(jsUri, Lists.newArrayList(code), externs);
Future<CompileResult> future = null;
boolean compile = !code.isNoCompile() && !compileLevel.equals("none");
/*
* isDebug usually will turn off all compilation, however, setting
* isExternExportsEnabled and specifying an export path will keep the
* closure compiler on and export the externs for debugging.
*/
compile = compile && (!jsUri.isDebug() || options.isExternExportsEnabled());
if (compile) { // We should compile this code segment.
String cacheKey = makeCacheKey(defaultCompiled.toJsString(), externs, jsUri, options);
synchronized (compiling) {
CompileResult cached = cache.getElement(cacheKey);
if (cached == null) {
future = compiling.get(cacheKey);