Skip to content

Commit

Permalink
Merge pull request #110 from paveltkv/omp-jb56395
Browse files Browse the repository at this point in the history
[sailfishos][embedlite] Prevent invalid manifest location from being added. Fixes JB#56395
  • Loading branch information
rainemak committed Nov 17, 2021
2 parents 4b5eb37 + 12e8fc5 commit 9e7886b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion embedding/embedlite/EmbedLiteApp.cpp
Expand Up @@ -271,7 +271,12 @@ EmbedLiteApp::StartChildThread()
nsCOMPtr<nsIFile> f;
NS_NewNativeLocalFile(sComponentDirs[i], true,
getter_AddRefs(f));
XRE_AddManifestLocation(NS_APP_LOCATION, f);
if (f) {
LOGT("Loading manifest: %s", sComponentDirs[i].get());
XRE_AddManifestLocation(NS_APP_LOCATION, f);
} else {
NS_ERROR(nsPrintfCString("Failed to create nsIFile for manifest location: %s", sComponentDirs[i].get()).get());
}
}

GeckoLoader::InitEmbedding(mProfilePath);
Expand Down
2 changes: 1 addition & 1 deletion embedding/embedlite/embedshared/EmbedLiteAppBaseChild.cpp
Expand Up @@ -291,7 +291,7 @@ mozilla::ipc::IPCResult EmbedLiteAppBaseChild::RecvLoadComponentManifest(const n
LOGT("Loading manifest: %s", manifest.get());
XRE_AddManifestLocation(NS_APP_LOCATION, f);
} else {
NS_ERROR("Failed to create nsIFile for manifest location");
NS_ERROR(nsPrintfCString("Failed to create nsIFile for manifest location: %s", manifest.get()).get());
}
return IPC_OK();
}
Expand Down

0 comments on commit 9e7886b

Please sign in to comment.