зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 6 changesets (bug 1407432) on (wild) suspicion of causing 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
This commit is contained in:
Родитель
9d26579fa1
Коммит
8ccc4ff982
|
@ -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
|
||||
|
||||
|
|
|
@ -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:])
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
# 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/.
|
||||
from __future__ import print_function
|
||||
import os
|
||||
import sys
|
||||
from mozbuild.util import FileAvoidWrite
|
||||
|
||||
header_template = '''#pragma GCC system_header
|
||||
#pragma GCC visibility push(default)
|
||||
#include_next <%(header)s>
|
||||
#pragma GCC visibility pop
|
||||
'''
|
||||
|
||||
|
||||
# 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, *header_list):
|
||||
for header in header_list:
|
||||
with FileAvoidWrite(os.path.join(outdir, header)) as f:
|
||||
f.write(header_template % {
|
||||
'header': header,
|
||||
})
|
|
@ -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)
|
||||
|
|
|
@ -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
|
|
@ -1,57 +0,0 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# 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/.
|
||||
|
||||
# This list contains 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".
|
||||
stl_headers = [
|
||||
'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',
|
||||
]
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -525,7 +525,6 @@ class RecursiveMakeBackend(CommonBackend):
|
|||
'.inc',
|
||||
'.py',
|
||||
'.rs',
|
||||
'new', # 'new' is an output from make-stl-wrappers.py
|
||||
)
|
||||
tier = 'export' if any(f.endswith(export_suffixes) for f in obj.outputs) else 'misc'
|
||||
self._no_skip[tier].add(backend_file.relobjdir)
|
||||
|
|
|
@ -111,13 +111,12 @@ class Sandbox(dict):
|
|||
'sorted': alphabetical_sorted,
|
||||
'int': int,
|
||||
'set': set,
|
||||
'tuple': tuple,
|
||||
})
|
||||
|
||||
def __init__(self, context, finder=default_finder):
|
||||
def __init__(self, context, builtins=None, finder=default_finder):
|
||||
"""Initialize a Sandbox ready for execution.
|
||||
"""
|
||||
self._builtins = self.BUILTINS
|
||||
self._builtins = builtins or self.BUILTINS
|
||||
dict.__setitem__(self, '__builtins__', self._builtins)
|
||||
|
||||
assert isinstance(self._builtins, ReadOnlyDict)
|
||||
|
|
Загрузка…
Ссылка в новой задаче