Skip to content

Commit

Permalink
Backed out 6 changesets (bug 1407432) on (wild) suspicion of causing …
Browse files Browse the repository at this point in the history
…failures in browser_sanitize-timespans.js, somehow

CLOSED TREE

Backed out changeset 86302df0b38a (bug 1407432)
Backed out changeset 5a967cc85e28 (bug 1407432)
Backed out changeset 828d43ec1b16 (bug 1407432)
Backed out changeset bacf04be0a48 (bug 1407432)
Backed out changeset 8d770908a5b9 (bug 1407432)
Backed out changeset ffe9aed0944f (bug 1407432)

MozReview-Commit-ID: 7D50rKeXLrn
  • Loading branch information
philor committed Nov 10, 2017
1 parent 9d26579 commit 8ccc4ff
Show file tree
Hide file tree
Showing 10 changed files with 1,470 additions and 1,466 deletions.
47 changes: 47 additions & 0 deletions config/Makefile.in
Expand Up @@ -32,6 +32,53 @@ endif

include $(topsrcdir)/config/rules.mk

ifdef WRAP_SYSTEM_INCLUDES
export-preqs = \
$(call mkdir_deps,system_wrappers) \
$(NULL)

export:: $(export-preqs)
$(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) \
-DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
-DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \
-DMOZ_SYSTEM_HUNSPELL=$(MOZ_SYSTEM_HUNSPELL) \
-DMOZ_SYSTEM_BZ2=$(MOZ_SYSTEM_BZ2) \
-DMOZ_SYSTEM_ZLIB=$(MOZ_SYSTEM_ZLIB) \
-DMOZ_SYSTEM_PNG=$(MOZ_SYSTEM_PNG) \
-DMOZ_SYSTEM_JPEG=$(MOZ_SYSTEM_JPEG) \
-DMOZ_SYSTEM_LIBEVENT=$(MOZ_SYSTEM_LIBEVENT) \
-DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \
-DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \
$(srcdir)/system-headers $(srcdir)/stl-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
$(INSTALL) system_wrappers $(DIST)

GARBAGE_DIRS += system_wrappers
endif

ifdef WRAP_STL_INCLUDES
ifdef GNU_CXX
stl_compiler = gcc
else
ifdef _MSC_VER
stl_compiler = msvc
endif
endif
endif

ifdef stl_compiler
STL_WRAPPERS_SENTINEL = $(DIST)/stl_wrappers/sentinel

$(STL_WRAPPERS_SENTINEL): $(srcdir)/make-stl-wrappers.py $(srcdir)/$(stl_compiler)-stl-wrapper.template.h $(srcdir)/stl-headers $(GLOBAL_DEPS)
$(PYTHON) $(srcdir)/make-stl-wrappers.py stl_wrappers $(stl_compiler) $(srcdir)/$(stl_compiler)-stl-wrapper.template.h $(srcdir)/stl-headers
$(PYTHON) $(srcdir)/nsinstall.py -t stl_wrappers $(DIST)
touch $(STL_WRAPPERS_SENTINEL)

export:: $(STL_WRAPPERS_SENTINEL)

GARBAGE += $(STL_WRAPPERS_SENTINEL)
GARBAGE_DIRS += stl_wrappers
endif

GARBAGE += \
$(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES) $(srcdir)/*.pyc *.pyc

Expand Down
26 changes: 22 additions & 4 deletions config/make-stl-wrappers.py
Expand Up @@ -22,13 +22,31 @@ def header_path(header, compiler):
# hope someone notices this ...
raise NotImplementedError(compiler)

# The 'unused' arg is the output file from the file_generate action. We actually
# generate all the files in header_list
def gen_wrappers(unused, outdir, compiler, template_file, *header_list):
def is_comment(line):
return re.match(r'\s*#.*', line)

def main(outdir, compiler, template_file, header_list_file):
if not os.path.isdir(outdir):
os.mkdir(outdir)

template = open(template_file, 'r').read()

for header in header_list:
for header in open(header_list_file, 'r'):
header = header.rstrip()
if 0 == len(header) or is_comment(header):
continue

path = header_path(header, compiler)
with FileAvoidWrite(os.path.join(outdir, header)) as f:
f.write(string.Template(template).substitute(HEADER=header,
HEADER_PATH=path))


if __name__ == '__main__':
if 5 != len(sys.argv):
print("""Usage:
python {0} OUT_DIR ('msvc'|'gcc') TEMPLATE_FILE HEADER_LIST_FILE
""".format(sys.argv[0]), file=sys.stderr)
sys.exit(1)

main(*sys.argv[1:])
23 changes: 0 additions & 23 deletions config/make-system-wrappers.py

This file was deleted.

32 changes: 0 additions & 32 deletions config/moz.build
Expand Up @@ -42,35 +42,3 @@ HOST_DEFINES = {
'UNICODE': True,
'_UNICODE': True,
}

include('stl-headers.mozbuild')
if CONFIG['WRAP_STL_INCLUDES']:
stl_compiler = None
if CONFIG['GNU_CXX']:
stl_compiler = 'gcc'
elif CONFIG['_MSC_VER']:
stl_compiler = 'msvc'

if stl_compiler:
template_file = SRCDIR + '/%s-stl-wrapper.template.h' % stl_compiler
output_dir = '../dist/stl_wrappers'
# We have to use a sentinel file as the first file because the
# file_generate action will create it for us, but we want to create all
# the files in gen_wrappers()
outputs = tuple(['stl.sentinel'] + ['%s/%s' % (output_dir, h) for h in stl_headers])
GENERATED_FILES += [outputs]
stl = GENERATED_FILES[outputs]
stl.script = 'make-stl-wrappers.py:gen_wrappers'
stl.flags = [output_dir, stl_compiler, template_file]
stl.flags.extend(stl_headers)

if CONFIG['WRAP_SYSTEM_INCLUDES']:
include('system-headers.mozbuild')
output_dir = '../dist/system_wrappers'
outputs = tuple(['system-header.sentinel'] + ['%s/%s' % (output_dir, h) for h in stl_headers + system_headers])
GENERATED_FILES += [outputs]
system = GENERATED_FILES[outputs]
system.script = 'make-system-wrappers.py:gen_wrappers'
system.flags = [output_dir]
system.flags.extend(stl_headers)
system.flags.extend(system_headers)
52 changes: 52 additions & 0 deletions config/stl-headers
@@ -0,0 +1,52 @@
#
# This file contains a list the of STL headers that have been reviewed
# for exception safety and approved. See
#
# https://bugzilla.mozilla.org/show_bug.cgi?id=551254
#
# At build time, each header listed here is converted into a "wrapper
# header" that is installed into dist/stl_includes.
#
# If you would like to request a new STL header <foo> be added, please
# file a Core:XPCOM bug with a title like "STL: Review exception
# safety of <foo> for gcc and MSVC".
#

new

# FIXME: these headers haven't been reviewed yet, but we use them
# unsafely in Gecko, so we might as well prevent them from
# throwing exceptions
algorithm
atomic
deque
functional
ios
iosfwd
iostream
istream
iterator
limits
list
map
memory
ostream
set
stack
string
thread
type_traits
unordered_map
unordered_set
utility
vector
cassert
climits
cmath
cstdarg
cstdio
cstdlib
cstring
cwchar
tuple
xutility
57 changes: 0 additions & 57 deletions config/stl-headers.mozbuild

This file was deleted.

0 comments on commit 8ccc4ff

Please sign in to comment.