Merge mozilla-central to mozilla-autoland. r=merge a=merge CLOSED TREE

This commit is contained in:
Gurzau Raul 2017-11-16 12:16:07 +02:00
Родитель ef7c3ef9fa 6dcee027d7
Коммит f464825286
290 изменённых файлов: 4519 добавлений и 6314 удалений

Просмотреть файл

@ -16,7 +16,6 @@ MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_UPLOAD=0
. "$topsrcdir/build/mozconfig.common"
ac_add_options --enable-elf-hack
. "$topsrcdir/build/unix/mozconfig.stdcxx"

Просмотреть файл

@ -64,6 +64,8 @@ def replace_malloc(value, jemalloc, milestone, build_project):
die('--enable-replace-malloc requires --enable-jemalloc')
if value.origin != 'default':
return bool(value) or None
if build_project == 'memory':
return True
if milestone.is_nightly and jemalloc and build_project != 'js':
return True

Просмотреть файл

@ -182,7 +182,6 @@ def old_configure_options(*options):
'--enable-directshow',
'--enable-dtrace',
'--enable-dump-painting',
'--enable-elf-hack',
'--enable-extensions',
'--enable-faststripe',
'--enable-feeds',

Просмотреть файл

@ -25,8 +25,6 @@ else
CXX="/tools/gcc-4.7.3-0moz1/bin/g++"
fi
ac_add_options --enable-elf-hack
. "$topsrcdir/build/unix/mozconfig.stdcxx"
# PKG_CONFIG_LIBDIR is appropriately overridden in mozconfig.linux32

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -115,15 +115,17 @@ extern "C" {
** a string which identifies a particular check-in of SQLite
** within its configuration management system. ^The SQLITE_SOURCE_ID
** string contains the date and time of the check-in (UTC) and a SHA1
** or SHA3-256 hash of the entire source tree.
** or SHA3-256 hash of the entire source tree. If the source code has
** been edited in any way since it was last checked in, then the last
** four hexadecimal digits of the hash may be modified.
**
** See also: [sqlite3_libversion()],
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
#define SQLITE_VERSION "3.20.1"
#define SQLITE_VERSION_NUMBER 3020001
#define SQLITE_SOURCE_ID "2017-08-24 16:21:36 8d3a7ea6c5690d6b7c3767558f4f01b511c55463e3f9e64506801fe9b74dce34"
#define SQLITE_VERSION "3.21.0"
#define SQLITE_VERSION_NUMBER 3021000
#define SQLITE_SOURCE_ID "2017-10-24 18:55:49 1a584e499906b5c87ec7d43d4abce641fdf017c42125b083109bc77c4de48827"
/*
** CAPI3REF: Run-Time Library Version Numbers
@ -139,7 +141,7 @@ extern "C" {
**
** <blockquote><pre>
** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
** assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
** assert( strncmp(sqlite3_sourceid(),SQLITE_SOURCE_ID,80)==0 );
** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );
** </pre></blockquote>)^
**
@ -149,9 +151,11 @@ extern "C" {
** function is provided for use in DLLs since DLL users usually do not have
** direct access to string constants within the DLL. ^The
** sqlite3_libversion_number() function returns an integer equal to
** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function returns
** [SQLITE_VERSION_NUMBER]. ^(The sqlite3_sourceid() function returns
** a pointer to a string constant whose value is the same as the
** [SQLITE_SOURCE_ID] C preprocessor macro.
** [SQLITE_SOURCE_ID] C preprocessor macro. Except if SQLite is built
** using an edited copy of [the amalgamation], then the last four characters
** of the hash might be different from [SQLITE_SOURCE_ID].)^
**
** See also: [sqlite_version()] and [sqlite_source_id()].
*/
@ -432,7 +436,7 @@ SQLITE_API int sqlite3_exec(
#define SQLITE_FULL 13 /* Insertion failed because database is full */
#define SQLITE_CANTOPEN 14 /* Unable to open the database file */
#define SQLITE_PROTOCOL 15 /* Database lock protocol error */
#define SQLITE_EMPTY 16 /* Not used */
#define SQLITE_EMPTY 16 /* Internal use only */
#define SQLITE_SCHEMA 17 /* The database schema changed */
#define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */
#define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */
@ -494,6 +498,9 @@ SQLITE_API int sqlite3_exec(
#define SQLITE_IOERR_CONVPATH (SQLITE_IOERR | (26<<8))
#define SQLITE_IOERR_VNODE (SQLITE_IOERR | (27<<8))
#define SQLITE_IOERR_AUTH (SQLITE_IOERR | (28<<8))
#define SQLITE_IOERR_BEGIN_ATOMIC (SQLITE_IOERR | (29<<8))
#define SQLITE_IOERR_COMMIT_ATOMIC (SQLITE_IOERR | (30<<8))
#define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31<<8))
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))
#define SQLITE_BUSY_SNAPSHOT (SQLITE_BUSY | (2<<8))
@ -580,6 +587,11 @@ SQLITE_API int sqlite3_exec(
** SQLITE_IOCAP_IMMUTABLE flag indicates that the file is on
** read-only media and cannot be changed even by processes with
** elevated privileges.
**
** The SQLITE_IOCAP_BATCH_ATOMIC property means that the underlying
** filesystem supports doing multiple write operations atomically when those
** write operations are bracketed by [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] and
** [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE].
*/
#define SQLITE_IOCAP_ATOMIC 0x00000001
#define SQLITE_IOCAP_ATOMIC512 0x00000002
@ -595,6 +607,7 @@ SQLITE_API int sqlite3_exec(
#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN 0x00000800
#define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000
#define SQLITE_IOCAP_IMMUTABLE 0x00002000
#define SQLITE_IOCAP_BATCH_ATOMIC 0x00004000
/*
** CAPI3REF: File Locking Levels
@ -729,6 +742,7 @@ struct sqlite3_file {
** <li> [SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN]
** <li> [SQLITE_IOCAP_POWERSAFE_OVERWRITE]
** <li> [SQLITE_IOCAP_IMMUTABLE]
** <li> [SQLITE_IOCAP_BATCH_ATOMIC]
** </ul>
**
** The SQLITE_IOCAP_ATOMIC property means that all writes of
@ -1012,6 +1026,40 @@ struct sqlite3_io_methods {
** The [SQLITE_FCNTL_RBU] opcode is implemented by the special VFS used by
** the RBU extension only. All other VFS should return SQLITE_NOTFOUND for
** this opcode.
**
** <li>[[SQLITE_FCNTL_BEGIN_ATOMIC_WRITE]]
** If the [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] opcode returns SQLITE_OK, then
** the file descriptor is placed in "batch write mode", which
** means all subsequent write operations will be deferred and done
** atomically at the next [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]. Systems
** that do not support batch atomic writes will return SQLITE_NOTFOUND.
** ^Following a successful SQLITE_FCNTL_BEGIN_ATOMIC_WRITE and prior to
** the closing [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE] or
** [SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE], SQLite will make
** no VFS interface calls on the same [sqlite3_file] file descriptor
** except for calls to the xWrite method and the xFileControl method
** with [SQLITE_FCNTL_SIZE_HINT].
**
** <li>[[SQLITE_FCNTL_COMMIT_ATOMIC_WRITE]]
** The [SQLITE_FCNTL_COMMIT_ATOMIC_WRITE] opcode causes all write
** operations since the previous successful call to
** [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] to be performed atomically.
** This file control returns [SQLITE_OK] if and only if the writes were
** all performed successfully and have been committed to persistent storage.
** ^Regardless of whether or not it is successful, this file control takes
** the file descriptor out of batch write mode so that all subsequent
** write operations are independent.
** ^SQLite will never invoke SQLITE_FCNTL_COMMIT_ATOMIC_WRITE without
** a prior successful call to [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE].
**
** <li>[[SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE]]
** The [SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE] opcode causes all write
** operations since the previous successful call to
** [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE] to be rolled back.
** ^This file control takes the file descriptor out of batch write mode
** so that all subsequent write operations are independent.
** ^SQLite will never invoke SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE without
** a prior successful call to [SQLITE_FCNTL_BEGIN_ATOMIC_WRITE].
** </ul>
*/
#define SQLITE_FCNTL_LOCKSTATE 1
@ -1043,6 +1091,9 @@ struct sqlite3_io_methods {
#define SQLITE_FCNTL_JOURNAL_POINTER 28
#define SQLITE_FCNTL_WIN32_GET_HANDLE 29
#define SQLITE_FCNTL_PDB 30
#define SQLITE_FCNTL_BEGIN_ATOMIC_WRITE 31
#define SQLITE_FCNTL_COMMIT_ATOMIC_WRITE 32
#define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33
/* deprecated names */
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
@ -1613,6 +1664,16 @@ struct sqlite3_mem_methods {
** routines with a wrapper that simulations memory allocation failure or
** tracks memory usage, for example. </dd>
**
** [[SQLITE_CONFIG_SMALL_MALLOC]] <dt>SQLITE_CONFIG_SMALL_MALLOC</dt>
** <dd> ^The SQLITE_CONFIG_SMALL_MALLOC option takes single argument of
** type int, interpreted as a boolean, which if true provides a hint to
** SQLite that it should avoid large memory allocations if possible.
** SQLite will run faster if it is free to make large memory allocations,
** but some application might prefer to run slower in exchange for
** guarantees about memory fragmentation that are possible if large
** allocations are avoided. This hint is normally off.
** </dd>
**
** [[SQLITE_CONFIG_MEMSTATUS]] <dt>SQLITE_CONFIG_MEMSTATUS</dt>
** <dd> ^The SQLITE_CONFIG_MEMSTATUS option takes single argument of type int,
** interpreted as a boolean, which enables or disables the collection of
@ -1630,25 +1691,7 @@ struct sqlite3_mem_methods {
** </dd>
**
** [[SQLITE_CONFIG_SCRATCH]] <dt>SQLITE_CONFIG_SCRATCH</dt>
** <dd> ^The SQLITE_CONFIG_SCRATCH option specifies a static memory buffer
** that SQLite can use for scratch memory. ^(There are three arguments
** to SQLITE_CONFIG_SCRATCH: A pointer an 8-byte
** aligned memory buffer from which the scratch allocations will be
** drawn, the size of each scratch allocation (sz),
** and the maximum number of scratch allocations (N).)^
** The first argument must be a pointer to an 8-byte aligned buffer
** of at least sz*N bytes of memory.
** ^SQLite will not use more than one scratch buffers per thread.
** ^SQLite will never request a scratch buffer that is more than 6
** times the database page size.
** ^If SQLite needs needs additional
** scratch memory beyond what is provided by this configuration option, then
** [sqlite3_malloc()] will be used to obtain the memory needed.<p>
** ^When the application provides any amount of scratch memory using
** SQLITE_CONFIG_SCRATCH, SQLite avoids unnecessary large
** [sqlite3_malloc|heap allocations].
** This can help [Robson proof|prevent memory allocation failures] due to heap
** fragmentation in low-memory embedded systems.
** <dd> The SQLITE_CONFIG_SCRATCH option is no longer used.
** </dd>
**
** [[SQLITE_CONFIG_PAGECACHE]] <dt>SQLITE_CONFIG_PAGECACHE</dt>
@ -1684,8 +1727,7 @@ struct sqlite3_mem_methods {
** [[SQLITE_CONFIG_HEAP]] <dt>SQLITE_CONFIG_HEAP</dt>
** <dd> ^The SQLITE_CONFIG_HEAP option specifies a static memory buffer
** that SQLite will use for all of its dynamic memory allocation needs
** beyond those provided for by [SQLITE_CONFIG_SCRATCH] and
** [SQLITE_CONFIG_PAGECACHE].
** beyond those provided for by [SQLITE_CONFIG_PAGECACHE].
** ^The SQLITE_CONFIG_HEAP option is only available if SQLite is compiled
** with either [SQLITE_ENABLE_MEMSYS3] or [SQLITE_ENABLE_MEMSYS5] and returns
** [SQLITE_ERROR] if invoked otherwise.
@ -1878,7 +1920,7 @@ struct sqlite3_mem_methods {
#define SQLITE_CONFIG_SERIALIZED 3 /* nil */
#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */
#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */
#define SQLITE_CONFIG_SCRATCH 6 /* void*, int sz, int N */
#define SQLITE_CONFIG_SCRATCH 6 /* No longer used */
#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */
#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */
#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */
@ -1899,6 +1941,7 @@ struct sqlite3_mem_methods {
#define SQLITE_CONFIG_PCACHE_HDRSZ 24 /* int *psz */
#define SQLITE_CONFIG_PMASZ 25 /* unsigned int szPma */
#define SQLITE_CONFIG_STMTJRNL_SPILL 26 /* int nByte */
#define SQLITE_CONFIG_SMALL_MALLOC 27 /* boolean */
/*
** CAPI3REF: Database Connection Configuration Options
@ -3099,10 +3142,10 @@ SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
** ^If [URI filename] interpretation is enabled, and the filename argument
** begins with "file:", then the filename is interpreted as a URI. ^URI
** filename interpretation is enabled if the [SQLITE_OPEN_URI] flag is
** set in the fourth argument to sqlite3_open_v2(), or if it has
** set in the third argument to sqlite3_open_v2(), or if it has
** been enabled globally using the [SQLITE_CONFIG_URI] option with the
** [sqlite3_config()] method or by the [SQLITE_USE_URI] compile-time option.
** As of SQLite version 3.7.7, URI filename interpretation is turned off
** URI filename interpretation is turned off
** by default, but future releases of SQLite might enable URI filename
** interpretation by default. See "[URI filenames]" for additional
** information.
@ -3776,8 +3819,9 @@ SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*);
** implementation of [application-defined SQL functions] are protected.
** ^The sqlite3_value object returned by
** [sqlite3_column_value()] is unprotected.
** Unprotected sqlite3_value objects may only be used with
** [sqlite3_result_value()] and [sqlite3_bind_value()].
** Unprotected sqlite3_value objects may only be used as arguments
** to [sqlite3_result_value()], [sqlite3_bind_value()], and
** [sqlite3_value_dup()].
** The [sqlite3_value_blob | sqlite3_value_type()] family of
** interfaces require protected sqlite3_value objects.
*/
@ -4199,7 +4243,7 @@ SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
** other than [SQLITE_ROW] before any subsequent invocation of
** sqlite3_step(). Failure to reset the prepared statement using
** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from
** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1]),
** sqlite3_step(). But after [version 3.6.23.1] ([dateof:3.6.23.1],
** sqlite3_step() began
** calling [sqlite3_reset()] automatically in this circumstance rather
** than returning [SQLITE_MISUSE]. This is not considered a compatibility
@ -6212,6 +6256,11 @@ struct sqlite3_index_info {
#define SQLITE_INDEX_CONSTRAINT_LIKE 65
#define SQLITE_INDEX_CONSTRAINT_GLOB 66
#define SQLITE_INDEX_CONSTRAINT_REGEXP 67
#define SQLITE_INDEX_CONSTRAINT_NE 68
#define SQLITE_INDEX_CONSTRAINT_ISNOT 69
#define SQLITE_INDEX_CONSTRAINT_ISNOTNULL 70
#define SQLITE_INDEX_CONSTRAINT_ISNULL 71
#define SQLITE_INDEX_CONSTRAINT_IS 72
/*
** CAPI3REF: Register A Virtual Table Implementation
@ -6963,7 +7012,7 @@ SQLITE_API int sqlite3_test_control(int op, ...);
#define SQLITE_TESTCTRL_RESERVE 14
#define SQLITE_TESTCTRL_OPTIMIZATIONS 15
#define SQLITE_TESTCTRL_ISKEYWORD 16
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17
#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 /* NOT USED */
#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18
#define SQLITE_TESTCTRL_EXPLAIN_STMT 19 /* NOT USED */
#define SQLITE_TESTCTRL_ONCE_RESET_THRESHOLD 19
@ -7022,8 +7071,7 @@ SQLITE_API int sqlite3_status64(
** <dd>This parameter is the current amount of memory checked out
** using [sqlite3_malloc()], either directly or indirectly. The
** figure includes calls made to [sqlite3_malloc()] by the application
** and internal memory usage by the SQLite library. Scratch memory
** controlled by [SQLITE_CONFIG_SCRATCH] and auxiliary page-cache
** and internal memory usage by the SQLite library. Auxiliary page-cache
** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in
** this parameter. The amount returned is the sum of the allocation
** sizes as reported by the xSize method in [sqlite3_mem_methods].</dd>)^
@ -7061,29 +7109,14 @@ SQLITE_API int sqlite3_status64(
** *pHighwater parameter to [sqlite3_status()] is of interest.
** The value written into the *pCurrent parameter is undefined.</dd>)^
**
** [[SQLITE_STATUS_SCRATCH_USED]] ^(<dt>SQLITE_STATUS_SCRATCH_USED</dt>
** <dd>This parameter returns the number of allocations used out of the
** [scratch memory allocator] configured using
** [SQLITE_CONFIG_SCRATCH]. The value returned is in allocations, not
** in bytes. Since a single thread may only have one scratch allocation
** outstanding at time, this parameter also reports the number of threads
** using scratch memory at the same time.</dd>)^
** [[SQLITE_STATUS_SCRATCH_USED]] <dt>SQLITE_STATUS_SCRATCH_USED</dt>
** <dd>No longer used.</dd>
**
** [[SQLITE_STATUS_SCRATCH_OVERFLOW]] ^(<dt>SQLITE_STATUS_SCRATCH_OVERFLOW</dt>
** <dd>This parameter returns the number of bytes of scratch memory
** allocation which could not be satisfied by the [SQLITE_CONFIG_SCRATCH]
** buffer and where forced to overflow to [sqlite3_malloc()]. The values
** returned include overflows because the requested allocation was too
** larger (that is, because the requested allocation was larger than the
** "sz" parameter to [SQLITE_CONFIG_SCRATCH]) and because no scratch buffer
** slots were available.
** </dd>)^
** <dd>No longer used.</dd>
**
** [[SQLITE_STATUS_SCRATCH_SIZE]] ^(<dt>SQLITE_STATUS_SCRATCH_SIZE</dt>
** <dd>This parameter records the largest memory allocation request
** handed to [scratch memory allocator]. Only the value returned in the
** *pHighwater parameter to [sqlite3_status()] is of interest.
** The value written into the *pCurrent parameter is undefined.</dd>)^
** [[SQLITE_STATUS_SCRATCH_SIZE]] <dt>SQLITE_STATUS_SCRATCH_SIZE</dt>
** <dd>No longer used.</dd>
**
** [[SQLITE_STATUS_PARSER_STACK]] ^(<dt>SQLITE_STATUS_PARSER_STACK</dt>
** <dd>The *pHighwater parameter records the deepest parser stack.
@ -7096,12 +7129,12 @@ SQLITE_API int sqlite3_status64(
#define SQLITE_STATUS_MEMORY_USED 0
#define SQLITE_STATUS_PAGECACHE_USED 1
#define SQLITE_STATUS_PAGECACHE_OVERFLOW 2
#define SQLITE_STATUS_SCRATCH_USED 3
#define SQLITE_STATUS_SCRATCH_OVERFLOW 4
#define SQLITE_STATUS_SCRATCH_USED 3 /* NOT USED */
#define SQLITE_STATUS_SCRATCH_OVERFLOW 4 /* NOT USED */
#define SQLITE_STATUS_MALLOC_SIZE 5
#define SQLITE_STATUS_PARSER_STACK 6
#define SQLITE_STATUS_PAGECACHE_SIZE 7
#define SQLITE_STATUS_SCRATCH_SIZE 8
#define SQLITE_STATUS_SCRATCH_SIZE 8 /* NOT USED */
#define SQLITE_STATUS_MALLOC_COUNT 9
/*
@ -9198,8 +9231,8 @@ SQLITE_API int sqlite3session_diff(
*/
SQLITE_API int sqlite3session_patchset(
sqlite3_session *pSession, /* Session object */
int *pnPatchset, /* OUT: Size of buffer at *ppChangeset */
void **ppPatchset /* OUT: Buffer containing changeset */
int *pnPatchset, /* OUT: Size of buffer at *ppPatchset */
void **ppPatchset /* OUT: Buffer containing patchset */
);
/*
@ -9966,12 +9999,12 @@ SQLITE_API int sqlite3changeset_apply(
**
** <table border=1 style="margin-left:8ex;margin-right:8ex">
** <tr><th>Streaming function<th>Non-streaming equivalent</th>
** <tr><td>sqlite3changeset_apply_str<td>[sqlite3changeset_apply]
** <tr><td>sqlite3changeset_concat_str<td>[sqlite3changeset_concat]
** <tr><td>sqlite3changeset_invert_str<td>[sqlite3changeset_invert]
** <tr><td>sqlite3changeset_start_str<td>[sqlite3changeset_start]
** <tr><td>sqlite3session_changeset_str<td>[sqlite3session_changeset]
** <tr><td>sqlite3session_patchset_str<td>[sqlite3session_patchset]
** <tr><td>sqlite3changeset_apply_strm<td>[sqlite3changeset_apply]
** <tr><td>sqlite3changeset_concat_strm<td>[sqlite3changeset_concat]
** <tr><td>sqlite3changeset_invert_strm<td>[sqlite3changeset_invert]
** <tr><td>sqlite3changeset_start_strm<td>[sqlite3changeset_start]
** <tr><td>sqlite3session_changeset_strm<td>[sqlite3session_changeset]
** <tr><td>sqlite3session_patchset_strm<td>[sqlite3session_patchset]
** </table>
**
** Non-streaming functions that accept changesets (or patchsets) as input

Просмотреть файл

@ -335,7 +335,7 @@ nsSHistory::Startup()
// The goal of this is to unbreak users who have inadvertently set their
// session history size to less than the default value.
int32_t defaultHistoryMaxSize =
Preferences::GetDefaultInt(PREF_SHISTORY_SIZE, 50);
Preferences::GetInt(PREF_SHISTORY_SIZE, 50, PrefValueKind::Default);
if (gHistoryMaxSize < defaultHistoryMaxSize) {
gHistoryMaxSize = defaultHistoryMaxSize;
}

Просмотреть файл

@ -641,7 +641,6 @@ skip-if = toolkit == 'android' #bug 904183
[test_domparsing.html]
[test_domrequest.html]
[test_domwindowutils.html]
[test_e4x_for_each.html]
[test_element.matches.html]
[test_element_closest.html]
[test_elementTraversal.html]

Просмотреть файл

@ -1,57 +0,0 @@
<!DOCTYPE html>
<html>
<head><meta charset=utf-8>
<title>Test for E4X "for each" syntax</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<div id="template" style="display: none">
function runTest(i) {
var t = tests[i];
count++;
SpecialPowers.Cu.getJSTestingFunctions().enableForEach();
try {
Function("for each (var a in []) {}");
ok(t.enabled, "JavaScript" + ("version" in t ? " " + t.version : "") + " supports for-each-in");
} catch (e) {
ok(!t.enabled, "JavaScript" + ("version" in t ? " " + t.version : "") + " does NOT support for-each-in");
}
SpecialPowers.Cu.getJSTestingFunctions().disableForEach();
}
</div>
<pre id="test">
<script class="testbody">
var tests = [
{enabled: false},
{version: "1.0", enabled: false},
{version: "1.1", enabled: false},
{version: "1.2", enabled: false},
{version: "1.3", enabled: false},
{version: "1.4", enabled: false},
{version: "1.5", enabled: false},
{version: "1.6", enabled: true},
{version: "1.7", enabled: true},
{version: "1.8", enabled: true},
];
var count = 0;
for (var i = 0; i < tests.length; i++) {
var t = tests[i];
var script = document.createElement("script");
script.type = "application/javascript" + ("version" in t ? ";version=" + t.version : "");
script.textContent = document.getElementById("template").textContent + "\n" + "runTest(" + i + ");";
document.body.appendChild(script);
}
script = document.createElement("script");
script.textContent = 'is(count, tests.length, "runTest() call count");';
document.body.appendChild(script);
</script>
</pre>
</body>
</html>

Просмотреть файл

@ -1884,7 +1884,9 @@ CanvasRenderingContext2D::TrySharedTarget(RefPtr<gfx::DrawTarget>& aOutDT,
return false;
}
if (mBufferProvider && mBufferProvider->GetType() == LayersBackend::LAYERS_CLIENT) {
if (mBufferProvider &&
(mBufferProvider->GetType() == LayersBackend::LAYERS_CLIENT ||
mBufferProvider->GetType() == LayersBackend::LAYERS_WR)) {
// we are already using a shared buffer provider, we are allocating a new one
// because the current one failed so let's just fall back to the basic provider.
return false;
@ -5596,7 +5598,9 @@ CanvasRenderingContext2D::DrawWindow(nsGlobalWindowInner& aWindow, double aX,
}
}
if (op == CompositionOp::OP_OVER &&
(!mBufferProvider || mBufferProvider->GetType() != LayersBackend::LAYERS_CLIENT))
(!mBufferProvider ||
(mBufferProvider->GetType() != LayersBackend::LAYERS_CLIENT &&
mBufferProvider->GetType() != LayersBackend::LAYERS_WR)))
{
thebes = gfxContext::CreateOrNull(mTarget);
MOZ_ASSERT(thebes); // already checked the draw target above

Просмотреть файл

@ -60,7 +60,8 @@ FeatureState::SetDefaultFromPref(const char* aPrefName,
bool aIsEnablePref,
bool aDefaultValue)
{
bool baseValue = Preferences::GetDefaultBool(aPrefName, aDefaultValue);
bool baseValue =
Preferences::GetBool(aPrefName, aDefaultValue, PrefValueKind::Default);
SetDefault(baseValue == aIsEnablePref, FeatureStatus::Disabled, "Disabled by default");
if (Preferences::HasUserValue(aPrefName)) {

Просмотреть файл

@ -8,6 +8,7 @@
#include "Layers.h"
#include "mozilla/layers/ShadowLayers.h"
#include "mozilla/layers/TextureClient.h"
#include "mozilla/gfx/Logging.h"
#include "pratom.h"
#include "gfxPlatform.h"
@ -88,14 +89,14 @@ PersistentBufferProviderBasic::Create(gfx::IntSize aSize, gfx::SurfaceFormat aFo
already_AddRefed<PersistentBufferProviderShared>
PersistentBufferProviderShared::Create(gfx::IntSize aSize,
gfx::SurfaceFormat aFormat,
ShadowLayerForwarder* aFwd)
KnowsCompositor* aKnowsCompositor)
{
if (!aFwd || !aFwd->GetTextureForwarder()->IPCOpen()) {
if (!aKnowsCompositor || !aKnowsCompositor->GetTextureForwarder()->IPCOpen()) {
return nullptr;
}
RefPtr<TextureClient> texture = TextureClient::CreateForDrawing(
aFwd, aFormat, aSize,
aKnowsCompositor, aFormat, aSize,
BackendSelector::Canvas,
TextureFlags::DEFAULT,
TextureAllocationFlags::ALLOC_DEFAULT
@ -106,20 +107,21 @@ PersistentBufferProviderShared::Create(gfx::IntSize aSize,
}
RefPtr<PersistentBufferProviderShared> provider =
new PersistentBufferProviderShared(aSize, aFormat, aFwd, texture);
new PersistentBufferProviderShared(aSize, aFormat, aKnowsCompositor, texture);
return provider.forget();
}
PersistentBufferProviderShared::PersistentBufferProviderShared(gfx::IntSize aSize,
gfx::SurfaceFormat aFormat,
ShadowLayerForwarder* aFwd,
KnowsCompositor* aKnowsCompositor,
RefPtr<TextureClient>& aTexture)
: mSize(aSize)
, mFormat(aFormat)
, mFwd(aFwd)
, mKnowsCompositor(aKnowsCompositor)
, mFront(Nothing())
{
MOZ_ASSERT(aKnowsCompositor);
if (mTextures.append(aTexture)) {
mBack = Some<uint32_t>(0);
}
@ -131,31 +133,41 @@ PersistentBufferProviderShared::~PersistentBufferProviderShared()
MOZ_COUNT_DTOR(PersistentBufferProviderShared);
if (IsActivityTracked()) {
mFwd->GetActiveResourceTracker().RemoveObject(this);
mKnowsCompositor->GetActiveResourceTracker()->RemoveObject(this);
}
Destroy();
}
bool
PersistentBufferProviderShared::SetForwarder(ShadowLayerForwarder* aFwd)
LayersBackend
PersistentBufferProviderShared::GetType()
{
MOZ_ASSERT(aFwd);
if (!aFwd) {
if (mKnowsCompositor->GetCompositorBackendType() == LayersBackend::LAYERS_WR) {
return LayersBackend::LAYERS_WR;
} else {
return LayersBackend::LAYERS_CLIENT;
}
}
bool
PersistentBufferProviderShared::SetKnowsCompositor(KnowsCompositor* aKnowsCompositor)
{
MOZ_ASSERT(aKnowsCompositor);
if (!aKnowsCompositor) {
return false;
}
if (mFwd == aFwd) {
if (mKnowsCompositor == aKnowsCompositor) {
// The forwarder should not change most of the time.
return true;
}
if (IsActivityTracked()) {
mFwd->GetActiveResourceTracker().RemoveObject(this);
mKnowsCompositor->GetActiveResourceTracker()->RemoveObject(this);
}
if (mFwd->GetTextureForwarder() != aFwd->GetTextureForwarder() ||
mFwd->GetCompositorBackendType() != aFwd->GetCompositorBackendType()) {
if (mKnowsCompositor->GetTextureForwarder() != aKnowsCompositor->GetTextureForwarder() ||
mKnowsCompositor->GetCompositorBackendType() != aKnowsCompositor->GetCompositorBackendType()) {
// We are going to be used with an different and/or incompatible forwarder.
// This should be extremely rare. We have to copy the front buffer into a
// texture that is compatible with the new forwarder.
@ -168,7 +180,7 @@ PersistentBufferProviderShared::SetForwarder(ShadowLayerForwarder* aFwd)
if (prevTexture) {
RefPtr<TextureClient> newTexture = TextureClient::CreateForDrawing(
aFwd, mFormat, mSize,
aKnowsCompositor, mFormat, mSize,
BackendSelector::Canvas,
TextureFlags::DEFAULT,
TextureAllocationFlags::ALLOC_DEFAULT
@ -210,7 +222,7 @@ PersistentBufferProviderShared::SetForwarder(ShadowLayerForwarder* aFwd)
}
}
mFwd = aFwd;
mKnowsCompositor = aKnowsCompositor;
return true;
}
@ -227,16 +239,16 @@ PersistentBufferProviderShared::GetTexture(const Maybe<uint32_t>& aIndex)
already_AddRefed<gfx::DrawTarget>
PersistentBufferProviderShared::BorrowDrawTarget(const gfx::IntRect& aPersistedRect)
{
if (!mFwd->GetTextureForwarder()->IPCOpen()) {
if (!mKnowsCompositor->GetTextureForwarder()->IPCOpen()) {
return nullptr;
}
MOZ_ASSERT(!mSnapshot);
if (IsActivityTracked()) {
mFwd->GetActiveResourceTracker().MarkUsed(this);
mKnowsCompositor->GetActiveResourceTracker()->MarkUsed(this);
} else {
mFwd->GetActiveResourceTracker().AddObject(this);
mKnowsCompositor->GetActiveResourceTracker()->AddObject(this);
}
if (mDrawTarget) {
@ -278,7 +290,7 @@ PersistentBufferProviderShared::BorrowDrawTarget(const gfx::IntRect& aPersistedR
// especially when switching between layer managers (during tab-switch).
// To make sure we don't get too far ahead of the compositor, we send a
// sync ping to the compositor thread...
mFwd->SyncWithCompositor();
mKnowsCompositor->SyncWithCompositor();
// ...and try again.
for (uint32_t i = 0; i < mTextures.length(); ++i) {
if (!mTextures[i]->IsReadLocked()) {
@ -300,7 +312,7 @@ PersistentBufferProviderShared::BorrowDrawTarget(const gfx::IntRect& aPersistedR
}
RefPtr<TextureClient> newTexture = TextureClient::CreateForDrawing(
mFwd, mFormat, mSize,
mKnowsCompositor, mFormat, mSize,
BackendSelector::Canvas,
TextureFlags::DEFAULT,
TextureAllocationFlags::ALLOC_DEFAULT

Просмотреть файл

@ -9,8 +9,9 @@
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
#include "mozilla/RefPtr.h" // for RefPtr, already_AddRefed, etc
#include "mozilla/layers/KnowsCompositor.h"
#include "mozilla/layers/LayersTypes.h"
#include "mozilla/layers/ShadowLayers.h"
#include "mozilla/RefCounted.h"
#include "mozilla/gfx/Types.h"
#include "mozilla/Vector.h"
@ -24,6 +25,7 @@ namespace gfx {
namespace layers {
class CopyableCanvasLayer;
class TextureClient;
/**
* A PersistentBufferProvider is for users which require the temporary use of
@ -65,7 +67,7 @@ public:
virtual void OnShutdown() {}
virtual bool SetForwarder(ShadowLayerForwarder* aFwd) { return true; }
virtual bool SetKnowsCompositor(KnowsCompositor* aKnowsCompositor) { return true; }
virtual void ClearCachedResources() {}
@ -120,9 +122,9 @@ public:
static already_AddRefed<PersistentBufferProviderShared>
Create(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
ShadowLayerForwarder* aFwd);
KnowsCompositor* aKnowsCompositor);
virtual LayersBackend GetType() override { return LayersBackend::LAYERS_CLIENT; }
virtual LayersBackend GetType() override;
virtual already_AddRefed<gfx::DrawTarget> BorrowDrawTarget(const gfx::IntRect& aPersistedRect) override;
@ -138,14 +140,14 @@ public:
virtual void OnShutdown() override { Destroy(); }
virtual bool SetForwarder(ShadowLayerForwarder* aFwd) override;
virtual bool SetKnowsCompositor(KnowsCompositor* aKnowsCompositor) override;
virtual void ClearCachedResources() override;
virtual bool PreservesDrawingState() const override { return false; }
protected:
PersistentBufferProviderShared(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
ShadowLayerForwarder* aFwd,
KnowsCompositor* aKnowsCompositor,
RefPtr<TextureClient>& aTexture);
~PersistentBufferProviderShared();
@ -157,7 +159,7 @@ protected:
gfx::IntSize mSize;
gfx::SurfaceFormat mFormat;
RefPtr<ShadowLayerForwarder> mFwd;
RefPtr<KnowsCompositor> mKnowsCompositor;
Vector<RefPtr<TextureClient>, 4> mTextures;
// Offset of the texture in mTextures that the canvas uses.
Maybe<uint32_t> mBack;

Просмотреть файл

@ -226,7 +226,7 @@ ShareableCanvasRenderer::UpdateCompositableClient()
FirePreTransactionCallback();
if (mBufferProvider && mBufferProvider->GetTextureClient()) {
if (!mBufferProvider->SetForwarder(GetForwarder()->AsLayerForwarder())) {
if (!mBufferProvider->SetKnowsCompositor(GetForwarder())) {
gfxCriticalNote << "BufferProvider::SetForwarder failed";
return;
}

Просмотреть файл

@ -9,6 +9,7 @@
#include "mozilla/layers/LayersTypes.h" // for LayersBackend
#include "mozilla/layers/CompositorTypes.h"
#include "nsExpirationTracker.h"
namespace mozilla {
namespace layers {
@ -17,6 +18,37 @@ class SyncObjectClient;
class TextureForwarder;
class LayersIPCActor;
/**
* See ActiveResourceTracker below.
*/
class ActiveResource
{
public:
virtual void NotifyInactive() = 0;
nsExpirationState* GetExpirationState() { return &mExpirationState; }
bool IsActivityTracked() { return mExpirationState.IsTracked(); }
private:
nsExpirationState mExpirationState;
};
/**
* A convenience class on top of nsExpirationTracker
*/
class ActiveResourceTracker : public nsExpirationTracker<ActiveResource, 3>
{
public:
ActiveResourceTracker(uint32_t aExpirationCycle, const char* aName,
nsIEventTarget* aEventTarget)
: nsExpirationTracker(aExpirationCycle, aName, aEventTarget)
{}
virtual void NotifyExpired(ActiveResource* aResource) override
{
RemoveObject(aResource);
aResource->NotifyInactive();
}
};
/**
* An abstract interface for classes that are tied to a specific Compositor across
* IPDL and uses TextureFactoryIdentifier to describe this Compositor.
@ -78,11 +110,29 @@ public:
int32_t GetSerial() { return mSerial; }
/**
* Sends a synchronous ping to the compsoitor.
*
* This is bad for performance and should only be called as a last resort if the
* compositor may be blocked for a long period of time, to avoid that the content
* process accumulates resource allocations that the compositor is not consuming
* and releasing.
*/
virtual void SyncWithCompositor()
{
MOZ_ASSERT_UNREACHABLE("Unimplemented");
}
/**
* Helpers for finding other related interface. These are infallible.
*/
virtual TextureForwarder* GetTextureForwarder() = 0;
virtual LayersIPCActor* GetLayersIPCActor() = 0;
virtual ActiveResourceTracker* GetActiveResourceTracker()
{
MOZ_ASSERT_UNREACHABLE("Unimplemented");
return nullptr;
}
protected:
TextureFactoryIdentifier mTextureFactoryIdentifier;

Просмотреть файл

@ -26,7 +26,6 @@
#include "nsTArrayForwardDeclare.h" // for InfallibleTArray
#include "nsIWidget.h"
#include <vector>
#include "nsExpirationTracker.h"
namespace mozilla {
namespace layers {
@ -45,37 +44,6 @@ class ThebesBuffer;
class ThebesBufferData;
class Transaction;
/**
* See ActiveResourceTracker below.
*/
class ActiveResource
{
public:
virtual void NotifyInactive() = 0;
nsExpirationState* GetExpirationState() { return &mExpirationState; }
bool IsActivityTracked() { return mExpirationState.IsTracked(); }
private:
nsExpirationState mExpirationState;
};
/**
* A convenience class on top of nsExpirationTracker
*/
class ActiveResourceTracker : public nsExpirationTracker<ActiveResource, 3>
{
public:
ActiveResourceTracker(uint32_t aExpirationCycle, const char* aName,
nsIEventTarget* aEventTarget)
: nsExpirationTracker(aExpirationCycle, aName, aEventTarget)
{}
virtual void NotifyExpired(ActiveResource* aResource) override
{
RemoveObject(aResource);
aResource->NotifyInactive();
}
};
/**
* We want to share layer trees across thread contexts and address
* spaces for several reasons; chief among them
@ -409,20 +377,12 @@ public:
// Returns true if aSurface wraps a Shmem.
static bool IsShmem(SurfaceDescriptor* aSurface);
/**
* Sends a synchronous ping to the compsoitor.
*
* This is bad for performance and should only be called as a last resort if the
* compositor may be blocked for a long period of time, to avoid that the content
* process accumulates resource allocations that the compositor is not consuming
* and releasing.
*/
void SyncWithCompositor();
void SyncWithCompositor() override;
TextureForwarder* GetTextureForwarder() override { return GetCompositorBridgeChild(); }
LayersIPCActor* GetLayersIPCActor() override { return this; }
ActiveResourceTracker& GetActiveResourceTracker() { return *mActiveResourceTracker.get(); }
ActiveResourceTracker* GetActiveResourceTracker() override { return mActiveResourceTracker.get(); }
CompositorBridgeChild* GetCompositorBridgeChild();

Просмотреть файл

@ -7,6 +7,7 @@
#include "mozilla/layers/WebRenderBridgeChild.h"
#include "gfxPlatform.h"
#include "mozilla/dom/TabGroup.h"
#include "mozilla/layers/CompositableClient.h"
#include "mozilla/layers/CompositorBridgeChild.h"
#include "mozilla/layers/ImageDataSerializer.h"
@ -36,16 +37,20 @@ WebRenderBridgeChild::WebRenderBridgeChild(const wr::PipelineId& aPipelineId)
{
}
WebRenderBridgeChild::~WebRenderBridgeChild()
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(mDestroyed);
}
void
WebRenderBridgeChild::Destroy(bool aIsSync)
{
if (!IPCOpen()) {
return;
}
// mDestroyed is used to prevent calling Send__delete__() twice.
// When this function is called from CompositorBridgeChild::Destroy().
mDestroyed = true;
mManager = nullptr;
DoDestroy();
if (aIsSync) {
SendShutdownSync();
@ -57,6 +62,16 @@ WebRenderBridgeChild::Destroy(bool aIsSync)
void
WebRenderBridgeChild::ActorDestroy(ActorDestroyReason why)
{
DoDestroy();
}
void
WebRenderBridgeChild::DoDestroy()
{
// mDestroyed is used to prevent calling Send__delete__() twice.
// When this function is called from CompositorBridgeChild::Destroy().
// mActiveResourceTracker is not cleared here, since it is
// used by PersistentBufferProviderShared.
mDestroyed = true;
mManager = nullptr;
}
@ -401,6 +416,15 @@ WebRenderBridgeChild::GetLayersIPCActor()
return static_cast<LayersIPCActor*>(GetCompositorBridgeChild());
}
void
WebRenderBridgeChild::SyncWithCompositor()
{
auto compositorBridge = GetCompositorBridgeChild();
if (compositorBridge && compositorBridge->IPCOpen()) {
compositorBridge->SendSyncWithCompositor();
}
}
void
WebRenderBridgeChild::Connect(CompositableClient* aCompositable,
ImageContainer* aImageContainer)
@ -586,8 +610,16 @@ WebRenderBridgeChild::EndClearCachedResources()
void
WebRenderBridgeChild::SetWebRenderLayerManager(WebRenderLayerManager* aManager)
{
MOZ_ASSERT(aManager);
MOZ_ASSERT(aManager && !mManager);
mManager = aManager;
nsCOMPtr<nsIEventTarget> eventTarget = nullptr;
if (dom::TabGroup* tabGroup = mManager->GetTabGroup()) {
eventTarget = tabGroup->EventTargetFor(TaskCategory::Other);
}
MOZ_ASSERT(eventTarget || !XRE_IsContentProcess());
mActiveResourceTracker = MakeUnique<ActiveResourceTracker>(
1000, "CompositableForwarder", eventTarget);
}
ipc::IShmemAllocator*

Просмотреть файл

@ -88,6 +88,8 @@ public:
// KnowsCompositor
TextureForwarder* GetTextureForwarder() override;
LayersIPCActor* GetLayersIPCActor() override;
void SyncWithCompositor() override;
ActiveResourceTracker* GetActiveResourceTracker() override { return mActiveResourceTracker.get(); }
void AddPipelineIdForAsyncCompositable(const wr::PipelineId& aPipelineId,
const CompositableHandle& aHandlee);
@ -151,7 +153,7 @@ public:
private:
friend class CompositorBridgeChild;
~WebRenderBridgeChild() {}
~WebRenderBridgeChild();
wr::ExternalImageId GetNextExternalImageId();
@ -179,6 +181,8 @@ private:
void ActorDestroy(ActorDestroyReason why) override;
void DoDestroy();
virtual mozilla::ipc::IPCResult RecvWrUpdated(const wr::IdNamespace& aNewIdNamespace) override;
void AddIPDLReference() {
@ -214,6 +218,8 @@ private:
uint32_t mFontInstanceKeysDeleted;
nsDataHashtable<ScaledFontHashKey, wr::FontInstanceKey> mFontInstanceKeys;
UniquePtr<ActiveResourceTracker> mActiveResourceTracker;
};
} // namespace layers

Просмотреть файл

@ -1383,6 +1383,7 @@ WebRenderBridgeParent::ClearResources()
mAsyncCompositables.Clear();
mAsyncImageManager->RemovePipeline(mPipelineId, wr::NewEpoch(wrEpoch));
mApi->RemovePipeline(mPipelineId);
for (std::unordered_set<uint64_t>::iterator iter = mActiveAnimations.begin(); iter != mActiveAnimations.end(); iter++) {
mAnimStorage->ClearById(*iter);

Просмотреть файл

@ -8,6 +8,7 @@
#include "GLContext.h"
#include "GLScreenBuffer.h"
#include "mozilla/layers/CompositorBridgeChild.h"
#include "SharedSurfaceGL.h"
#include "WebRenderBridgeChild.h"
#include "WebRenderLayerManager.h"

Просмотреть файл

@ -10,6 +10,8 @@
#include "gfxPrefs.h"
#include "GeckoProfiler.h"
#include "LayersLogging.h"
#include "mozilla/dom/TabChild.h"
#include "mozilla/dom/TabGroup.h"
#include "mozilla/gfx/DrawEventRecorder.h"
#include "mozilla/layers/CompositorBridgeChild.h"
#include "mozilla/layers/IpcResourceUpdateQueue.h"
@ -88,6 +90,8 @@ WebRenderLayerManager::Destroy()
void
WebRenderLayerManager::DoDestroy(bool aIsSync)
{
MOZ_ASSERT(NS_IsMainThread());
if (IsDestroyed()) {
return;
}
@ -529,6 +533,17 @@ WebRenderLayerManager::WrUpdated()
DiscardLocalImages();
}
dom::TabGroup*
WebRenderLayerManager::GetTabGroup()
{
if (mWidget) {
if (dom::TabChild* tabChild = mWidget->GetOwningTabChild()) {
return tabChild->TabGroup();
}
}
return nullptr;
}
void
WebRenderLayerManager::UpdateTextureFactoryIdentifier(const TextureFactoryIdentifier& aNewIdentifier)
{
@ -608,5 +623,19 @@ WebRenderLayerManager::SetPendingScrollUpdateForNextTransaction(FrameMetrics::Vi
return false;
}
already_AddRefed<PersistentBufferProvider>
WebRenderLayerManager::CreatePersistentBufferProvider(const gfx::IntSize& aSize,
gfx::SurfaceFormat aFormat)
{
if (gfxPrefs::PersistentBufferProviderSharedEnabled()) {
RefPtr<PersistentBufferProvider> provider
= PersistentBufferProviderShared::Create(aSize, aFormat, AsKnowsCompositor());
if (provider) {
return provider.forget();
}
}
return LayerManager::CreatePersistentBufferProvider(aSize, aFormat);
}
} // namespace layers
} // namespace mozilla

Просмотреть файл

@ -30,6 +30,9 @@ namespace mozilla {
struct ActiveScrolledRoot;
namespace dom {
class TabGroup;
}
namespace layers {
@ -118,6 +121,9 @@ public:
virtual void SetIsFirstPaint() override { mIsFirstPaint = true; }
virtual void SetFocusTarget(const FocusTarget& aFocusTarget) override;
virtual already_AddRefed<PersistentBufferProvider>
CreatePersistentBufferProvider(const gfx::IntSize& aSize, gfx::SurfaceFormat aFormat) override;
bool AsyncPanZoomEnabled() const override;
// adds an imagekey to a list of keys that will be discarded on the next
@ -156,6 +162,8 @@ public:
void WrUpdated();
void WindowOverlayChanged() { mWindowOverlayChanged = true; }
dom::TabGroup* GetTabGroup();
private:
/**
* Take a snapshot of the parent context, and copy

Просмотреть файл

@ -2596,7 +2596,7 @@ gfxPlatform::InitOMTPConfig()
omtp.SetDefaultFromPref(
"layers.omtp.enabled",
true,
Preferences::GetDefaultBool("layers.omtp.enabled", false));
Preferences::GetBool("layers.omtp.enabled", false, PrefValueKind::Default));
if (mContentBackend == BackendType::CAIRO) {
omtp.ForceDisable(FeatureStatus::Broken, "OMTP is not supported when using cairo",

Просмотреть файл

@ -266,7 +266,4 @@ enum LinkerInitialized { LINKER_INITIALIZED };
} // base
#include "nscore.h" // pick up mozalloc operator new() etc.
#endif // BASE_BASICTYPES_H_

33
js/app.mozbuild Normal file
Просмотреть файл

@ -0,0 +1,33 @@
# -*- Mode: python; c-basic-offset: 4; 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/.
if CONFIG['COMPILE_ENVIRONMENT']:
DIRS += [
'/js/src',
]
else:
TEST_DIRS += [
'/js/src/tests',
]
DIRS += [
'/config/external/fdlibm',
'/config/external/nspr',
'/config/external/zlib',
'/memory',
'/mozglue',
]
if CONFIG['USE_ICU']:
DIRS += [
'/config/external/icu',
]
if CONFIG['COMPILE_ENVIRONMENT'] and CONFIG['BUILD_CTYPES']:
DIRS += [
'/config/external/ffi',
]

Просмотреть файл

@ -512,7 +512,7 @@ class NodeBuilder
TokenPos* pos, MutableHandleValue dst);
MOZ_MUST_USE bool forInStatement(HandleValue var, HandleValue expr, HandleValue stmt,
bool isForEach, TokenPos* pos, MutableHandleValue dst);
TokenPos* pos, MutableHandleValue dst);
MOZ_MUST_USE bool forOfStatement(HandleValue var, HandleValue expr, HandleValue stmt, TokenPos* pos,
MutableHandleValue dst);
@ -859,20 +859,19 @@ NodeBuilder::forStatement(HandleValue init, HandleValue test, HandleValue update
}
bool
NodeBuilder::forInStatement(HandleValue var, HandleValue expr, HandleValue stmt, bool isForEach,
NodeBuilder::forInStatement(HandleValue var, HandleValue expr, HandleValue stmt,
TokenPos* pos, MutableHandleValue dst)
{
RootedValue isForEachVal(cx, BooleanValue(isForEach));
RootedValue cb(cx, callbacks[AST_FOR_IN_STMT]);
if (!cb.isNull())
return callback(cb, var, expr, stmt, isForEachVal, pos, dst);
if (!cb.isNull()) {
RootedValue isForEach(cx, JS::FalseValue()); // obsolete E4X `for each` statement
return callback(cb, var, expr, stmt, isForEach, pos, dst);
}
return newNode(AST_FOR_IN_STMT, pos,
"left", var,
"right", expr,
"body", stmt,
"each", isForEachVal,
dst);
}
@ -2257,10 +2256,9 @@ ASTSerializer::forIn(ParseNode* loop, ParseNode* head, HandleValue var, HandleVa
MutableHandleValue dst)
{
RootedValue expr(cx);
bool isForEach = loop->pn_iflags & JSITER_FOREACH;
return expression(head->pn_kid3, &expr) &&
builder.forInStatement(var, expr, stmt, isForEach, &loop->pn_pos, dst);
builder.forInStatement(var, expr, stmt, &loop->pn_pos, dst);
}
bool

Просмотреть файл

@ -4756,24 +4756,6 @@ DisRegExp(JSContext* cx, unsigned argc, Value* vp)
}
#endif // DEBUG
static bool
EnableForEach(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
JS::ContextOptionsRef(cx).setForEachStatement(true);
args.rval().setUndefined();
return true;
}
static bool
DisableForEach(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
JS::ContextOptionsRef(cx).setForEachStatement(false);
args.rval().setUndefined();
return true;
}
static bool
GetTimeZone(JSContext* cx, unsigned argc, Value* vp)
{
@ -5541,14 +5523,6 @@ gc::ZealModeHelpText),
"getModuleEnvironmentValue(module, name)",
" Get the value of a bound name in a module environment.\n"),
JS_FN_HELP("enableForEach", EnableForEach, 0, 0,
"enableForEach()",
" Enables the deprecated, non-standard for-each.\n"),
JS_FN_HELP("disableForEach", DisableForEach, 0, 0,
"disableForEach()",
" Disables the deprecated, non-standard for-each.\n"),
#if defined(FUZZING) && defined(__AFL_COMPILER)
JS_FN_HELP("aflloop", AflLoop, 1, 0,
"aflloop(max_cnt)",

Просмотреть файл

@ -7470,7 +7470,7 @@ BytecodeEmitter::emitForIn(ParseNode* forInLoop, EmitterScope* headLexicalEmitte
// Convert the value to the appropriate sort of iterator object for the
// loop variant (for-in, for-each-in, or destructuring for-in).
unsigned iflags = forInLoop->pn_iflags;
MOZ_ASSERT(0 == (iflags & ~(JSITER_FOREACH | JSITER_ENUMERATE)));
MOZ_ASSERT(0 == (iflags & ~JSITER_ENUMERATE));
if (!emit2(JSOP_ITER, AssertedCast<uint8_t>(iflags))) // ITER
return false;

Просмотреть файл

@ -23,7 +23,7 @@ namespace js {
*/
enum class DeprecatedLanguageExtension
{
ForEach = 0, // JS 1.6+
// NO LONGER USING 0
// NO LONGER USING 1
// NO LONGER USING 2
ExpressionClosure = 3, // Added in JS 1.8

Просмотреть файл

@ -6173,23 +6173,9 @@ Parser<ParseHandler, CharT>::forStatement(YieldHandling yieldHandling)
ParseContext::Statement stmt(pc, StatementKind::ForLoop);
bool isForEach = false;
IteratorKind iterKind = IteratorKind::Sync;
unsigned iflags = 0;
if (allowsForEachIn()) {
bool matched;
if (!tokenStream.matchToken(&matched, TOK_EACH))
return null();
if (matched) {
iflags = JSITER_FOREACH;
isForEach = true;
addTelemetry(DeprecatedLanguageExtension::ForEach);
if (!warnOnceAboutForEach())
return null();
}
}
if (pc->isAsync()) {
bool matched;
if (!tokenStream.matchToken(&matched, TOK_AWAIT))
@ -6253,10 +6239,6 @@ Parser<ParseHandler, CharT>::forStatement(YieldHandling yieldHandling)
errorAt(begin, JSMSG_FOR_AWAIT_NOT_OF);
return null();
}
if (isForEach && headKind != PNK_FORIN) {
errorAt(begin, JSMSG_BAD_FOR_EACH_LOOP);
return null();
}
Node forHead;
if (headKind == PNK_FORHEAD) {
@ -9889,20 +9871,6 @@ ParserBase::warnOnceAboutExprClosure()
return true;
}
bool
ParserBase::warnOnceAboutForEach()
{
if (context->helperThread())
return true;
if (!context->compartment()->warnedAboutForEach) {
if (!warning(JSMSG_DEPRECATED_FOR_EACH))
return false;
context->compartment()->warnedAboutForEach = true;
}
return true;
}
template class Parser<FullParseHandler, char16_t>;
template class Parser<SyntaxParseHandler, char16_t>;

Просмотреть файл

@ -236,15 +236,6 @@ class ParserBase : public StrictModeGetter
void addTelemetry(DeprecatedLanguageExtension e);
bool warnOnceAboutExprClosure();
bool warnOnceAboutForEach();
bool allowsForEachIn() {
#if !JS_HAS_FOR_EACH_IN
return false;
#else
return options().forEachStatementOption && versionNumber() >= JSVERSION_1_6;
#endif
}
bool hasValidSimpleStrictParameterNames();

Просмотреть файл

@ -63,7 +63,6 @@
macro(as, as, TOK_AS) \
macro(async, async, TOK_ASYNC) \
macro(await, await, TOK_AWAIT) \
macro(each, each, TOK_EACH) \
macro(from, from, TOK_FROM) \
macro(get, get, TOK_GET) \
macro(let, let, TOK_LET) \

Просмотреть файл

@ -240,20 +240,20 @@ def main(argv):
# skip-if = coverage
if os.getenv('GCOV_PREFIX') is not None:
# GCOV errors.
options.exclude += ['asm.js/testSIMD.js'] # Bug 1347245
options.exclude += [os.path.join('asm.js', 'testSIMD.js')] # Bug 1347245
# JSVM errors.
options.exclude += ['basic/functionnames.js'] # Bug 1369783
options.exclude += ['debug/Debugger-findScripts-23.js']
options.exclude += ['debug/bug1160182.js']
options.exclude += ['xdr/incremental-encoder.js']
options.exclude += ['xdr/bug1186973.js'] # Bug 1369785
options.exclude += ['xdr/relazify.js']
options.exclude += ['basic/werror.js']
options.exclude += [os.path.join('basic', 'functionnames.js')] # Bug 1369783
options.exclude += [os.path.join('debug', 'Debugger-findScripts-23.js')]
options.exclude += [os.path.join('debug', 'bug1160182.js')]
options.exclude += [os.path.join('xdr', 'incremental-encoder.js')]
options.exclude += [os.path.join('xdr', 'bug1186973.js')] # Bug 1369785
options.exclude += [os.path.join('xdr', 'relazify.js')]
options.exclude += [os.path.join('basic', 'werror.js')]
# Prevent code coverage test that expects coverage
# to be off when it starts.
options.exclude += ['debug/Script-getOffsetsCoverage-02.js']
options.exclude += [os.path.join('debug', 'Script-getOffsetsCoverage-02.js')]
if options.exclude_from:
with open(options.exclude_from) as fh:

Просмотреть файл

@ -1119,29 +1119,6 @@ function test_syntax(postfixes, check_error, ignore_opts) {
test("(function () 1); ");
}
// for each...in
enableForEach();
test("for each ");
test("for each (");
test("for each (x ");
test("for each (x in ");
test("for each (x in y ");
test("for each (x in y) ");
test("for each (var ");
test("for each (var x ");
test("for each (var x in ");
test("for each (var x in y ");
test("for each (var x in y) ");
test("for each (let ");
test("for each (let x ");
test("for each (let x in ");
test("for each (let x in y ");
test("for each (let x in y) ");
disableForEach();
// ==== asm.js ====
test("(function() { 'use asm'; ");

Просмотреть файл

@ -1,10 +0,0 @@
// |jit-test| need-for-each
x = true;
(function() {
for each(let c in [0, x]) {
(arguments)[4] *= c
}
})()
// don't assert

Просмотреть файл

@ -1,10 +0,0 @@
// |jit-test| need-for-each
var c;
(function() {
for each(e in [0, 0]) {
(arguments)[1] *= c
}
})()
// don't assert

Просмотреть файл

@ -1,20 +0,0 @@
// |jit-test| need-for-each
function foo() {
eval("\
for (var arguments in arguments)\
assertEq(f(i, 1), i+1);\
");
}
foo();
function bar() {
eval("\
var arguments;\
for each(e in [arguments, arguments]) {}\
");
}
bar();
(function(){assertEq(typeof eval("var arguments; arguments"), "object")})();
(function(... rest){assertEq(typeof eval("var arguments; arguments"), "object")})();

Просмотреть файл

@ -1,10 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-175ef7145705-linux
// Flags: -j
//
for (let cc = 0; cc < 3; ++cc) {
var c = cc;
print("" + new Number(.5));
for each (b in [0 / 0, 0 / 0]) {}
}

Просмотреть файл

@ -1,13 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-a9887b731f29-linux
// Flags: -j
//
(function () {
const c = 0;
with ({}) {
for each (k in [{}, {}]) {
"" + k;
}
}
})();

Просмотреть файл

@ -1,11 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-43a24a8896a3-linux
// Flags: -j
//
for (d in [0, 0]) {
const a = (d -= (++d).toString())
for each(b in [Number(1) << d, 0, 0xC]) {
b / a
}
}

Просмотреть файл

@ -1,15 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-d56149240ef8-linux
// Flags: -j
//
function foo(f) {
f()
}
foo((eval("\
(function () {\
for each(l in [0, 0xB504F332, 0]) {\
for (d in Error()) {}\
}\
})\
")))

Просмотреть файл

@ -1,10 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-d05dc3d31c75-linux
// Flags: -j
//
for each(let c in [1.3]) {
for (var x = 0; x < 4; ++x) {
gczeal(2);
}
}

Просмотреть файл

@ -1,9 +0,0 @@
// |jit-test| error:ReferenceError; need-for-each
// Binary: cache/js-dbg-64-1cd24ecc343d-linux
// Flags:
//
(function(){
var c;
eval("var c; for each(var c in s);");
})()

Просмотреть файл

@ -1,21 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-64-c08baee44cf4-linux
// Flags: -j
//
try {
with({
x: (function f(a) {
f(1)
})()
}) {}
} catch(e) {}
for each(x in ["", true]) {
for (b = 0; b < 4; ++b) {
if (b % 2 == 0) {
(function () {})()
} {
gc()
}
}
}

Просмотреть файл

@ -1,15 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-c0dbbcfdb583-linux
// Flags: -j
//
(function (){
var c;
(eval("\
(function() {\
eval(\"\
for each(w in[0,0,0]) { print(c) }\
\" , function(){})\
})\
"))()
})()

Просмотреть файл

@ -1,26 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-4a7f5376270a-linux
// Flags: -j
//
try {
(eval("\
(function() {\
for (var y = 0; y < 4; y++) {\
w = y\
}\
})")
)()
} catch(e) {}
(function() {
for (v in (x = {})) {}
})();
(function() {
for (var z = 0; z < 8; z++) {
if (z == 5) {
x /= x
} else {
for each(w in [1]) {}
}
}
})()

Просмотреть файл

@ -1,12 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-410468c50ca1-linux
// Flags: -j
//
load(libdir + 'asserts.js');
assertThrowsInstanceOf(function() {
for each(z in [0, 0, 0, 0]) { ({
__parent__: []
} = [])
}
}, TypeError); // [].__parent__ is undefined

Просмотреть файл

@ -1,21 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-9ca0a738a8ad-linux
// Flags:
//
x = ({
x: /x/
})
x.p = []
Object.defineProperty(x, "x", {
writable: ""
})
for (b in [[], null, [undefined]]) {
function f(a) {
delete a.x
a.x = Infinity
}
for each(z in [x]) {
f(z)
}
}

Просмотреть файл

@ -1,11 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-64-fadb38356e0f-linux
// Flags: -j
//
NaN = []
for (var a = 0; a < 2; ++a) {
if (a == 1) {
for each(e in [NaN, Infinity, NaN]) {}
}
}

Просмотреть файл

@ -1,13 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-55f39d8d866c-linux
// Flags: -j
//
eval("\
for each(d in[0,0,0,0,0,0,0,0,0,0,0,0]) {\
(function f(aaaaaa,bbbbbb){\
return aaaaaa.length==bbbbbb?0:aaaaaa[bbbbbb]+f(aaaaaa,bbbbbb+1)\
})\
([,,true,'',,(0),(0/0),new Number,true,Number()],0)\
}\
")

Просмотреть файл

@ -1,14 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-33b05dd43cd4-linux
// Flags: -j
//
(function() {
for each(let z in [0, 0, 0, 0]) {
eval("\
for(var a = 0; a < 1; ++a) {\
this\
}\
")
}
})()

Просмотреть файл

@ -1,16 +0,0 @@
// |jit-test| error:TypeError; need-for-each
// Binary: cache/js-dbg-64-e8ee411dca70-linux
// Flags:
//
__defineGetter__("x", function () {});
function z() {
"".replace(/s/, "");
}
z();
(function () {
for (a = 0; a < 2; a++) {
__defineGetter__("", /a/);
for each(y in [__defineGetter__("x", function(){})]) {}
}
}());

Просмотреть файл

@ -1,13 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-60af58b42567-linux
// Flags:
//
function z(b) {
if (b) this.x = Object;
this.__defineGetter__("x", encodeURIComponent)
this.c = delete s
}
for each(a in [/x/, 0]) {
new z(a)
}

Просмотреть файл

@ -1,12 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-64-54700fad8cf9-linux
// Flags: -j
//
this.__defineSetter__("x", Object.freeze)
x = this;
for (let z = 0; z < 5; z++) {
for each(let y in [0, 0, 0]) {
print(u = "")
}
}

Просмотреть файл

@ -1,17 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-64-98c134cf59ef-linux
// Flags: -j
//
uneval = function(){}
Function("\
function zz(aa) {\
if (aa) this.a = decodeURIComponent;\
gc();\
delete this.a\
}\
for each(c in [0, 0, 0, 0, 0, 0, 0, new Boolean(false), \
0, new Boolean(false), new Boolean(false), \"\"]) {\
l=new zz(c)\
}\
")()

Просмотреть файл

@ -1,14 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-0230a9e80c1f-linux
// Flags: -j
//
(function(){
eval("\
for each(let a in['A','A','A','A','A','A','A','A']) {\
L:for each(let b in a) {\
break L\
}\
}\
")
})()

Просмотреть файл

@ -1,28 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-38f985b0522c-linux
// Flags: -j
//
var g;
var e;
var w;
for each (a in this) { }
d = 3;
x = 3;
for (var m = 0; m < 9; ++m) {}
for each (var c in this) { }
for each(let d in [
[],
[],
[],
function () {},
undefined
]) {
for each(let f in [
[],
[],
true,
[],
true
]) {}
}

Просмотреть файл

@ -1,20 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-d5fcfa622f16-linux
// Flags:
//
load(libdir + "immutable-prototype.js");
Function.toLocaleString.__proto__ = null
y = {}.__proto__
y.p = function() {}
y.__defineSetter__("", function() {})
if (globalPrototypeChainIsMutable())
y.__proto__ = Function.toLocaleString;
function b(a) {
this.__proto__ = a;
Object.freeze(this)
}
for each(z in []) {
new b
}

Просмотреть файл

@ -1,14 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-5d1cbc94bc42-linux
// Flags: -m -n -a
//
function f(x) {
this.i = x;
}
for each(let e in [0, 0, []]) {
try {
f(e)
} catch (e) {}
}
print(uneval(this))

Просмотреть файл

@ -1,12 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-f59568ec0513-linux
// Flags: -j
//
for each(let y in [0, 0]) {
eval("\
for each(e in[0,0,0,0,0,0,0,0]) {\
x = undefined\
}\
")
}

Просмотреть файл

@ -1,18 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-32-44ef245b8706-linux
// Flags: -m -n -a
//
[].__proto__.__defineGetter__("", function() {});
var tryCatch = " try{}catch(e){}";
for (var i = 0; i < 13; ++i) {
tryCatch += tryCatch;
}
eval("\
(function() {\
for each(c in[0,0]){\
" + tryCatch + "\
print\
}\
})\
")()

Просмотреть файл

@ -1,32 +0,0 @@
// |jit-test| slow; need-for-each
// Binary: cache/js-dbg-32-e5e66f40c35b-linux
// Flags:
//
gczeal(2);
function subset(list, size) {
if (size == 0 || !list.length)
return [list.slice(0, 0)];
var result = [];
for (var i = 0, n = list.length; i < n; i++) {
var pick = list.slice(i, i+1);
var rest = list.slice(0, i).concat(list.slice(i+1));
for each (var x in subset(rest, size-1))
result.push(pick.concat(x));
}
return result;
}
var bops = [
["=", "|=", "^=", "&=", "<<=", ">>=", ">>>=", "+=", "-=", "*=", "/=", "%="],
];
var aops = [];
for (var i = 0; i < bops.length; i++) {
for (var j = 0; j < bops[i].length; j++) {
var k = bops[i][j];
aops.push(k);
}
for (i = 2; i < 5; i++) {
var sets = subset(aops, i);
}
}

Просмотреть файл

@ -1,49 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-64-e8de64e7e9fe-linux
// Flags: --ion-eager
//
function printStatus (msg) {}
function printBugNumber (num) {}
function reportCompare (expected, actual, description) {
printStatus ("Expected value '" + toPrinted(expected) + "' matched actual value '" + toPrinted(actual) + "'");
}
try {
reportCompare(expectCompile, actualCompile, summary + ': compile actual');
} catch(ex) { }
var lfcode = new Array();
lfcode.push("\
var bar = {\
b: 2,\
};\
var results = [];\
for each (let [key, value] in Iterator(bar))\
results.push(key + \":\" + (results(isXMLName(), \"ok\")));\
var expect = \"a:1;b:2\";\
");
lfcode.push("\
var BUGNUMBER = 244619;\
var summary = 'Don\\'t Crash';\
var actual = 'Crash';\
function f1()\
eval.call((enterFunc ('test')), \"var a = 'vodka'\");\
gczeal(4);\
reportCompare(expect, actual, summary);\
");
while (true) {
var file = lfcode.shift(); if (file == undefined) { break; }
if (file == "evaluate") {
} else {
loadFile(file);
}
}
function loadFile(lfVarx) {
try {
if (lfVarx.substr(-3) == ".js") {
switch (lfRunTypeId) { }
} else {
evaluate(lfVarx);
}
} catch (lfVare) {
}
}

Просмотреть файл

@ -1,9 +0,0 @@
// |jit-test| error:TypeError; need-for-each
// Binary: cache/js-dbg-64-074fb996dfd7-linux
// Flags:
//
(function() {
for each(let Math in []) {}
}).floor(2147483649)

Просмотреть файл

@ -1,6 +0,0 @@
// |jit-test| need-for-each
// Binary: cache/js-dbg-64-4e9567eeb09e-linux
// Flags:
//
for each(e in [].some) {}

Просмотреть файл

@ -1,23 +0,0 @@
// |jit-test| need-for-each
s = newGlobal()
function f(code) {
evalcx(code, s)
}
f("\
c = [];\
var x;\
for each(z in[\
x,,[],,new Number,,,,new Number,,,,new Number,new Number,[],\
,,,[],,new Number,,new Number,,[],new Number,[],,,,,,[],\
new Number,,new Number,[],,[],,,,[],,[],,,,,,,,,[],[],,[],\
[],[],,new Number,[],[],,[],,new Number,new Number,new Number,\
new Number,new Number,,,new Number,new Number,,[],[],[],,,[],\
[],[],new Number,,new Number,,,,,[],new Number,new Number,[],\
[],[],[],,x,[]]\
) {\
c = z\
};\
");
f("c");

Просмотреть файл

@ -1,8 +0,0 @@
// |jit-test| need-for-each
z = [];
m = evalcx("");
Object.freeze(m);
for each(l in [{}, {}]) {
m.s = "";
}

Просмотреть файл

@ -1,8 +0,0 @@
// |jit-test| need-for-each
for each(var x in [{n: 1}, {n: 1}, {n: 1}, {n: 1}, {n: 1}, {n: 1}, {n: 1},
{n: 1}, {n: 1}, {n: 1}, {n: 1}, {n: 1}, {n: 1}, {n: 1},
{n: 1}, {n: 1}, {n: 1}, {n: 1}, {n: 1}, {n: 1}]) {
x[0] = 0;
Object.freeze(x);
}

Просмотреть файл

@ -1,9 +0,0 @@
// |jit-test| need-for-each
function bug464403() {
print(8);
var u = [print, print, function(){}]
for each (x in u) for (u.e in [1,1,1,1]);
return "ok";
}
assertEq(bug464403(), "ok");

Просмотреть файл

@ -1,15 +0,0 @@
// |jit-test| need-for-each
var a = [];
for (let j = 0; j < 6; ++j) {
e = 3;
for each (let c in [10, 20, 30]) {
a.push(e);
e = c;
}
}
for (let j = 0; j < 6; ++j) {
assertEq(a[j*3 + 0], 3);
assertEq(a[j*3 + 1], 10);
assertEq(a[j*3 + 2], 20);
}

Просмотреть файл

@ -1,9 +0,0 @@
// |jit-test| need-for-each
(function () {
for (a = 0; a < 3; a++) {
for each(b in [0, -0]) {}
}
})()
// Just test we don't assert.

Просмотреть файл

@ -1,9 +0,0 @@
// |jit-test| need-for-each
a = b = c = d = 0;
this.__defineGetter__("e", function () { throw Math; })
try {
for each(f in this) {}
} catch (exc) {
assertEq(exc, Math);
}

Просмотреть файл

@ -1,9 +0,0 @@
// |jit-test| need-for-each
var obj = {a: 0, b: 0, c: 0, d: 0, get e() { throw Math; }};
try {
for each (x in obj) {}
FAIL;
} catch (exc) {
assertEq(exc, Math);
}

Просмотреть файл

@ -1,41 +0,0 @@
// |jit-test| need-for-each
(Function("\
for each(let x in [\n\
true,\n\
(1),\n\
(1),\n\
(1),\n\
(1),\n\
true,\n\
true,\n\
true,\n\
(1),\n\
true,\n\
true,\n\
(1),\n\
true,\n\
true,\n\
(1),\n\
(1),\n\
true,\n\
true,\n\
true,\n\
true\n\
]) { \n\
((function f(aaaaaa) {\n\
return aaaaaa.length == 0 ? 0 : aaaaaa[0] + f(aaaaaa.slice(1))\n\
})([\n\
x,\n\
Math.I,\n\
'',\n\
null,\n\
Math.I,\n\
null,\n\
new String(),\n\
new String()\n\
]))\n\
}"))()
/* Don't assert/crash. */

Просмотреть файл

@ -1,11 +0,0 @@
// |jit-test| need-for-each
function g() {
function f(a) {
delete a.x;
}
for each(let w in [Infinity, String()]) {
let i = f(w);
}
}
g();

Просмотреть файл

@ -1,13 +0,0 @@
// |jit-test| need-for-each
{
function a() {}
}
Math.floor(Math.d)
function c() {}
c()
for each(let b in [0, 0, 0, 0, 0, 0, 0, -2147483648]) {
print(Math.abs(b))
}
// Don't assert

Просмотреть файл

@ -1,21 +0,0 @@
// |jit-test| need-for-each
var loop1 = '', loop2 = '', actual = '';
var obj = {};
for (var i = 0; i < 10; i++) {
obj['a' + i] = i;
loop1 += i;
loop2 += 'a' + i;
}
Object.defineProperty(obj, 'z', {enumerable: true, get: function () {
for (var y in obj)
actual += y;
}});
(function() {
for each (var e in obj)
actual += e;
})();
assertEq(actual, loop1 + loop2 + "z" + "undefined");

Просмотреть файл

@ -1,30 +0,0 @@
// |jit-test| need-for-each
N = 0;
function n() {}
s = n;
function f(foo) {
gc();
try {
(Function(foo))();
} catch(r) {}
delete this.Math;
}
function g() {}
var c;
function y() {}
t = b = eval;
f("\
__defineGetter__(\"\",\
function(p){\
for(var s in this) {}\
}\
)[\"\"]\
");
f("\
do;\
while(([\
\"\" for each(z in this)\
])&0)\
");
f();

Просмотреть файл

@ -1,7 +0,0 @@
// |jit-test| need-for-each
try {
x = evalcx('lazy');
x.__iterator__ = Object.isFrozen
for each(x in x) {}
} catch (e) {}

Просмотреть файл

@ -1,7 +1,5 @@
// |jit-test| need-for-each
// Catch memory leaks when enumerating over the global object.
for (let z = 1; z <= 16000; ++z) {
for each (y in this);
for (y in this);
}

Просмотреть файл

@ -1,14 +0,0 @@
// |jit-test| need-for-each
summary=/(?!AB+D)AB/.exec("AB") + '';
try {
var s = "throw 42";
} catch (e) {}
test();
function test() {
[ {0xBe: /l/|| 'Error' ? s++ : summary } ]
}
function foo(code) {
return Function(code)();
}
foo("for each (y in this);");

Просмотреть файл

@ -1,6 +0,0 @@
// |jit-test| need-for-each
function test() {
for each (var i in []) {}
}
for each (new test().p in [0]) {}

Просмотреть файл

@ -1,15 +0,0 @@
// |jit-test| need-for-each
var x = {f: 1, g: 0};
function f() {
for each (new f().nosuch.prop in x)
throw 'FAIL';
}
var e;
try {
f();
} catch (exc) {
e = exc;
}
assertEq(e instanceof InternalError, true);

Просмотреть файл

@ -1,13 +0,0 @@
// |jit-test| need-for-each
load(libdir + "asserts.js");
assertThrowsInstanceOf(function () {
i = 0;
do {
with({
TestCase: Float64Array
}) for each(let TestCase in [TestCase]) {}
} while (i++ < 10);
function TestCase(n, d, e, a) {}
}, ReferenceError);

Просмотреть файл

@ -1,14 +0,0 @@
// |jit-test| need-for-each
Function.prototype.__proto__["p"] = 3
c = [].__proto__
c[5] = 3
gc()
Function("\
{\
function f(d) {}\
for each(let z in[0]) {\
f(z)\
}\
}\
")()

Просмотреть файл

@ -1,15 +0,0 @@
// |jit-test| need-for-each
Function("\
gczeal(4,false);\
function f(){\
\"use strict\";\
this.x = Object\
}\
for each(y in[0,0]){\
try{\
new f\
}\
catch(e){}\
}\
")()

Просмотреть файл

@ -1,14 +0,0 @@
// |jit-test| need-for-each
function newFunc(x) { new Function(x)(); }; try { newFunc("\
var g = newGlobal();\
g.h = function () {\
names = foo.blaaaaaaaaaaaaah().environment.names();\
};\
g.eval('var obj = {a: 1};' + \"with ({a: 1, '0xcafe': 2, ' ': 3, '': 4, '0': 5}) h();\");\
");
} catch(exc1) {}
function newFunc(x) { new Function(x)(); }; newFunc("\
gczeal(2);\
a=b=c=d=0; this.__defineGetter__('g', gc); for each (y in this);\
");

Просмотреть файл

@ -1,4 +1,4 @@
// |jit-test| error: 42; need-for-each
// |jit-test| error: 42
load(libdir + "immutable-prototype.js");
// Suppress the large quantity of output on stdout (eg from calling
@ -15,7 +15,7 @@ var blacklist = {
};
function f(y) {}
for each(let e in newGlobal()) {
for (let e of Object.values(newGlobal())) {
if (e.name in blacklist)
continue;
print(e.name);
@ -32,7 +32,7 @@ for each(let e in newGlobal()) {
}
var arr = [];
arr.__proto__ = newGlobal();
for each (b in arr) {
for (b of Object.values(arr)) {
if (b.name in blacklist)
continue;
try {

Просмотреть файл

@ -1,9 +1,7 @@
// |jit-test| need-for-each
var a = ['p', 'q', 'r', 's', 't'];
var o = {p:1, q:2, r:3, s:4, t:5};
for (var i in o)
delete o[i];
for each (var i in a)
for (var i of a)
assertEq(o.hasOwnProperty(i), false);

Просмотреть файл

@ -1,5 +1,3 @@
// |jit-test| need-for-each
var a = ['p', 'q', 'r', 's', 't'];
var o = {p:1, q:2, r:3, s:4, t:5};
for (var i in o) {
@ -9,6 +7,6 @@ for (var i in o) {
delete o.s;
delete o.t;
}
for each (var i in a)
for (var i of a)
assertEq(o.hasOwnProperty(i), false);

Просмотреть файл

@ -1,5 +1,3 @@
// |jit-test| need-for-each
(function(x) {
function f1() { return 1; }
function f2() { return 2; }
@ -7,6 +5,6 @@
function f4() { return 4; }
var g = function () { return x; }
var a = [f1, f2, f3, f4, g];
for each (var v in a)
for (var v of a)
v.adhoc = 42; // Don't assertbotch in jsbuiltins.cpp setting g.adhoc
})(33);

Просмотреть файл

@ -1,8 +0,0 @@
// |jit-test| need-for-each
//test no multitrees assert
function testBug462388() {
var c = 0, v; for each (let x in ["",v,v,v]) { for (c=0;c<4;++c) { } }
return true;
}
assertEq(testBug462388(), true);

Просмотреть файл

@ -1,8 +0,0 @@
// |jit-test| need-for-each
//test no multitrees assert
function testBug462407() {
for each (let i in [0, {}, 0, 1.5, {}, 0, 1.5, 0, 0]) { }
return true;
}
assertEq(testBug462407(), true);

Просмотреть файл

@ -1,9 +0,0 @@
// |jit-test| need-for-each
// Test no assert or crash
function testBug465261() {
for (let z = 0; z < 2; ++z) { for each (let x in [0, true, (void 0), 0, (void
0)]) { if(x){} } };
return true;
}
assertEq(testBug465261(), true);

Просмотреть файл

@ -1,9 +0,0 @@
// |jit-test| need-for-each
function testBug465483() {
var a = new Array(4);
var c = 0;
for each (i in [4, 'a', 'b', (void 0)]) a[c++] = '' + (i + i);
return a.join(',');
}
assertEq(testBug465483(), '8,aa,bb,NaN');

Просмотреть файл

@ -1,8 +1,6 @@
// |jit-test| need-for-each
//test no assert
function testBug465688() {
for each (let d in [-0x80000000, -0x80000000]) - -d;
for (let d of [-0x80000000, -0x80000000]) - -d;
return true;
}
assertEq(testBug465688(), true);

Просмотреть файл

@ -1,11 +0,0 @@
// |jit-test| need-for-each
//test no multitrees assert
function testBug466128() {
for (let a = 0; a < 3; ++a) {
for each (let b in [1, 2, "three", 4, 5, 6, 7, 8]) {
}
}
return true;
}
assertEq(testBug466128(), true);

Просмотреть файл

@ -1,12 +0,0 @@
// |jit-test| need-for-each
delete b;
delete q;
for each (testBug474769_b in [1, 1, 1, 1.5, 1, 1]) {
(function() { for each (let testBug474769_h in [0, 0, 1.4, ""]) {} })()
}
function testBug474769() {
return testBug474769_b;
}
assertEq(testBug474769(), 1);

Просмотреть файл

@ -1,13 +1,11 @@
// |jit-test| need-for-each
function testBug504520Harder() {
// test 1024 similar cases
var vals = [1/0, -1/0, 0, 0/0];
var ops = ["===", "!==", "==", "!=", "<", ">", "<=", ">="];
for each (var x in vals) {
for each (var y in vals) {
for each (var op in ops) {
for each (var z in vals) {
for (var x of vals) {
for (var y of vals) {
for (var op of ops) {
for (var z of vals) {
// Assume eval is correct. This depends on the global
// Infinity property not having been reassigned.
var xz = eval(x + op + z);

Просмотреть файл

@ -1,20 +0,0 @@
// |jit-test| need-for-each
for each(let a in [new Boolean(false)]) {}
for (var b = 0; b < 13; ++b) {
if (b % 3 == 1) {
(function f(c) {
if (c <= 1) {
return 1;
}
return f(c - 1) + f(c - 2);
})(3)
} else {
(function g(d, e) {;
return d.length == e ? 0 : d[e] + g(d, e + 1);
})([false, new Boolean(true), false], 0)
}
}
/* Should not have crashed. */

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше