mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Merge mozilla-central to autoland. a=merge on a CLOSED TREE
This commit is contained in:
commit
d497a06e29
20
Makefile.in
20
Makefile.in
@ -65,6 +65,26 @@ CLOBBER: $(topsrcdir)/CLOBBER
|
||||
@exit 1
|
||||
endif
|
||||
|
||||
# Regenerate the build backend if it is out of date. We only have this rule in
|
||||
# this main make file because having it in rules.mk and applied to partial tree
|
||||
# builds resulted in a world of hurt. Gory details are in bug 877308.
|
||||
#
|
||||
# The mach build driver will ensure the backend is up to date for partial tree
|
||||
# builds. This cleanly avoids most of the pain.
|
||||
|
||||
ifndef TEST_MOZBUILD
|
||||
|
||||
.PHONY: backend
|
||||
backend: $(BUILD_BACKEND_FILES)
|
||||
|
||||
include $(topsrcdir)/build/rebuild-backend.mk
|
||||
|
||||
Makefile: $(BUILD_BACKEND_FILES)
|
||||
@$(TOUCH) $@
|
||||
|
||||
default:: $(BUILD_BACKEND_FILES)
|
||||
endif
|
||||
|
||||
install_manifests := \
|
||||
$(addprefix dist/,branding include public private xpi-stage) \
|
||||
_tests \
|
||||
|
31
build/rebuild-backend.mk
Normal file
31
build/rebuild-backend.mk
Normal file
@ -0,0 +1,31 @@
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
BACKEND_GENERATION_SCRIPT ?= config.status
|
||||
|
||||
# A traditional rule would look like this:
|
||||
# backend.%:
|
||||
# @echo do stuff
|
||||
#
|
||||
# But with -j<n>, and multiple items in BUILD_BACKEND_FILES, the command would
|
||||
# run multiple times in parallel.
|
||||
#
|
||||
# "Fortunately", make has some weird semantics for pattern rules: if there are
|
||||
# multiple targets in a pattern rule and each of them is matched at most once,
|
||||
# the command will only run once. So:
|
||||
# backend%RecursiveMakeBackend backend%FasterMakeBackend:
|
||||
# @echo do stuff
|
||||
# backend: backend.RecursiveMakeBackend backend.FasterMakeBackend
|
||||
# would only execute the command once.
|
||||
#
|
||||
# Credit where due: http://stackoverflow.com/questions/2973445/gnu-makefile-rule-generating-a-few-targets-from-a-single-source-file/3077254#3077254
|
||||
$(subst .,%,$(BUILD_BACKEND_FILES)):
|
||||
@echo 'Build configuration changed. Regenerating backend.'
|
||||
$(PYTHON) $(BACKEND_GENERATION_SCRIPT)
|
||||
|
||||
define build_backend_rule
|
||||
$(1): $$(wildcard $$(shell cat $(1).in))
|
||||
|
||||
endef
|
||||
$(foreach file,$(BUILD_BACKEND_FILES),$(eval $(call build_backend_rule,$(file))))
|
@ -784,7 +784,6 @@ skip-if = os == "win"
|
||||
[browser_dbg-wasm-sourcemaps.js]
|
||||
skip-if = true
|
||||
[browser_dbg-windowless-workers.js]
|
||||
skip-if = (os == "win" && coverage) || (os == "mac" && !debug) || (os == "linux") #Bug 1529867
|
||||
[browser_dbg-windowless-workers-early-breakpoint.js]
|
||||
[browser_dbg-event-handler.js]
|
||||
[browser_dbg-eval-throw.js]
|
||||
|
@ -11155,8 +11155,6 @@ void Document::DocAddSizeOfExcludingThis(nsWindowSizes& aWindowSizes) const {
|
||||
mPresShell->AddSizeOfIncludingThis(aWindowSizes);
|
||||
}
|
||||
|
||||
mStyleSet->AddSizeOfIncludingThis(aWindowSizes);
|
||||
|
||||
aWindowSizes.mDOMOtherSize += mLangGroupFontPrefs.SizeOfExcludingThis(
|
||||
aWindowSizes.mState.mMallocSizeOf);
|
||||
|
||||
|
@ -126,9 +126,9 @@ bool CrashReporterHost::FinalizeCrashReport() {
|
||||
// This check will pick up some cases that will never happen (e.g. IPDL
|
||||
// unit tests), but that's OK.
|
||||
switch (mProcessType) {
|
||||
#define GECKO_PROCESS_TYPE(enum_name, string_name, xre_name, bin_type) \
|
||||
case GeckoProcessType_##enum_name: \
|
||||
type.AssignLiteral(string_name); \
|
||||
#define GECKO_PROCESS_TYPE(enum_name, string_name, xre_name) \
|
||||
case GeckoProcessType_##enum_name: \
|
||||
type.AssignLiteral(string_name); \
|
||||
break;
|
||||
#include "mozilla/GeckoProcessTypes.h"
|
||||
#undef GECKO_PROCESS_TYPE
|
||||
@ -199,9 +199,9 @@ void CrashReporterHost::NotifyCrashService(GeckoProcessType aProcessType,
|
||||
telemetryKey.AssignLiteral("pluginhang");
|
||||
} else {
|
||||
switch (aProcessType) {
|
||||
#define GECKO_PROCESS_TYPE(enum_name, string_name, xre_name, bin_type) \
|
||||
case GeckoProcessType_##enum_name: \
|
||||
telemetryKey.AssignLiteral(string_name); \
|
||||
#define GECKO_PROCESS_TYPE(enum_name, string_name, xre_name) \
|
||||
case GeckoProcessType_##enum_name: \
|
||||
telemetryKey.AssignLiteral(string_name); \
|
||||
break;
|
||||
#include "mozilla/GeckoProcessTypes.h"
|
||||
#undef GECKO_PROCESS_TYPE
|
||||
|
@ -10559,6 +10559,8 @@ void PresShell::AddSizeOfIncludingThis(nsWindowSizes& aSizes) const {
|
||||
mPendingScrollAnchorSelection.ShallowSizeOfExcludingThis(mallocSizeOf) +
|
||||
mPendingScrollAnchorAdjustment.ShallowSizeOfExcludingThis(mallocSizeOf);
|
||||
|
||||
StyleSet()->AddSizeOfIncludingThis(aSizes);
|
||||
|
||||
aSizes.mLayoutTextRunsSize += SizeOfTextRuns(mallocSizeOf);
|
||||
|
||||
aSizes.mLayoutPresContextSize +=
|
||||
|
@ -197,49 +197,6 @@ class MozbuildObject(ProcessExecutionMixin):
|
||||
|
||||
return mozpath.normsep(os.path.normpath(topobjdir))
|
||||
|
||||
def build_out_of_date(self, output, dep_file):
|
||||
if not os.path.isfile(output):
|
||||
print(" Output reference file not found: %s" % output)
|
||||
return True
|
||||
if not os.path.isfile(dep_file):
|
||||
print(" Dependency file not found: %s" % dep_file)
|
||||
return True
|
||||
|
||||
deps = []
|
||||
with open(dep_file, 'r') as fh:
|
||||
deps = fh.read().splitlines()
|
||||
|
||||
mtime = os.path.getmtime(output)
|
||||
for f in deps:
|
||||
try:
|
||||
dep_mtime = os.path.getmtime(f)
|
||||
except OSError as e:
|
||||
if e.errno == errno.ENOENT:
|
||||
print(" Input not found: %s" % f)
|
||||
return True
|
||||
raise
|
||||
if dep_mtime > mtime:
|
||||
print(" %s is out of date with respect to %s" % (output, f))
|
||||
return True
|
||||
return False
|
||||
|
||||
def backend_out_of_date(self, backend_file):
|
||||
if not os.path.isfile(backend_file):
|
||||
return True
|
||||
|
||||
# Check if any of our output files have been removed since
|
||||
# we last built the backend, re-generate the backend if
|
||||
# so.
|
||||
outputs = []
|
||||
with open(backend_file, 'r') as fh:
|
||||
outputs = fh.read().splitlines()
|
||||
for output in outputs:
|
||||
if not os.path.isfile(mozpath.join(self.topobjdir, output)):
|
||||
return True
|
||||
|
||||
dep_file = '%s.in' % backend_file
|
||||
return self.build_out_of_date(backend_file, dep_file)
|
||||
|
||||
@property
|
||||
def topobjdir(self):
|
||||
if self._topobjdir is None:
|
||||
|
@ -1014,6 +1014,49 @@ class BuildDriver(MozbuildObject):
|
||||
if directory.startswith('/'):
|
||||
directory = directory[1:]
|
||||
|
||||
def build_out_of_date(output, dep_file):
|
||||
if not os.path.isfile(output):
|
||||
print(" Output reference file not found: %s" % output)
|
||||
return True
|
||||
if not os.path.isfile(dep_file):
|
||||
print(" Configure dependency file not found: %s" % dep_file)
|
||||
return True
|
||||
|
||||
deps = []
|
||||
with open(dep_file, 'r') as fh:
|
||||
deps = fh.read().splitlines()
|
||||
|
||||
mtime = os.path.getmtime(output)
|
||||
for f in deps:
|
||||
try:
|
||||
dep_mtime = os.path.getmtime(f)
|
||||
except OSError as e:
|
||||
if e.errno == errno.ENOENT:
|
||||
print(" Configure input not found: %s" % f)
|
||||
return True
|
||||
raise
|
||||
if dep_mtime > mtime:
|
||||
print(" %s is out of date with respect to %s" % (output, f))
|
||||
return True
|
||||
return False
|
||||
|
||||
def backend_out_of_date(backend_file):
|
||||
if not os.path.isfile(backend_file):
|
||||
return True
|
||||
|
||||
# Check if any of our output files have been removed since
|
||||
# we last built the backend, re-generate the backend if
|
||||
# so.
|
||||
outputs = []
|
||||
with open(backend_file, 'r') as fh:
|
||||
outputs = fh.read().splitlines()
|
||||
for output in outputs:
|
||||
if not os.path.isfile(mozpath.join(self.topobjdir, output)):
|
||||
return True
|
||||
|
||||
dep_file = '%s.in' % backend_file
|
||||
return build_out_of_date(backend_file, dep_file)
|
||||
|
||||
monitor.start_resource_recording()
|
||||
|
||||
self.mach_context.command_attrs['clobber'] = False
|
||||
@ -1041,10 +1084,10 @@ class BuildDriver(MozbuildObject):
|
||||
config_rc = None
|
||||
# Even if we have a config object, it may be out of date
|
||||
# if something that influences its result has changed.
|
||||
if config is None or self.build_out_of_date(mozpath.join(self.topobjdir,
|
||||
'config.status'),
|
||||
mozpath.join(self.topobjdir,
|
||||
'config_status_deps.in')):
|
||||
if config is None or build_out_of_date(mozpath.join(self.topobjdir,
|
||||
'config.status'),
|
||||
mozpath.join(self.topobjdir,
|
||||
'config_status_deps.in')):
|
||||
if previous_backend and 'Make' not in previous_backend:
|
||||
clobber_requested = self._clobber_configure()
|
||||
|
||||
@ -1063,16 +1106,16 @@ class BuildDriver(MozbuildObject):
|
||||
|
||||
status = None
|
||||
|
||||
if (not config_rc and
|
||||
self.backend_out_of_date(mozpath.join(self.topobjdir,
|
||||
'backend.%sBackend' %
|
||||
active_backend))):
|
||||
print('Build configuration changed. Regenerating backend.')
|
||||
args = [config.substs['PYTHON'],
|
||||
mozpath.join(self.topobjdir, 'config.status')]
|
||||
self.run_process(args, cwd=self.topobjdir, pass_thru=True)
|
||||
|
||||
if 'Make' not in active_backend:
|
||||
if (not config_rc and
|
||||
backend_out_of_date(mozpath.join(self.topobjdir,
|
||||
'backend.%sBackend' %
|
||||
active_backend))):
|
||||
print('Build configuration changed. Regenerating backend.')
|
||||
args = [config.substs['PYTHON'],
|
||||
mozpath.join(self.topobjdir, 'config.status')]
|
||||
self.run_process(args, cwd=self.topobjdir, pass_thru=True)
|
||||
|
||||
# client.mk has its own handling of MOZ_PARALLEL_BUILD so the
|
||||
# make backend can determine when to run in single-threaded mode
|
||||
# or parallel mode. For other backends, we can pass in the value
|
||||
@ -1138,6 +1181,15 @@ class BuildDriver(MozbuildObject):
|
||||
'instead of {target_pairs}.')
|
||||
target_pairs = new_pairs
|
||||
|
||||
# Ensure build backend is up to date. The alternative is to
|
||||
# have rules in the invoked Makefile to rebuild the build
|
||||
# backend. But that involves make reinvoking itself and there
|
||||
# are undesired side-effects of this. See bug 877308 for a
|
||||
# comprehensive history lesson.
|
||||
self._run_make(directory=self.topobjdir, target='backend',
|
||||
line_handler=output.on_line, log=False,
|
||||
print_directory=False, keep_going=keep_going)
|
||||
|
||||
# Build target pairs.
|
||||
for make_dir, make_target in target_pairs:
|
||||
# We don't display build status messages during partial
|
||||
|
@ -544,12 +544,16 @@ class TestResolver(MozbuildObject):
|
||||
# If installing tests is going to result in re-generating the build
|
||||
# backend, we need to do this here, so that the updated contents of
|
||||
# all-tests.pkl make it to the set of tests to run.
|
||||
if self.backend_out_of_date(mozpath.join(self.topobjdir,
|
||||
'backend.TestManifestBackend'
|
||||
)):
|
||||
print("Test configuration changed. Regenerating backend.")
|
||||
from mozbuild.gen_test_backend import gen_test_backend
|
||||
gen_test_backend()
|
||||
self._run_make(
|
||||
target='backend.TestManifestBackend', pass_thru=True, print_directory=False,
|
||||
filename=mozpath.join(self.topsrcdir, 'build', 'rebuild-backend.mk'),
|
||||
append_env={
|
||||
b'PYTHON': self.virtualenv_manager.python_path,
|
||||
b'BUILD_BACKEND_FILES': b'backend.TestManifestBackend',
|
||||
b'BACKEND_GENERATION_SCRIPT': mozpath.join(
|
||||
self.topsrcdir, 'build', 'gen_test_backend.py'),
|
||||
},
|
||||
)
|
||||
|
||||
self._tests = TestMetadata(os.path.join(self.topobjdir,
|
||||
'all-tests.pkl'),
|
||||
|
@ -4,35 +4,28 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// GECKO_PROCESS_TYPE(enum-name, string-name, XRE_Is${NAME}Process, process-bin-type)
|
||||
// GECKO_PROCESS_TYPE(enum-name, string-name, XRE_Is${NAME}Process)
|
||||
// Note that string-name is exposed to various things like telemetry
|
||||
// and the crash reporter, so it should not be changed casually.
|
||||
//
|
||||
// process-bin-type should be either Self or PluginContainer, and determines
|
||||
// whether the child process may be started using the same binary as the parent
|
||||
// process, or whether to use plugin-container (Note that whether or not this
|
||||
// value is actually obeyed depends on platform and build configuration. Do not
|
||||
// use this value directly, but rather use XRE_GetChildProcBinPathType to
|
||||
// resolve this).
|
||||
//
|
||||
// The values generated for the GeckoProcessType enum are dependent on
|
||||
// the ordering of the GECKO_PROCESS_TYPE invocations in this file, and
|
||||
// said values are exposed to things like telemetry as well, so please
|
||||
// do not reorder lines in this file.
|
||||
//
|
||||
// Please add new process types at the end of this list.
|
||||
GECKO_PROCESS_TYPE(Default, "default", Parent, Self)
|
||||
GECKO_PROCESS_TYPE(Plugin, "plugin", Plugin, PluginContainer)
|
||||
GECKO_PROCESS_TYPE(Content, "tab", Content, Self)
|
||||
GECKO_PROCESS_TYPE(IPDLUnitTest, "ipdlunittest", IPDLUnitTest, PluginContainer)
|
||||
GECKO_PROCESS_TYPE(Default, "default", Parent)
|
||||
GECKO_PROCESS_TYPE(Plugin, "plugin", Plugin)
|
||||
GECKO_PROCESS_TYPE(Content, "tab", Content)
|
||||
GECKO_PROCESS_TYPE(IPDLUnitTest, "ipdlunittest", IPDLUnitTest)
|
||||
// Gecko Media Plugin process.
|
||||
GECKO_PROCESS_TYPE(GMPlugin, "gmplugin", GMPlugin, PluginContainer)
|
||||
GECKO_PROCESS_TYPE(GMPlugin, "gmplugin", GMPlugin)
|
||||
// GPU and compositor process.
|
||||
GECKO_PROCESS_TYPE(GPU, "gpu", GPU, Self)
|
||||
GECKO_PROCESS_TYPE(GPU, "gpu", GPU)
|
||||
// VR process.
|
||||
GECKO_PROCESS_TYPE(VR, "vr", VR, Self)
|
||||
GECKO_PROCESS_TYPE(VR, "vr", VR)
|
||||
// Remote Data Decoder process.
|
||||
GECKO_PROCESS_TYPE(RDD, "rdd", RDD, Self)
|
||||
GECKO_PROCESS_TYPE(RDD, "rdd", RDD)
|
||||
// Socket process
|
||||
GECKO_PROCESS_TYPE(Socket, "socket", Socket, Self)
|
||||
GECKO_PROCESS_TYPE(RemoteSandboxBroker, "sandbox", RemoteSandboxBroker, PluginContainer)
|
||||
GECKO_PROCESS_TYPE(Socket, "socket", Socket)
|
||||
GECKO_PROCESS_TYPE(RemoteSandboxBroker, "sandbox", RemoteSandboxBroker)
|
||||
|
@ -365,7 +365,7 @@ XRE_API(nsresult, XRE_ParseAppData,
|
||||
(nsIFile * aINIFile, mozilla::XREAppData& aAppData))
|
||||
|
||||
enum GeckoProcessType {
|
||||
#define GECKO_PROCESS_TYPE(enum_name, string_name, xre_name, bin_type) \
|
||||
#define GECKO_PROCESS_TYPE(enum_name, string_name, xre_name) \
|
||||
GeckoProcessType_##enum_name,
|
||||
#include "mozilla/GeckoProcessTypes.h"
|
||||
#undef GECKO_PROCESS_TYPE
|
||||
@ -374,8 +374,7 @@ enum GeckoProcessType {
|
||||
};
|
||||
|
||||
static const char* const kGeckoProcessTypeString[] = {
|
||||
#define GECKO_PROCESS_TYPE(enum_name, string_name, xre_name, bin_type) \
|
||||
string_name,
|
||||
#define GECKO_PROCESS_TYPE(enum_name, string_name, xre_name) string_name,
|
||||
#include "mozilla/GeckoProcessTypes.h"
|
||||
#undef GECKO_PROCESS_TYPE
|
||||
};
|
||||
@ -439,7 +438,7 @@ XRE_API(bool, XRE_IsE10sParentProcess, ())
|
||||
* the e10s parent process or called in the main process when e10s is
|
||||
* disabled.
|
||||
*/
|
||||
#define GECKO_PROCESS_TYPE(enum_name, string_name, xre_name, bin_type) \
|
||||
#define GECKO_PROCESS_TYPE(enum_name, string_name, xre_name) \
|
||||
XRE_API(bool, XRE_Is##xre_name##Process, ())
|
||||
#include "mozilla/GeckoProcessTypes.h"
|
||||
#undef GECKO_PROCESS_TYPE
|
||||
@ -495,12 +494,6 @@ XRE_API(void, XRE_StopLateWriteChecks, (void))
|
||||
|
||||
XRE_API(void, XRE_EnableSameExecutableForContentProc, ())
|
||||
|
||||
namespace mozilla {
|
||||
enum class BinPathType { Self, PluginContainer };
|
||||
}
|
||||
XRE_API(mozilla::BinPathType, XRE_GetChildProcBinPathType,
|
||||
(GeckoProcessType aProcessType));
|
||||
|
||||
XRE_API(int, XRE_XPCShellMain,
|
||||
(int argc, char** argv, char** envp, const XREShellData* aShellData))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user