}
if (manifestArtifact == null) {
if (artifacts.find(CompilationResult.class).isEmpty()) {
// Maybe hosted mode or junit, defer to fresh instance of superclass
return new CrossSiteIframeLinker().link(logger, context, toLink);
} else {
// When compiling for web mode, enforce that the manifest is present.
logger.log(TreeLogger.ERROR, "No gadget manifest found in ArtifactSet.");
throw new UnableToCompleteException();
}