Bug 1867289 - Do not rebuild platform.ini on artifact builds r=nalexander,glandium,mkaply

Differential Revision: https://phabricator.services.mozilla.com/D198016
This commit is contained in:
Alexandre Lissy 2024-01-23 12:08:59 +00:00
parent a0f83ca7c6
commit 981dbbac44
4 changed files with 32 additions and 4 deletions

View File

@ -1,6 +1,6 @@
[DEFAULT]
run-if = ["crashreporter"]
skip-if = ["!debug", "artifact"]
skip-if = ["!debug"]
support-files = ["head.js"]
prefs = [

View File

@ -131,6 +131,7 @@
#include "mozilla/ContentPrincipal.h"
#include "nsSystemInfo.h"
#include "nsXULPopupManager.h"
#ifdef NS_PRINTING
@ -3738,10 +3739,32 @@ void nsFrameLoader::SetWillChangeProcess() {
docshell->SetWillChangeProcess();
}
static mozilla::Result<bool, nsresult> DidBuildIDChange() {
static mozilla::Result<bool, nsresult> BuildIDMismatchMemoryAndDisk() {
nsresult rv;
nsCOMPtr<nsIFile> file;
#if defined(ANDROID)
// Android packages on installation will stop existing instance, so we
// cannot run into this problem.
return false;
#endif // defined(ANDROID)
#if defined(XP_WIN)
{
// Windows Store packages cannot run into this problem.
nsCOMPtr<nsIPropertyBag2> infoService =
do_GetService("@mozilla.org/system-info;1");
MOZ_ASSERT(infoService, "Could not find a system info service");
bool isMSIX;
nsresult rv = infoService->GetPropertyAsBool(u"isPackagedApp"_ns, &isMSIX);
if (NS_SUCCEEDED(rv)) {
if (isMSIX) {
return false;
}
}
}
#endif
rv = NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(file));
MOZ_TRY(rv);
@ -3802,7 +3825,7 @@ void nsFrameLoader::MaybeNotifyCrashed(BrowsingContext* aBrowsingContext,
// Fire the actual crashed event.
nsString eventName;
if (aChannel && !aChannel->DoBuildIDsMatch()) {
auto changedOrError = DidBuildIDChange();
auto changedOrError = BuildIDMismatchMemoryAndDisk();
if (changedOrError.isErr()) {
NS_WARNING("Error while checking buildid mismatch");
eventName = u"oop-browser-buildid-mismatch"_ns;

View File

@ -555,6 +555,7 @@ class LinuxArtifactJob(ArtifactJob):
"{product}/{product}-bin",
"{product}/minidump-analyzer",
"{product}/pingsender",
"{product}/platform.ini",
"{product}/plugin-container",
"{product}/updater",
"{product}/glxtest",
@ -718,6 +719,7 @@ class MacArtifactJob(ArtifactJob):
"gmp-clearkey/0.1/libclearkey.dylib",
# 'gmp-fake/1.0/libfake.dylib',
# 'gmp-fakeopenh264/1.0/libfakeopenh264.dylib',
"platform.ini",
],
)
]
@ -769,6 +771,7 @@ class WinArtifactJob(ArtifactJob):
_package_artifact_patterns = {
"{product}/dependentlibs.list",
"{product}/platform.ini",
"{product}/**/*.dll",
"{product}/*.exe",
"{product}/*.tlb",

View File

@ -277,7 +277,9 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
CXXFLAGS += CONFIG["MOZ_PANGO_CFLAGS"]
DEFINES["TOPOBJDIR"] = TOPOBJDIR
FINAL_TARGET_PP_FILES += ["platform.ini"]
if not CONFIG["MOZ_ARTIFACT_BUILDS"]:
FINAL_TARGET_PP_FILES += ["platform.ini"]
if CONFIG["ENABLE_TESTS"]:
DIRS += ["test/gtest"]