зеркало из https://github.com/mozilla/gecko-dev.git
Merge inbound to mozilla-central. a=merge
This commit is contained in:
Коммит
b55e1a1cbc
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -123,9 +123,9 @@ extern "C" {
|
|||
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
|
||||
** [sqlite_version()] and [sqlite_source_id()].
|
||||
*/
|
||||
#define SQLITE_VERSION "3.22.0"
|
||||
#define SQLITE_VERSION_NUMBER 3022000
|
||||
#define SQLITE_SOURCE_ID "2018-01-22 18:45:57 0c55d179733b46d8d0ba4d88e01a25e10677046ee3da1d5b1581e86726f2171d"
|
||||
#define SQLITE_VERSION "3.23.0"
|
||||
#define SQLITE_VERSION_NUMBER 3023000
|
||||
#define SQLITE_SOURCE_ID "2018-04-02 11:04:16 736b53f57f70b23172c30880186dce7ad9baa3b74e3838cae5847cffb98f5cd2"
|
||||
|
||||
/*
|
||||
** CAPI3REF: Run-Time Library Version Numbers
|
||||
|
@ -1064,6 +1064,12 @@ struct sqlite3_io_methods {
|
|||
** 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].
|
||||
**
|
||||
** <li>[[SQLITE_FCNTL_LOCK_TIMEOUT]]
|
||||
** The [SQLITE_FCNTL_LOCK_TIMEOUT] opcode causes attempts to obtain
|
||||
** a file lock using the xLock or xShmLock methods of the VFS to wait
|
||||
** for up to M milliseconds before failing, where M is the single
|
||||
** unsigned integer parameter.
|
||||
** </ul>
|
||||
*/
|
||||
#define SQLITE_FCNTL_LOCKSTATE 1
|
||||
|
@ -1098,6 +1104,7 @@ struct sqlite3_io_methods {
|
|||
#define SQLITE_FCNTL_BEGIN_ATOMIC_WRITE 31
|
||||
#define SQLITE_FCNTL_COMMIT_ATOMIC_WRITE 32
|
||||
#define SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE 33
|
||||
#define SQLITE_FCNTL_LOCK_TIMEOUT 34
|
||||
|
||||
/* deprecated names */
|
||||
#define SQLITE_GET_LOCKPROXYFILE SQLITE_FCNTL_GET_LOCKPROXYFILE
|
||||
|
@ -2054,11 +2061,13 @@ struct sqlite3_mem_methods {
|
|||
** connections at all to the database. If so, it performs a checkpoint
|
||||
** operation before closing the connection. This option may be used to
|
||||
** override this behaviour. The first parameter passed to this operation
|
||||
** is an integer - non-zero to disable checkpoints-on-close, or zero (the
|
||||
** default) to enable them. The second parameter is a pointer to an integer
|
||||
** is an integer - positive to disable checkpoints-on-close, or zero (the
|
||||
** default) to enable them, and negative to leave the setting unchanged.
|
||||
** The second parameter is a pointer to an integer
|
||||
** into which is written 0 or 1 to indicate whether checkpoints-on-close
|
||||
** have been disabled - 0 if they are not disabled, 1 if they are.
|
||||
** </dd>
|
||||
**
|
||||
** <dt>SQLITE_DBCONFIG_ENABLE_QPSG</dt>
|
||||
** <dd>^(The SQLITE_DBCONFIG_ENABLE_QPSG option activates or deactivates
|
||||
** the [query planner stability guarantee] (QPSG). When the QPSG is active,
|
||||
|
@ -2068,13 +2077,20 @@ struct sqlite3_mem_methods {
|
|||
** slower. But the QPSG has the advantage of more predictable behavior. With
|
||||
** the QPSG active, SQLite will always use the same query plan in the field as
|
||||
** was used during testing in the lab.
|
||||
** The first argument to this setting is an integer which is 0 to disable
|
||||
** the QPSG, positive to enable QPSG, or negative to leave the setting
|
||||
** unchanged. The second parameter is a pointer to an integer into which
|
||||
** is written 0 or 1 to indicate whether the QPSG is disabled or enabled
|
||||
** following this call.
|
||||
** </dd>
|
||||
**
|
||||
** <dt>SQLITE_DBCONFIG_TRIGGER_EQP</dt>
|
||||
** <dd> By default, the output of EXPLAIN QUERY PLAN commands does not
|
||||
** include output for any operations performed by trigger programs. This
|
||||
** option is used to set or clear (the default) a flag that governs this
|
||||
** behavior. The first parameter passed to this operation is an integer -
|
||||
** non-zero to enable output for trigger programs, or zero to disable it.
|
||||
** positive to enable output for trigger programs, or zero to disable it,
|
||||
** or negative to leave the setting unchanged.
|
||||
** The second parameter is a pointer to an integer into which is written
|
||||
** 0 or 1 to indicate whether output-for-triggers has been disabled - 0 if
|
||||
** it is not disabled, 1 if it is.
|
||||
|
@ -2496,16 +2512,16 @@ SQLITE_API void sqlite3_free_table(char **result);
|
|||
**
|
||||
** These routines are work-alikes of the "printf()" family of functions
|
||||
** from the standard C library.
|
||||
** These routines understand most of the common K&R formatting options,
|
||||
** plus some additional non-standard formats, detailed below.
|
||||
** Note that some of the more obscure formatting options from recent
|
||||
** C-library standards are omitted from this implementation.
|
||||
** These routines understand most of the common formatting options from
|
||||
** the standard library printf()
|
||||
** plus some additional non-standard formats ([%q], [%Q], [%w], and [%z]).
|
||||
** See the [built-in printf()] documentation for details.
|
||||
**
|
||||
** ^The sqlite3_mprintf() and sqlite3_vmprintf() routines write their
|
||||
** results into memory obtained from [sqlite3_malloc()].
|
||||
** results into memory obtained from [sqlite3_malloc64()].
|
||||
** The strings returned by these two routines should be
|
||||
** released by [sqlite3_free()]. ^Both routines return a
|
||||
** NULL pointer if [sqlite3_malloc()] is unable to allocate enough
|
||||
** NULL pointer if [sqlite3_malloc64()] is unable to allocate enough
|
||||
** memory to hold the resulting string.
|
||||
**
|
||||
** ^(The sqlite3_snprintf() routine is similar to "snprintf()" from
|
||||
|
@ -2529,71 +2545,7 @@ SQLITE_API void sqlite3_free_table(char **result);
|
|||
**
|
||||
** ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf().
|
||||
**
|
||||
** These routines all implement some additional formatting
|
||||
** options that are useful for constructing SQL statements.
|
||||
** All of the usual printf() formatting options apply. In addition, there
|
||||
** is are "%q", "%Q", "%w" and "%z" options.
|
||||
**
|
||||
** ^(The %q option works like %s in that it substitutes a nul-terminated
|
||||
** string from the argument list. But %q also doubles every '\'' character.
|
||||
** %q is designed for use inside a string literal.)^ By doubling each '\''
|
||||
** character it escapes that character and allows it to be inserted into
|
||||
** the string.
|
||||
**
|
||||
** For example, assume the string variable zText contains text as follows:
|
||||
**
|
||||
** <blockquote><pre>
|
||||
** char *zText = "It's a happy day!";
|
||||
** </pre></blockquote>
|
||||
**
|
||||
** One can use this text in an SQL statement as follows:
|
||||
**
|
||||
** <blockquote><pre>
|
||||
** char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES('%q')", zText);
|
||||
** sqlite3_exec(db, zSQL, 0, 0, 0);
|
||||
** sqlite3_free(zSQL);
|
||||
** </pre></blockquote>
|
||||
**
|
||||
** Because the %q format string is used, the '\'' character in zText
|
||||
** is escaped and the SQL generated is as follows:
|
||||
**
|
||||
** <blockquote><pre>
|
||||
** INSERT INTO table1 VALUES('It''s a happy day!')
|
||||
** </pre></blockquote>
|
||||
**
|
||||
** This is correct. Had we used %s instead of %q, the generated SQL
|
||||
** would have looked like this:
|
||||
**
|
||||
** <blockquote><pre>
|
||||
** INSERT INTO table1 VALUES('It's a happy day!');
|
||||
** </pre></blockquote>
|
||||
**
|
||||
** This second example is an SQL syntax error. As a general rule you should
|
||||
** always use %q instead of %s when inserting text into a string literal.
|
||||
**
|
||||
** ^(The %Q option works like %q except it also adds single quotes around
|
||||
** the outside of the total string. Additionally, if the parameter in the
|
||||
** argument list is a NULL pointer, %Q substitutes the text "NULL" (without
|
||||
** single quotes).)^ So, for example, one could say:
|
||||
**
|
||||
** <blockquote><pre>
|
||||
** char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES(%Q)", zText);
|
||||
** sqlite3_exec(db, zSQL, 0, 0, 0);
|
||||
** sqlite3_free(zSQL);
|
||||
** </pre></blockquote>
|
||||
**
|
||||
** The code above will render a correct SQL statement in the zSQL
|
||||
** variable even if the zText variable is a NULL pointer.
|
||||
**
|
||||
** ^(The "%w" formatting option is like "%q" except that it expects to
|
||||
** be contained within double-quotes instead of single quotes, and it
|
||||
** escapes the double-quote character instead of the single-quote
|
||||
** character.)^ The "%w" formatting option is intended for safely inserting
|
||||
** table and column names into a constructed SQL statement.
|
||||
**
|
||||
** ^(The "%z" formatting option works like "%s" but with the
|
||||
** addition that after the string has been read and copied into
|
||||
** the result, [sqlite3_free()] is called on the input string.)^
|
||||
** See also: [built-in printf()], [printf() SQL function]
|
||||
*/
|
||||
SQLITE_API char *sqlite3_mprintf(const char*,...);
|
||||
SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
|
||||
|
@ -3659,13 +3611,13 @@ SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
|
|||
** or [GLOB] operator or if the parameter is compared to an indexed column
|
||||
** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled.
|
||||
** </li>
|
||||
** </ol>
|
||||
**
|
||||
** <p>^sqlite3_prepare_v3() differs from sqlite3_prepare_v2() only in having
|
||||
** the extra prepFlags parameter, which is a bit array consisting of zero or
|
||||
** more of the [SQLITE_PREPARE_PERSISTENT|SQLITE_PREPARE_*] flags. ^The
|
||||
** sqlite3_prepare_v2() interface works exactly the same as
|
||||
** sqlite3_prepare_v3() with a zero prepFlags parameter.
|
||||
** </ol>
|
||||
*/
|
||||
SQLITE_API int sqlite3_prepare(
|
||||
sqlite3 *db, /* Database handle */
|
||||
|
@ -7294,6 +7246,15 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
|
|||
** highwater mark associated with SQLITE_DBSTATUS_CACHE_WRITE is always 0.
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_DBSTATUS_CACHE_SPILL]] ^(<dt>SQLITE_DBSTATUS_CACHE_SPILL</dt>
|
||||
** <dd>This parameter returns the number of dirty cache entries that have
|
||||
** been written to disk in the middle of a transaction due to the page
|
||||
** cache overflowing. Transactions are more efficient if they are written
|
||||
** to disk all at once. When pages spill mid-transaction, that introduces
|
||||
** additional overhead. This parameter can be used help identify
|
||||
** inefficiencies that can be resolve by increasing the cache size.
|
||||
** </dd>
|
||||
**
|
||||
** [[SQLITE_DBSTATUS_DEFERRED_FKS]] ^(<dt>SQLITE_DBSTATUS_DEFERRED_FKS</dt>
|
||||
** <dd>This parameter returns zero for the current value if and only if
|
||||
** all foreign key constraints (deferred or immediate) have been
|
||||
|
@ -7313,7 +7274,8 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r
|
|||
#define SQLITE_DBSTATUS_CACHE_WRITE 9
|
||||
#define SQLITE_DBSTATUS_DEFERRED_FKS 10
|
||||
#define SQLITE_DBSTATUS_CACHE_USED_SHARED 11
|
||||
#define SQLITE_DBSTATUS_MAX 11 /* Largest defined DBSTATUS */
|
||||
#define SQLITE_DBSTATUS_CACHE_SPILL 12
|
||||
#define SQLITE_DBSTATUS_MAX 12 /* Largest defined DBSTATUS */
|
||||
|
||||
|
||||
/*
|
||||
|
@ -8793,6 +8755,128 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp(
|
|||
*/
|
||||
SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const char *zDb);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Serialize a database
|
||||
**
|
||||
** The sqlite3_serialize(D,S,P,F) interface returns a pointer to memory
|
||||
** that is a serialization of the S database on [database connection] D.
|
||||
** If P is not a NULL pointer, then the size of the database in bytes
|
||||
** is written into *P.
|
||||
**
|
||||
** For an ordinary on-disk database file, the serialization is just a
|
||||
** copy of the disk file. For an in-memory database or a "TEMP" database,
|
||||
** the serialization is the same sequence of bytes which would be written
|
||||
** to disk if that database where backed up to disk.
|
||||
**
|
||||
** The usual case is that sqlite3_serialize() copies the serialization of
|
||||
** the database into memory obtained from [sqlite3_malloc64()] and returns
|
||||
** a pointer to that memory. The caller is responsible for freeing the
|
||||
** returned value to avoid a memory leak. However, if the F argument
|
||||
** contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations
|
||||
** are made, and the sqlite3_serialize() function will return a pointer
|
||||
** to the contiguous memory representation of the database that SQLite
|
||||
** is currently using for that database, or NULL if the no such contiguous
|
||||
** memory representation of the database exists. A contiguous memory
|
||||
** representation of the database will usually only exist if there has
|
||||
** been a prior call to [sqlite3_deserialize(D,S,...)] with the same
|
||||
** values of D and S.
|
||||
** The size of the database is written into *P even if the
|
||||
** SQLITE_SERIALIZE_NOCOPY bit is set but no contigious copy
|
||||
** of the database exists.
|
||||
**
|
||||
** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the
|
||||
** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory
|
||||
** allocation error occurs.
|
||||
**
|
||||
** This interface is only available if SQLite is compiled with the
|
||||
** [SQLITE_ENABLE_DESERIALIZE] option.
|
||||
*/
|
||||
SQLITE_API unsigned char *sqlite3_serialize(
|
||||
sqlite3 *db, /* The database connection */
|
||||
const char *zSchema, /* Which DB to serialize. ex: "main", "temp", ... */
|
||||
sqlite3_int64 *piSize, /* Write size of the DB here, if not NULL */
|
||||
unsigned int mFlags /* Zero or more SQLITE_SERIALIZE_* flags */
|
||||
);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Flags for sqlite3_serialize
|
||||
**
|
||||
** Zero or more of the following constants can be OR-ed together for
|
||||
** the F argument to [sqlite3_serialize(D,S,P,F)].
|
||||
**
|
||||
** SQLITE_SERIALIZE_NOCOPY means that [sqlite3_serialize()] will return
|
||||
** a pointer to contiguous in-memory database that it is currently using,
|
||||
** without making a copy of the database. If SQLite is not currently using
|
||||
** a contiguous in-memory database, then this option causes
|
||||
** [sqlite3_serialize()] to return a NULL pointer. SQLite will only be
|
||||
** using a contiguous in-memory database if it has been initialized by a
|
||||
** prior call to [sqlite3_deserialize()].
|
||||
*/
|
||||
#define SQLITE_SERIALIZE_NOCOPY 0x001 /* Do no memory allocations */
|
||||
|
||||
/*
|
||||
** CAPI3REF: Deserialize a database
|
||||
**
|
||||
** The sqlite3_deserialize(D,S,P,N,M,F) interface causes the
|
||||
** [database connection] D to disconnect from database S and then
|
||||
** reopen S as an in-memory database based on the serialization contained
|
||||
** in P. The serialized database P is N bytes in size. M is the size of
|
||||
** the buffer P, which might be larger than N. If M is larger than N, and
|
||||
** the SQLITE_DESERIALIZE_READONLY bit is not set in F, then SQLite is
|
||||
** permitted to add content to the in-memory database as long as the total
|
||||
** size does not exceed M bytes.
|
||||
**
|
||||
** If the SQLITE_DESERIALIZE_FREEONCLOSE bit is set in F, then SQLite will
|
||||
** invoke sqlite3_free() on the serialization buffer when the database
|
||||
** connection closes. If the SQLITE_DESERIALIZE_RESIZEABLE bit is set, then
|
||||
** SQLite will try to increase the buffer size using sqlite3_realloc64()
|
||||
** if writes on the database cause it to grow larger than M bytes.
|
||||
**
|
||||
** The sqlite3_deserialize() interface will fail with SQLITE_BUSY if the
|
||||
** database is currently in a read transaction or is involved in a backup
|
||||
** operation.
|
||||
**
|
||||
** If sqlite3_deserialize(D,S,P,N,M,F) fails for any reason and if the
|
||||
** SQLITE_DESERIALIZE_FREEONCLOSE bit is set in argument F, then
|
||||
** [sqlite3_free()] is invoked on argument P prior to returning.
|
||||
**
|
||||
** This interface is only available if SQLite is compiled with the
|
||||
** [SQLITE_ENABLE_DESERIALIZE] option.
|
||||
*/
|
||||
SQLITE_API int sqlite3_deserialize(
|
||||
sqlite3 *db, /* The database connection */
|
||||
const char *zSchema, /* Which DB to reopen with the deserialization */
|
||||
unsigned char *pData, /* The serialized database content */
|
||||
sqlite3_int64 szDb, /* Number bytes in the deserialization */
|
||||
sqlite3_int64 szBuf, /* Total size of buffer pData[] */
|
||||
unsigned mFlags /* Zero or more SQLITE_DESERIALIZE_* flags */
|
||||
);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Flags for sqlite3_deserialize()
|
||||
**
|
||||
** The following are allowed values for 6th argument (the F argument) to
|
||||
** the [sqlite3_deserialize(D,S,P,N,M,F)] interface.
|
||||
**
|
||||
** The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization
|
||||
** in the P argument is held in memory obtained from [sqlite3_malloc64()]
|
||||
** and that SQLite should take ownership of this memory and automatically
|
||||
** free it when it has finished using it. Without this flag, the caller
|
||||
** is resposible for freeing any dynamically allocated memory.
|
||||
**
|
||||
** The SQLITE_DESERIALIZE_RESIZEABLE flag means that SQLite is allowed to
|
||||
** grow the size of the database using calls to [sqlite3_realloc64()]. This
|
||||
** flag should only be used if SQLITE_DESERIALIZE_FREEONCLOSE is also used.
|
||||
** Without this flag, the deserialized database cannot increase in size beyond
|
||||
** the number of bytes specified by the M parameter.
|
||||
**
|
||||
** The SQLITE_DESERIALIZE_READONLY flag means that the deserialized database
|
||||
** should be treated as read-only.
|
||||
*/
|
||||
#define SQLITE_DESERIALIZE_FREEONCLOSE 1 /* Call sqlite3_free() on close */
|
||||
#define SQLITE_DESERIALIZE_RESIZEABLE 2 /* Resize using sqlite3_realloc64() */
|
||||
#define SQLITE_DESERIALIZE_READONLY 4 /* Database is read-only */
|
||||
|
||||
/*
|
||||
** Undo the hack that converts floating point types to integer for
|
||||
** builds on processors without floating point support.
|
||||
|
@ -8940,16 +9024,23 @@ extern "C" {
|
|||
|
||||
/*
|
||||
** CAPI3REF: Session Object Handle
|
||||
**
|
||||
** An instance of this object is a [session] that can be used to
|
||||
** record changes to a database.
|
||||
*/
|
||||
typedef struct sqlite3_session sqlite3_session;
|
||||
|
||||
/*
|
||||
** CAPI3REF: Changeset Iterator Handle
|
||||
**
|
||||
** An instance of this object acts as a cursor for iterating
|
||||
** over the elements of a [changeset] or [patchset].
|
||||
*/
|
||||
typedef struct sqlite3_changeset_iter sqlite3_changeset_iter;
|
||||
|
||||
/*
|
||||
** CAPI3REF: Create A New Session Object
|
||||
** CONSTRUCTOR: sqlite3_session
|
||||
**
|
||||
** Create a new session object attached to database handle db. If successful,
|
||||
** a pointer to the new object is written to *ppSession and SQLITE_OK is
|
||||
|
@ -8986,6 +9077,7 @@ SQLITE_API int sqlite3session_create(
|
|||
|
||||
/*
|
||||
** CAPI3REF: Delete A Session Object
|
||||
** DESTRUCTOR: sqlite3_session
|
||||
**
|
||||
** Delete a session object previously allocated using
|
||||
** [sqlite3session_create()]. Once a session object has been deleted, the
|
||||
|
@ -9001,6 +9093,7 @@ SQLITE_API void sqlite3session_delete(sqlite3_session *pSession);
|
|||
|
||||
/*
|
||||
** CAPI3REF: Enable Or Disable A Session Object
|
||||
** METHOD: sqlite3_session
|
||||
**
|
||||
** Enable or disable the recording of changes by a session object. When
|
||||
** enabled, a session object records changes made to the database. When
|
||||
|
@ -9020,6 +9113,7 @@ SQLITE_API int sqlite3session_enable(sqlite3_session *pSession, int bEnable);
|
|||
|
||||
/*
|
||||
** CAPI3REF: Set Or Clear the Indirect Change Flag
|
||||
** METHOD: sqlite3_session
|
||||
**
|
||||
** Each change recorded by a session object is marked as either direct or
|
||||
** indirect. A change is marked as indirect if either:
|
||||
|
@ -9049,6 +9143,7 @@ SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect)
|
|||
|
||||
/*
|
||||
** CAPI3REF: Attach A Table To A Session Object
|
||||
** METHOD: sqlite3_session
|
||||
**
|
||||
** If argument zTab is not NULL, then it is the name of a table to attach
|
||||
** to the session object passed as the first argument. All subsequent changes
|
||||
|
@ -9111,6 +9206,7 @@ SQLITE_API int sqlite3session_attach(
|
|||
|
||||
/*
|
||||
** CAPI3REF: Set a table filter on a Session Object.
|
||||
** METHOD: sqlite3_session
|
||||
**
|
||||
** The second argument (xFilter) is the "filter callback". For changes to rows
|
||||
** in tables that are not attached to the Session object, the filter is called
|
||||
|
@ -9129,6 +9225,7 @@ SQLITE_API void sqlite3session_table_filter(
|
|||
|
||||
/*
|
||||
** CAPI3REF: Generate A Changeset From A Session Object
|
||||
** METHOD: sqlite3_session
|
||||
**
|
||||
** Obtain a changeset containing changes to the tables attached to the
|
||||
** session object passed as the first argument. If successful,
|
||||
|
@ -9238,7 +9335,8 @@ SQLITE_API int sqlite3session_changeset(
|
|||
);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Load The Difference Between Tables Into A Session
|
||||
** CAPI3REF: Load The Difference Between Tables Into A Session
|
||||
** METHOD: sqlite3_session
|
||||
**
|
||||
** If it is not already attached to the session object passed as the first
|
||||
** argument, this function attaches table zTbl in the same manner as the
|
||||
|
@ -9303,6 +9401,7 @@ SQLITE_API int sqlite3session_diff(
|
|||
|
||||
/*
|
||||
** CAPI3REF: Generate A Patchset From A Session Object
|
||||
** METHOD: sqlite3_session
|
||||
**
|
||||
** The differences between a patchset and a changeset are that:
|
||||
**
|
||||
|
@ -9354,6 +9453,7 @@ SQLITE_API int sqlite3session_isempty(sqlite3_session *pSession);
|
|||
|
||||
/*
|
||||
** CAPI3REF: Create An Iterator To Traverse A Changeset
|
||||
** CONSTRUCTOR: sqlite3_changeset_iter
|
||||
**
|
||||
** Create an iterator used to iterate through the contents of a changeset.
|
||||
** If successful, *pp is set to point to the iterator handle and SQLITE_OK
|
||||
|
@ -9394,6 +9494,7 @@ SQLITE_API int sqlite3changeset_start(
|
|||
|
||||
/*
|
||||
** CAPI3REF: Advance A Changeset Iterator
|
||||
** METHOD: sqlite3_changeset_iter
|
||||
**
|
||||
** This function may only be used with iterators created by function
|
||||
** [sqlite3changeset_start()]. If it is called on an iterator passed to
|
||||
|
@ -9418,6 +9519,7 @@ SQLITE_API int sqlite3changeset_next(sqlite3_changeset_iter *pIter);
|
|||
|
||||
/*
|
||||
** CAPI3REF: Obtain The Current Operation From A Changeset Iterator
|
||||
** METHOD: sqlite3_changeset_iter
|
||||
**
|
||||
** The pIter argument passed to this function may either be an iterator
|
||||
** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator
|
||||
|
@ -9452,6 +9554,7 @@ SQLITE_API int sqlite3changeset_op(
|
|||
|
||||
/*
|
||||
** CAPI3REF: Obtain The Primary Key Definition Of A Table
|
||||
** METHOD: sqlite3_changeset_iter
|
||||
**
|
||||
** For each modified table, a changeset includes the following:
|
||||
**
|
||||
|
@ -9483,6 +9586,7 @@ SQLITE_API int sqlite3changeset_pk(
|
|||
|
||||
/*
|
||||
** CAPI3REF: Obtain old.* Values From A Changeset Iterator
|
||||
** METHOD: sqlite3_changeset_iter
|
||||
**
|
||||
** The pIter argument passed to this function may either be an iterator
|
||||
** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator
|
||||
|
@ -9513,6 +9617,7 @@ SQLITE_API int sqlite3changeset_old(
|
|||
|
||||
/*
|
||||
** CAPI3REF: Obtain new.* Values From A Changeset Iterator
|
||||
** METHOD: sqlite3_changeset_iter
|
||||
**
|
||||
** The pIter argument passed to this function may either be an iterator
|
||||
** passed to a conflict-handler by [sqlite3changeset_apply()], or an iterator
|
||||
|
@ -9546,6 +9651,7 @@ SQLITE_API int sqlite3changeset_new(
|
|||
|
||||
/*
|
||||
** CAPI3REF: Obtain Conflicting Row Values From A Changeset Iterator
|
||||
** METHOD: sqlite3_changeset_iter
|
||||
**
|
||||
** This function should only be used with iterator objects passed to a
|
||||
** conflict-handler callback by [sqlite3changeset_apply()] with either
|
||||
|
@ -9573,6 +9679,7 @@ SQLITE_API int sqlite3changeset_conflict(
|
|||
|
||||
/*
|
||||
** CAPI3REF: Determine The Number Of Foreign Key Constraint Violations
|
||||
** METHOD: sqlite3_changeset_iter
|
||||
**
|
||||
** This function may only be called with an iterator passed to an
|
||||
** SQLITE_CHANGESET_FOREIGN_KEY conflict handler callback. In this case
|
||||
|
@ -9589,6 +9696,7 @@ SQLITE_API int sqlite3changeset_fk_conflicts(
|
|||
|
||||
/*
|
||||
** CAPI3REF: Finalize A Changeset Iterator
|
||||
** METHOD: sqlite3_changeset_iter
|
||||
**
|
||||
** This function is used to finalize an iterator allocated with
|
||||
** [sqlite3changeset_start()].
|
||||
|
@ -9605,6 +9713,7 @@ SQLITE_API int sqlite3changeset_fk_conflicts(
|
|||
** to that error is returned by this function. Otherwise, SQLITE_OK is
|
||||
** returned. This is to allow the following pattern (pseudo-code):
|
||||
**
|
||||
** <pre>
|
||||
** sqlite3changeset_start();
|
||||
** while( SQLITE_ROW==sqlite3changeset_next() ){
|
||||
** // Do something with change.
|
||||
|
@ -9613,6 +9722,7 @@ SQLITE_API int sqlite3changeset_fk_conflicts(
|
|||
** if( rc!=SQLITE_OK ){
|
||||
** // An error has occurred
|
||||
** }
|
||||
** </pre>
|
||||
*/
|
||||
SQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *pIter);
|
||||
|
||||
|
@ -9660,6 +9770,7 @@ SQLITE_API int sqlite3changeset_invert(
|
|||
** sqlite3_changegroup object. Calling it produces similar results as the
|
||||
** following code fragment:
|
||||
**
|
||||
** <pre>
|
||||
** sqlite3_changegroup *pGrp;
|
||||
** rc = sqlite3_changegroup_new(&pGrp);
|
||||
** if( rc==SQLITE_OK ) rc = sqlite3changegroup_add(pGrp, nA, pA);
|
||||
|
@ -9670,6 +9781,7 @@ SQLITE_API int sqlite3changeset_invert(
|
|||
** *ppOut = 0;
|
||||
** *pnOut = 0;
|
||||
** }
|
||||
** </pre>
|
||||
**
|
||||
** Refer to the sqlite3_changegroup documentation below for details.
|
||||
*/
|
||||
|
@ -9685,11 +9797,15 @@ SQLITE_API int sqlite3changeset_concat(
|
|||
|
||||
/*
|
||||
** CAPI3REF: Changegroup Handle
|
||||
**
|
||||
** A changegroup is an object used to combine two or more
|
||||
** [changesets] or [patchsets]
|
||||
*/
|
||||
typedef struct sqlite3_changegroup sqlite3_changegroup;
|
||||
|
||||
/*
|
||||
** CAPI3REF: Create A New Changegroup Object
|
||||
** CONSTRUCTOR: sqlite3_changegroup
|
||||
**
|
||||
** An sqlite3_changegroup object is used to combine two or more changesets
|
||||
** (or patchsets) into a single changeset (or patchset). A single changegroup
|
||||
|
@ -9727,6 +9843,7 @@ SQLITE_API int sqlite3changegroup_new(sqlite3_changegroup **pp);
|
|||
|
||||
/*
|
||||
** CAPI3REF: Add A Changeset To A Changegroup
|
||||
** METHOD: sqlite3_changegroup
|
||||
**
|
||||
** Add all changes within the changeset (or patchset) in buffer pData (size
|
||||
** nData bytes) to the changegroup.
|
||||
|
@ -9804,6 +9921,7 @@ SQLITE_API int sqlite3changegroup_add(sqlite3_changegroup*, int nData, void *pDa
|
|||
|
||||
/*
|
||||
** CAPI3REF: Obtain A Composite Changeset From A Changegroup
|
||||
** METHOD: sqlite3_changegroup
|
||||
**
|
||||
** Obtain a buffer containing a changeset (or patchset) representing the
|
||||
** current contents of the changegroup. If the inputs to the changegroup
|
||||
|
@ -9834,25 +9952,25 @@ SQLITE_API int sqlite3changegroup_output(
|
|||
|
||||
/*
|
||||
** CAPI3REF: Delete A Changegroup Object
|
||||
** DESTRUCTOR: sqlite3_changegroup
|
||||
*/
|
||||
SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Apply A Changeset To A Database
|
||||
**
|
||||
** Apply a changeset to a database. This function attempts to update the
|
||||
** "main" database attached to handle db with the changes found in the
|
||||
** changeset passed via the second and third arguments.
|
||||
** Apply a changeset or patchset to a database. These functions attempt to
|
||||
** update the "main" database attached to handle db with the changes found in
|
||||
** the changeset passed via the second and third arguments.
|
||||
**
|
||||
** The fourth argument (xFilter) passed to this function is the "filter
|
||||
** The fourth argument (xFilter) passed to these functions is the "filter
|
||||
** callback". If it is not NULL, then for each table affected by at least one
|
||||
** change in the changeset, the filter callback is invoked with
|
||||
** the table name as the second argument, and a copy of the context pointer
|
||||
** passed as the sixth argument to this function as the first. If the "filter
|
||||
** callback" returns zero, then no attempt is made to apply any changes to
|
||||
** the table. Otherwise, if the return value is non-zero or the xFilter
|
||||
** argument to this function is NULL, all changes related to the table are
|
||||
** attempted.
|
||||
** passed as the sixth argument as the first. If the "filter callback"
|
||||
** returns zero, then no attempt is made to apply any changes to the table.
|
||||
** Otherwise, if the return value is non-zero or the xFilter argument to
|
||||
** is NULL, all changes related to the table are attempted.
|
||||
**
|
||||
** For each table that is not excluded by the filter callback, this function
|
||||
** tests that the target database contains a compatible table. A table is
|
||||
|
@ -9897,7 +10015,7 @@ SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*);
|
|||
**
|
||||
** <dl>
|
||||
** <dt>DELETE Changes<dd>
|
||||
** For each DELETE change, this function checks if the target database
|
||||
** For each DELETE change, the function checks if the target database
|
||||
** contains a row with the same primary key value (or values) as the
|
||||
** original row values stored in the changeset. If it does, and the values
|
||||
** stored in all non-primary key columns also match the values stored in
|
||||
|
@ -9942,7 +10060,7 @@ SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*);
|
|||
** [SQLITE_CHANGESET_REPLACE].
|
||||
**
|
||||
** <dt>UPDATE Changes<dd>
|
||||
** For each UPDATE change, this function checks if the target database
|
||||
** For each UPDATE change, the function checks if the target database
|
||||
** contains a row with the same primary key value (or values) as the
|
||||
** original row values stored in the changeset. If it does, and the values
|
||||
** stored in all modified non-primary key columns also match the values
|
||||
|
@ -9973,11 +10091,21 @@ SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*);
|
|||
** This can be used to further customize the applications conflict
|
||||
** resolution strategy.
|
||||
**
|
||||
** All changes made by this function are enclosed in a savepoint transaction.
|
||||
** All changes made by these functions are enclosed in a savepoint transaction.
|
||||
** If any other error (aside from a constraint failure when attempting to
|
||||
** write to the target database) occurs, then the savepoint transaction is
|
||||
** rolled back, restoring the target database to its original state, and an
|
||||
** SQLite error code returned.
|
||||
**
|
||||
** If the output parameters (ppRebase) and (pnRebase) are non-NULL and
|
||||
** the input is a changeset (not a patchset), then sqlite3changeset_apply_v2()
|
||||
** may set (*ppRebase) to point to a "rebase" that may be used with the
|
||||
** sqlite3_rebaser APIs buffer before returning. In this case (*pnRebase)
|
||||
** is set to the size of the buffer in bytes. It is the responsibility of the
|
||||
** caller to eventually free any such buffer using sqlite3_free(). The buffer
|
||||
** is only allocated and populated if one or more conflicts were encountered
|
||||
** while applying the patchset. See comments surrounding the sqlite3_rebaser
|
||||
** APIs for further details.
|
||||
*/
|
||||
SQLITE_API int sqlite3changeset_apply(
|
||||
sqlite3 *db, /* Apply change to "main" db of this handle */
|
||||
|
@ -9994,6 +10122,22 @@ SQLITE_API int sqlite3changeset_apply(
|
|||
),
|
||||
void *pCtx /* First argument passed to xConflict */
|
||||
);
|
||||
SQLITE_API int sqlite3changeset_apply_v2(
|
||||
sqlite3 *db, /* Apply change to "main" db of this handle */
|
||||
int nChangeset, /* Size of changeset in bytes */
|
||||
void *pChangeset, /* Changeset blob */
|
||||
int(*xFilter)(
|
||||
void *pCtx, /* Copy of sixth arg to _apply() */
|
||||
const char *zTab /* Table name */
|
||||
),
|
||||
int(*xConflict)(
|
||||
void *pCtx, /* Copy of sixth arg to _apply() */
|
||||
int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
|
||||
sqlite3_changeset_iter *p /* Handle describing change and conflict */
|
||||
),
|
||||
void *pCtx, /* First argument passed to xConflict */
|
||||
void **ppRebase, int *pnRebase
|
||||
);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Constants Passed To The Conflict Handler
|
||||
|
@ -10091,6 +10235,161 @@ SQLITE_API int sqlite3changeset_apply(
|
|||
#define SQLITE_CHANGESET_REPLACE 1
|
||||
#define SQLITE_CHANGESET_ABORT 2
|
||||
|
||||
/*
|
||||
** CAPI3REF: Rebasing changesets
|
||||
** EXPERIMENTAL
|
||||
**
|
||||
** Suppose there is a site hosting a database in state S0. And that
|
||||
** modifications are made that move that database to state S1 and a
|
||||
** changeset recorded (the "local" changeset). Then, a changeset based
|
||||
** on S0 is received from another site (the "remote" changeset) and
|
||||
** applied to the database. The database is then in state
|
||||
** (S1+"remote"), where the exact state depends on any conflict
|
||||
** resolution decisions (OMIT or REPLACE) made while applying "remote".
|
||||
** Rebasing a changeset is to update it to take those conflict
|
||||
** resolution decisions into account, so that the same conflicts
|
||||
** do not have to be resolved elsewhere in the network.
|
||||
**
|
||||
** For example, if both the local and remote changesets contain an
|
||||
** INSERT of the same key on "CREATE TABLE t1(a PRIMARY KEY, b)":
|
||||
**
|
||||
** local: INSERT INTO t1 VALUES(1, 'v1');
|
||||
** remote: INSERT INTO t1 VALUES(1, 'v2');
|
||||
**
|
||||
** and the conflict resolution is REPLACE, then the INSERT change is
|
||||
** removed from the local changeset (it was overridden). Or, if the
|
||||
** conflict resolution was "OMIT", then the local changeset is modified
|
||||
** to instead contain:
|
||||
**
|
||||
** UPDATE t1 SET b = 'v2' WHERE a=1;
|
||||
**
|
||||
** Changes within the local changeset are rebased as follows:
|
||||
**
|
||||
** <dl>
|
||||
** <dt>Local INSERT<dd>
|
||||
** This may only conflict with a remote INSERT. If the conflict
|
||||
** resolution was OMIT, then add an UPDATE change to the rebased
|
||||
** changeset. Or, if the conflict resolution was REPLACE, add
|
||||
** nothing to the rebased changeset.
|
||||
**
|
||||
** <dt>Local DELETE<dd>
|
||||
** This may conflict with a remote UPDATE or DELETE. In both cases the
|
||||
** only possible resolution is OMIT. If the remote operation was a
|
||||
** DELETE, then add no change to the rebased changeset. If the remote
|
||||
** operation was an UPDATE, then the old.* fields of change are updated
|
||||
** to reflect the new.* values in the UPDATE.
|
||||
**
|
||||
** <dt>Local UPDATE<dd>
|
||||
** This may conflict with a remote UPDATE or DELETE. If it conflicts
|
||||
** with a DELETE, and the conflict resolution was OMIT, then the update
|
||||
** is changed into an INSERT. Any undefined values in the new.* record
|
||||
** from the update change are filled in using the old.* values from
|
||||
** the conflicting DELETE. Or, if the conflict resolution was REPLACE,
|
||||
** the UPDATE change is simply omitted from the rebased changeset.
|
||||
**
|
||||
** If conflict is with a remote UPDATE and the resolution is OMIT, then
|
||||
** the old.* values are rebased using the new.* values in the remote
|
||||
** change. Or, if the resolution is REPLACE, then the change is copied
|
||||
** into the rebased changeset with updates to columns also updated by
|
||||
** the conflicting remote UPDATE removed. If this means no columns would
|
||||
** be updated, the change is omitted.
|
||||
** </dl>
|
||||
**
|
||||
** A local change may be rebased against multiple remote changes
|
||||
** simultaneously. If a single key is modified by multiple remote
|
||||
** changesets, they are combined as follows before the local changeset
|
||||
** is rebased:
|
||||
**
|
||||
** <ul>
|
||||
** <li> If there has been one or more REPLACE resolutions on a
|
||||
** key, it is rebased according to a REPLACE.
|
||||
**
|
||||
** <li> If there have been no REPLACE resolutions on a key, then
|
||||
** the local changeset is rebased according to the most recent
|
||||
** of the OMIT resolutions.
|
||||
** </ul>
|
||||
**
|
||||
** Note that conflict resolutions from multiple remote changesets are
|
||||
** combined on a per-field basis, not per-row. This means that in the
|
||||
** case of multiple remote UPDATE operations, some fields of a single
|
||||
** local change may be rebased for REPLACE while others are rebased for
|
||||
** OMIT.
|
||||
**
|
||||
** In order to rebase a local changeset, the remote changeset must first
|
||||
** be applied to the local database using sqlite3changeset_apply_v2() and
|
||||
** the buffer of rebase information captured. Then:
|
||||
**
|
||||
** <ol>
|
||||
** <li> An sqlite3_rebaser object is created by calling
|
||||
** sqlite3rebaser_create().
|
||||
** <li> The new object is configured with the rebase buffer obtained from
|
||||
** sqlite3changeset_apply_v2() by calling sqlite3rebaser_configure().
|
||||
** If the local changeset is to be rebased against multiple remote
|
||||
** changesets, then sqlite3rebaser_configure() should be called
|
||||
** multiple times, in the same order that the multiple
|
||||
** sqlite3changeset_apply_v2() calls were made.
|
||||
** <li> Each local changeset is rebased by calling sqlite3rebaser_rebase().
|
||||
** <li> The sqlite3_rebaser object is deleted by calling
|
||||
** sqlite3rebaser_delete().
|
||||
** </ol>
|
||||
*/
|
||||
typedef struct sqlite3_rebaser sqlite3_rebaser;
|
||||
|
||||
/*
|
||||
** CAPI3REF: Create a changeset rebaser object.
|
||||
** EXPERIMENTAL
|
||||
**
|
||||
** Allocate a new changeset rebaser object. If successful, set (*ppNew) to
|
||||
** point to the new object and return SQLITE_OK. Otherwise, if an error
|
||||
** occurs, return an SQLite error code (e.g. SQLITE_NOMEM) and set (*ppNew)
|
||||
** to NULL.
|
||||
*/
|
||||
SQLITE_API int sqlite3rebaser_create(sqlite3_rebaser **ppNew);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Configure a changeset rebaser object.
|
||||
** EXPERIMENTAL
|
||||
**
|
||||
** Configure the changeset rebaser object to rebase changesets according
|
||||
** to the conflict resolutions described by buffer pRebase (size nRebase
|
||||
** bytes), which must have been obtained from a previous call to
|
||||
** sqlite3changeset_apply_v2().
|
||||
*/
|
||||
SQLITE_API int sqlite3rebaser_configure(
|
||||
sqlite3_rebaser*,
|
||||
int nRebase, const void *pRebase
|
||||
);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Rebase a changeset
|
||||
** EXPERIMENTAL
|
||||
**
|
||||
** Argument pIn must point to a buffer containing a changeset nIn bytes
|
||||
** in size. This function allocates and populates a buffer with a copy
|
||||
** of the changeset rebased rebased according to the configuration of the
|
||||
** rebaser object passed as the first argument. If successful, (*ppOut)
|
||||
** is set to point to the new buffer containing the rebased changset and
|
||||
** (*pnOut) to its size in bytes and SQLITE_OK returned. It is the
|
||||
** responsibility of the caller to eventually free the new buffer using
|
||||
** sqlite3_free(). Otherwise, if an error occurs, (*ppOut) and (*pnOut)
|
||||
** are set to zero and an SQLite error code returned.
|
||||
*/
|
||||
SQLITE_API int sqlite3rebaser_rebase(
|
||||
sqlite3_rebaser*,
|
||||
int nIn, const void *pIn,
|
||||
int *pnOut, void **ppOut
|
||||
);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Delete a changeset rebaser object.
|
||||
** EXPERIMENTAL
|
||||
**
|
||||
** Delete the changeset rebaser object and all associated resources. There
|
||||
** should be one call to this function for each successful invocation
|
||||
** of sqlite3rebaser_create().
|
||||
*/
|
||||
SQLITE_API void sqlite3rebaser_delete(sqlite3_rebaser *p);
|
||||
|
||||
/*
|
||||
** CAPI3REF: Streaming Versions of API functions.
|
||||
**
|
||||
|
@ -10195,6 +10494,22 @@ SQLITE_API int sqlite3changeset_apply_strm(
|
|||
),
|
||||
void *pCtx /* First argument passed to xConflict */
|
||||
);
|
||||
SQLITE_API int sqlite3changeset_apply_v2_strm(
|
||||
sqlite3 *db, /* Apply change to "main" db of this handle */
|
||||
int (*xInput)(void *pIn, void *pData, int *pnData), /* Input function */
|
||||
void *pIn, /* First arg for xInput */
|
||||
int(*xFilter)(
|
||||
void *pCtx, /* Copy of sixth arg to _apply() */
|
||||
const char *zTab /* Table name */
|
||||
),
|
||||
int(*xConflict)(
|
||||
void *pCtx, /* Copy of sixth arg to _apply() */
|
||||
int eConflict, /* DATA, MISSING, CONFLICT, CONSTRAINT */
|
||||
sqlite3_changeset_iter *p /* Handle describing change and conflict */
|
||||
),
|
||||
void *pCtx, /* First argument passed to xConflict */
|
||||
void **ppRebase, int *pnRebase
|
||||
);
|
||||
SQLITE_API int sqlite3changeset_concat_strm(
|
||||
int (*xInputA)(void *pIn, void *pData, int *pnData),
|
||||
void *pInA,
|
||||
|
@ -10232,6 +10547,13 @@ SQLITE_API int sqlite3changegroup_output_strm(sqlite3_changegroup*,
|
|||
int (*xOutput)(void *pOut, const void *pData, int nData),
|
||||
void *pOut
|
||||
);
|
||||
SQLITE_API int sqlite3rebaser_rebase_strm(
|
||||
sqlite3_rebaser *pRebaser,
|
||||
int (*xInput)(void *pIn, void *pData, int *pnData),
|
||||
void *pIn,
|
||||
int (*xOutput)(void *pOut, const void *pData, int nData),
|
||||
void *pOut
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -210,10 +210,6 @@
|
|||
margin-inline-end: 6px;
|
||||
}
|
||||
|
||||
.network-monitor .headers-summary .requests-list-status-icon {
|
||||
min-width: 10px;
|
||||
}
|
||||
|
||||
.network-monitor .headers-summary .raw-headers-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
|
|
@ -27,11 +27,11 @@ const {
|
|||
|
||||
// Components
|
||||
const PropertiesView = createFactory(require("./PropertiesView"));
|
||||
const StatusCode = createFactory(require("./StatusCode"));
|
||||
|
||||
loader.lazyGetter(this, "MDNLink", function() {
|
||||
return createFactory(require("./MdnLink"));
|
||||
});
|
||||
|
||||
loader.lazyGetter(this, "Rep", function() {
|
||||
return require("devtools/client/shared/components/reps/reps").REPS.Rep;
|
||||
});
|
||||
|
@ -180,6 +180,7 @@ class HeadersPanel extends Component {
|
|||
urlDetails,
|
||||
},
|
||||
} = this.props;
|
||||
let item = { fromCache, fromServiceWorker, status, statusText };
|
||||
|
||||
if ((!requestHeaders || !requestHeaders.headers.length) &&
|
||||
(!uploadHeaders || !uploadHeaders.headers.length) &&
|
||||
|
@ -209,38 +210,17 @@ class HeadersPanel extends Component {
|
|||
let summaryStatus;
|
||||
|
||||
if (status) {
|
||||
let code;
|
||||
if (fromCache) {
|
||||
code = "cached";
|
||||
} else if (fromServiceWorker) {
|
||||
code = "service worker";
|
||||
} else {
|
||||
code = status;
|
||||
}
|
||||
|
||||
let statusCodeDocURL = getHTTPStatusCodeURL(status.toString());
|
||||
let inputWidth = status.toString().length + statusText.length + 1;
|
||||
let toggleRawHeadersClassList = ["devtools-button", "raw-headers-button"];
|
||||
if (this.state.rawHeadersOpened) {
|
||||
toggleRawHeadersClassList.push("checked");
|
||||
}
|
||||
|
||||
summaryStatus = (
|
||||
div({ className: "tabpanel-summary-container headers-summary" },
|
||||
div({
|
||||
className: "tabpanel-summary-label headers-summary-label",
|
||||
}, SUMMARY_STATUS),
|
||||
div({
|
||||
className: "requests-list-status-icon",
|
||||
"data-code": code,
|
||||
}),
|
||||
input({
|
||||
className: "tabpanel-summary-value textbox-input devtools-monospace"
|
||||
+ " status-text",
|
||||
readOnly: true,
|
||||
value: `${status} ${statusText}`,
|
||||
size: `${inputWidth}`,
|
||||
}),
|
||||
StatusCode({ item }),
|
||||
statusCodeDocURL ? MDNLink({
|
||||
url: statusCodeDocURL,
|
||||
}) : span({
|
||||
|
|
|
@ -4,21 +4,16 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const { Component } = require("devtools/client/shared/vendor/react");
|
||||
const { Component, createFactory } = require("devtools/client/shared/vendor/react");
|
||||
const dom = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { L10N } = require("../utils/l10n");
|
||||
const { propertiesEqual } = require("../utils/request-utils");
|
||||
|
||||
// Components
|
||||
|
||||
const StatusCode = createFactory(require("./StatusCode"));
|
||||
|
||||
const { div } = dom;
|
||||
|
||||
const UPDATED_STATUS_PROPS = [
|
||||
"fromCache",
|
||||
"fromServiceWorker",
|
||||
"status",
|
||||
"statusText",
|
||||
];
|
||||
|
||||
class RequestListColumnStatus extends Component {
|
||||
static get propTypes() {
|
||||
return {
|
||||
|
@ -26,68 +21,16 @@ class RequestListColumnStatus extends Component {
|
|||
};
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps) {
|
||||
return !propertiesEqual(UPDATED_STATUS_PROPS, this.props.item, nextProps.item);
|
||||
}
|
||||
|
||||
render() {
|
||||
let { item } = this.props;
|
||||
let { fromCache, fromServiceWorker, status, statusText } = item;
|
||||
let code;
|
||||
|
||||
if (status) {
|
||||
if (fromCache) {
|
||||
code = "cached";
|
||||
} else if (fromServiceWorker) {
|
||||
code = "service worker";
|
||||
} else {
|
||||
code = status;
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
div({
|
||||
className: "requests-list-column requests-list-status",
|
||||
onMouseOver: function({ target }) {
|
||||
if (status && statusText && !target.title) {
|
||||
target.title = getColumnTitle(item);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
/*
|
||||
`data-code` refers to the status-code
|
||||
`data-status-code` can be one of "cached", "service worker"
|
||||
or the status-code itself
|
||||
For example - if a resource is cached, `data-code` would be 200
|
||||
and the `data-status-code` would be "cached"
|
||||
*/
|
||||
div({
|
||||
className: "requests-list-status-code status-code",
|
||||
"data-status-code": code,
|
||||
"data-code": status,
|
||||
}, status)
|
||||
StatusCode({ item }),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
function getColumnTitle(item) {
|
||||
let { fromCache, fromServiceWorker, status, statusText } = item;
|
||||
let title;
|
||||
if (fromCache && fromServiceWorker) {
|
||||
title = L10N.getFormatStr("netmonitor.status.tooltip.cachedworker",
|
||||
status, statusText);
|
||||
} else if (fromCache) {
|
||||
title = L10N.getFormatStr("netmonitor.status.tooltip.cached",
|
||||
status, statusText);
|
||||
} else if (fromServiceWorker) {
|
||||
title = L10N.getFormatStr("netmonitor.status.tooltip.worker",
|
||||
status, statusText);
|
||||
} else {
|
||||
title = L10N.getFormatStr("netmonitor.status.tooltip.simple",
|
||||
status, statusText);
|
||||
}
|
||||
return title;
|
||||
}
|
||||
|
||||
module.exports = RequestListColumnStatus;
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
/* 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/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const { Component } = require("devtools/client/shared/vendor/react");
|
||||
const dom = require("devtools/client/shared/vendor/react-dom-factories");
|
||||
const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
|
||||
const { L10N } = require("../utils/l10n");
|
||||
const { propertiesEqual } = require("../utils/request-utils");
|
||||
|
||||
const { div } = dom;
|
||||
|
||||
const UPDATED_STATUS_PROPS = [
|
||||
"fromCache",
|
||||
"fromServiceWorker",
|
||||
"status",
|
||||
"statusText",
|
||||
];
|
||||
|
||||
/**
|
||||
* Status code component
|
||||
* Displays HTTP status code icon
|
||||
* Used in RequestListColumnStatus and HeadersPanel
|
||||
*/
|
||||
class StatusCode extends Component {
|
||||
static get propTypes() {
|
||||
return {
|
||||
item: PropTypes.object.isRequired,
|
||||
};
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps) {
|
||||
return !propertiesEqual(UPDATED_STATUS_PROPS, this.props.item, nextProps.item);
|
||||
}
|
||||
|
||||
render() {
|
||||
let { item } = this.props;
|
||||
let { fromCache, fromServiceWorker, status, statusText } = item;
|
||||
let code;
|
||||
|
||||
if (status) {
|
||||
if (fromCache) {
|
||||
code = "cached";
|
||||
} else if (fromServiceWorker) {
|
||||
code = "service worker";
|
||||
} else {
|
||||
code = status;
|
||||
}
|
||||
}
|
||||
|
||||
// `data-code` refers to the status-code
|
||||
// `data-status-code` can be one of "cached", "service worker"
|
||||
// or the status-code itself
|
||||
// For example - if a resource is cached, `data-code` would be 200
|
||||
// and the `data-status-code` would be "cached"
|
||||
return (
|
||||
div({
|
||||
className: "requests-list-status-code status-code",
|
||||
onMouseOver: function({ target }) {
|
||||
if (status && statusText && !target.title) {
|
||||
target.title = getStatusTooltip(item);
|
||||
}
|
||||
},
|
||||
"data-status-code": code,
|
||||
"data-code": status,
|
||||
}, status)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function getStatusTooltip(item) {
|
||||
let { fromCache, fromServiceWorker, status, statusText } = item;
|
||||
let title;
|
||||
if (fromCache && fromServiceWorker) {
|
||||
title = L10N.getFormatStr("netmonitor.status.tooltip.cachedworker",
|
||||
status, statusText);
|
||||
} else if (fromCache) {
|
||||
title = L10N.getFormatStr("netmonitor.status.tooltip.cached",
|
||||
status, statusText);
|
||||
} else if (fromServiceWorker) {
|
||||
title = L10N.getFormatStr("netmonitor.status.tooltip.worker",
|
||||
status, statusText);
|
||||
} else {
|
||||
title = L10N.getFormatStr("netmonitor.status.tooltip.simple",
|
||||
status, statusText);
|
||||
}
|
||||
return title;
|
||||
}
|
||||
|
||||
module.exports = StatusCode;
|
|
@ -41,6 +41,7 @@ DevToolsModules(
|
|||
'StackTracePanel.js',
|
||||
'StatisticsPanel.js',
|
||||
'StatusBar.js',
|
||||
'StatusCode.js',
|
||||
'TabboxPanel.js',
|
||||
'TimingsPanel.js',
|
||||
'Toolbar.js',
|
||||
|
|
|
@ -29,7 +29,7 @@ add_task(async function() {
|
|||
await performRequests(monitor, tab, BROTLI_REQUESTS);
|
||||
|
||||
let requestItem = document.querySelector(".request-list-item");
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ add_task(async function() {
|
|||
for (let request of REQUEST_DATA) {
|
||||
let requestItem = document.querySelectorAll(".request-list-item")[index];
|
||||
requestItem.scrollIntoView();
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ add_task(async function() {
|
|||
await performRequests(monitor, tab, CONTENT_TYPE_WITHOUT_CACHE_REQUESTS);
|
||||
|
||||
for (let requestItem of document.querySelectorAll(".request-list-item")) {
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
requestItem.scrollIntoView();
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
|
|
|
@ -24,7 +24,7 @@ add_task(async function() {
|
|||
await performRequests(monitor, tab, 1);
|
||||
|
||||
let requestItem = document.querySelectorAll(".request-list-item")[0];
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
requestItem.scrollIntoView();
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
|
|
|
@ -23,7 +23,7 @@ add_task(async function() {
|
|||
await wait;
|
||||
|
||||
let requestItem = document.querySelectorAll(".request-list-item")[0];
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
requestItem.scrollIntoView();
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
|
|
|
@ -307,7 +307,7 @@ add_task(async function() {
|
|||
let requestItems = document.querySelectorAll(".request-list-item");
|
||||
for (let requestItem of requestItems) {
|
||||
requestItem.scrollIntoView();
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
}
|
||||
|
|
|
@ -209,7 +209,7 @@ add_task(async function() {
|
|||
let requestItems = document.querySelectorAll(".request-list-item");
|
||||
for (let requestItem of requestItems) {
|
||||
requestItem.scrollIntoView();
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
}
|
||||
|
|
|
@ -392,7 +392,7 @@ add_task(async function() {
|
|||
let requestItems = document.querySelectorAll(".request-list-item");
|
||||
for (let requestItem of requestItems) {
|
||||
requestItem.scrollIntoView();
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ add_task(async function() {
|
|||
await performRequests(monitor, tab, 1);
|
||||
|
||||
let requestItem = document.querySelector(".request-list-item");
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ add_task(async function() {
|
|||
await performRequests(monitor, tab, 1);
|
||||
|
||||
let requestItem = document.querySelector(".request-list-item");
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ add_task(async function() {
|
|||
await performRequests(monitor, tab, 1);
|
||||
|
||||
let requestItem = document.querySelector(".request-list-item");
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ add_task(async function() {
|
|||
await performRequests(monitor, tab, 1);
|
||||
|
||||
let requestItem = document.querySelector(".request-list-item");
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ add_task(async function() {
|
|||
let requestItems = document.querySelectorAll(".request-list-item");
|
||||
for (let requestItem of requestItems) {
|
||||
requestItem.scrollIntoView();
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ add_task(async function() {
|
|||
|
||||
let requestItem = document.querySelector(".request-list-item");
|
||||
requestItem.scrollIntoView();
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ add_task(async function() {
|
|||
let requestItems = document.querySelectorAll(".request-list-item");
|
||||
for (let requestItem of requestItems) {
|
||||
requestItem.scrollIntoView();
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ add_task(async function() {
|
|||
let requestItems = document.querySelectorAll(".request-list-item");
|
||||
for (let requestItem of requestItems) {
|
||||
requestItem.scrollIntoView();
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ add_task(async function() {
|
|||
let requestItems = document.querySelectorAll(".request-list-item");
|
||||
for (let requestItem of requestItems) {
|
||||
requestItem.scrollIntoView();
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
}
|
||||
|
|
|
@ -224,7 +224,7 @@ function test() {
|
|||
|
||||
let requestListItem = document.querySelector(".request-list-item");
|
||||
requestListItem.scrollIntoView();
|
||||
let requestsListStatus = requestListItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestListItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ add_task(async function() {
|
|||
let requestItems = document.querySelectorAll(".request-list-item");
|
||||
for (let requestItem of requestItems) {
|
||||
requestItem.scrollIntoView();
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
}
|
||||
|
|
|
@ -243,7 +243,7 @@ add_task(async function() {
|
|||
let requestItems = document.querySelectorAll(".request-list-item");
|
||||
for (let requestItem of requestItems) {
|
||||
requestItem.scrollIntoView();
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ add_task(async function() {
|
|||
let requestListItems = document.querySelectorAll(".request-list-item");
|
||||
for (let requestItem of requestListItems) {
|
||||
requestItem.scrollIntoView();
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
}
|
||||
|
@ -175,13 +175,16 @@ add_task(async function() {
|
|||
let panel = document.querySelector("#headers-panel");
|
||||
let summaryValues = panel.querySelectorAll(".tabpanel-summary-value.textbox-input");
|
||||
let { method, correctUri, details: { status, statusText } } = data;
|
||||
let statusCode = panel.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, statusCode);
|
||||
await waitUntil(() => statusCode.title);
|
||||
|
||||
is(summaryValues[0].value, correctUri,
|
||||
"The url summary value is incorrect.");
|
||||
is(summaryValues[1].value, method, "The method summary value is incorrect.");
|
||||
is(panel.querySelector(".requests-list-status-icon").dataset.code, status,
|
||||
is(statusCode.dataset.code, status,
|
||||
"The status summary code is incorrect.");
|
||||
is(summaryValues[3].value, status + " " + statusText,
|
||||
is(statusCode.getAttribute("title"), status + " " + statusText,
|
||||
"The status summary value is incorrect.");
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ add_task(async function() {
|
|||
let requestItems = document.querySelectorAll(".request-list-item");
|
||||
for (let requestItem of requestItems) {
|
||||
requestItem.scrollIntoView();
|
||||
let requestsListStatus = requestItem.querySelector(".requests-list-status");
|
||||
let requestsListStatus = requestItem.querySelector(".status-code");
|
||||
EventUtils.sendMouseEvent({ type: "mouseover" }, requestsListStatus);
|
||||
await waitUntil(() => requestsListStatus.title);
|
||||
}
|
||||
|
|
|
@ -493,7 +493,8 @@ function verifyRequestItemTarget(document, requestList, requestItem, method,
|
|||
let value = target.querySelector(".requests-list-status-code")
|
||||
.getAttribute("data-status-code");
|
||||
let codeValue = target.querySelector(".requests-list-status-code").textContent;
|
||||
let tooltip = target.querySelector(".requests-list-status").getAttribute("title");
|
||||
let tooltip = target.querySelector(".requests-list-status-code")
|
||||
.getAttribute("title");
|
||||
info("Displayed status: " + value);
|
||||
info("Displayed code: " + codeValue);
|
||||
info("Tooltip status: " + tooltip);
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -10103,12 +10103,12 @@ nsContentUtils::LookupCustomElementDefinition(nsIDocument* aDoc,
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowInner> window(aDoc->GetInnerWindow());
|
||||
nsPIDOMWindowInner* window = aDoc->GetInnerWindow();
|
||||
if (!window) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<CustomElementRegistry> registry(window->CustomElements());
|
||||
CustomElementRegistry* registry = window->CustomElements();
|
||||
if (!registry) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ load 1291702.html
|
|||
load 1378826.html
|
||||
load 1384248.html
|
||||
load 1389304.html
|
||||
skip-if(webrender&&winWidget) load 1393272.webm # bug 1426199 for webrender
|
||||
load 1393272.webm
|
||||
load 1411322.html
|
||||
load disconnect-wrong-destination.html
|
||||
load analyser-channels-1.html
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include "base/process_util.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/ipc/CrashReporterClient.h"
|
||||
|
|
|
@ -789,7 +789,6 @@ public:
|
|||
ServiceWorkerRegistrarSaveDataRunnable()
|
||||
: Runnable("dom::ServiceWorkerRegistrarSaveDataRunnable")
|
||||
, mEventTarget(GetCurrentThreadEventTarget())
|
||||
, mRetryCounter(0)
|
||||
{
|
||||
AssertIsOnBackgroundThread();
|
||||
}
|
||||
|
@ -800,33 +799,21 @@ public:
|
|||
RefPtr<ServiceWorkerRegistrar> service = ServiceWorkerRegistrar::Get();
|
||||
MOZ_ASSERT(service);
|
||||
|
||||
// If the save fails, try again once in case it was a temporary
|
||||
// problem due to virus scanning, etc.
|
||||
static const uint32_t kMaxSaveRetryCount = 1;
|
||||
|
||||
nsresult rv = service->SaveData();
|
||||
if (NS_FAILED(rv) && mRetryCounter < kMaxSaveRetryCount) {
|
||||
rv = GetCurrentThreadEventTarget()->Dispatch(this, NS_DISPATCH_NORMAL);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mRetryCounter += 1;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
// If the save fails do nothing for now.
|
||||
// Consider adding a retry mechanism again in bug 1452373.
|
||||
Unused << service->SaveData();
|
||||
|
||||
RefPtr<Runnable> runnable =
|
||||
NewRunnableMethod("ServiceWorkerRegistrar::DataSaved",
|
||||
service, &ServiceWorkerRegistrar::DataSaved);
|
||||
rv = mEventTarget->Dispatch(runnable, NS_DISPATCH_NORMAL);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
nsresult rv = mEventTarget->Dispatch(runnable, NS_DISPATCH_NORMAL);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsIEventTarget> mEventTarget;
|
||||
uint32_t mRetryCounter;
|
||||
};
|
||||
|
||||
void
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "EditorEventListener.h"
|
||||
|
||||
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc.
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/ContentEvents.h" // for InternalFocusEvent
|
||||
#include "mozilla/EditorBase.h" // for EditorBase, etc.
|
||||
#include "mozilla/EventListenerManager.h" // for EventListenerManager
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "WebRenderCommandBuilder.h"
|
||||
|
||||
#include "BasicLayers.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/gfx/Types.h"
|
||||
#include "mozilla/gfx/DrawEventRecorder.h"
|
||||
|
|
|
@ -4166,19 +4166,6 @@ gfxFontStyle::gfxFontStyle(uint8_t aStyle, uint16_t aWeight, int16_t aStretch,
|
|||
}
|
||||
}
|
||||
|
||||
int8_t
|
||||
gfxFontStyle::ComputeWeight() const
|
||||
{
|
||||
int8_t baseWeight = (weight + 50) / 100;
|
||||
|
||||
if (baseWeight < 0)
|
||||
baseWeight = 0;
|
||||
if (baseWeight > 9)
|
||||
baseWeight = 9;
|
||||
|
||||
return baseWeight;
|
||||
}
|
||||
|
||||
void
|
||||
gfxFontStyle::AdjustForSubSuperscript(int32_t aAppUnitsPerDevPixel)
|
||||
{
|
||||
|
|
|
@ -189,8 +189,6 @@ struct gfxFontStyle {
|
|||
nsRefPtrHashKey<nsAtom>::HashKey(language);
|
||||
}
|
||||
|
||||
int8_t ComputeWeight() const;
|
||||
|
||||
// Adjust this style to simulate sub/superscript (as requested in the
|
||||
// variantSubSuper field) using size and baselineOffset instead.
|
||||
void AdjustForSubSuperscript(int32_t aAppUnitsPerDevPixel);
|
||||
|
|
|
@ -1307,8 +1307,7 @@ gfxFontFamily::FindAllFontsForStyle(const gfxFontStyle& aFontStyle,
|
|||
|
||||
aNeedsSyntheticBold = false;
|
||||
|
||||
int8_t baseWeight = aFontStyle.ComputeWeight();
|
||||
bool wantBold = baseWeight >= 6;
|
||||
bool wantBold = aFontStyle.weight >= 600;
|
||||
gfxFontEntry *fe = nullptr;
|
||||
|
||||
// If the family has only one face, we simply return it; no further
|
||||
|
@ -1502,7 +1501,7 @@ CalcStyleMatch(gfxFontEntry *aFontEntry, const gfxFontStyle *aStyle)
|
|||
}
|
||||
|
||||
// measure of closeness of weight to the desired value
|
||||
rank += 9 - DeprecatedAbs(aFontEntry->Weight() / 100 - aStyle->ComputeWeight());
|
||||
rank += 9 - Abs((aFontEntry->Weight() - aStyle->weight) / 100);
|
||||
} else {
|
||||
// if no font to match, prefer non-bold, non-italic fonts
|
||||
if (aFontEntry->IsUpright()) {
|
||||
|
|
|
@ -3444,7 +3444,7 @@ gfxFontGroup::WhichSystemFontSupportsChar(uint32_t aCh, uint32_t aNextCh,
|
|||
gfxPlatformFontList::PlatformFontList()->
|
||||
SystemFindFontForChar(aCh, aNextCh, aRunScript, &mStyle);
|
||||
if (fe) {
|
||||
bool wantBold = mStyle.ComputeWeight() >= 6;
|
||||
bool wantBold = mStyle.weight >= 600;
|
||||
return fe->FindOrMakeFont(&mStyle, wantBold && !fe->IsBold());
|
||||
}
|
||||
|
||||
|
|
|
@ -1241,6 +1241,23 @@ GetSavedFrameCount(JSContext* cx, unsigned argc, Value* vp)
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
ClearSavedFrames(JSContext* cx, unsigned argc, Value* vp)
|
||||
{
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
|
||||
js::SavedStacks& savedStacks = cx->compartment()->savedStacks();
|
||||
if (savedStacks.initialized())
|
||||
savedStacks.clear();
|
||||
|
||||
for (ActivationIterator iter(cx); !iter.done(); ++iter) {
|
||||
iter->clearLiveSavedFrameCache();
|
||||
}
|
||||
|
||||
args.rval().setUndefined();
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
SaveStack(JSContext* cx, unsigned argc, Value* vp)
|
||||
{
|
||||
|
@ -5170,6 +5187,12 @@ static const JSFunctionSpecWithHelp TestingFunctions[] = {
|
|||
" Return the number of SavedFrame instances stored in this compartment's\n"
|
||||
" SavedStacks cache."),
|
||||
|
||||
JS_FN_HELP("clearSavedFrames", ClearSavedFrames, 0, 0,
|
||||
"clearSavedFrames()",
|
||||
" Empty the current compartment's cache of SavedFrame objects, so that\n"
|
||||
" subsequent stack captures allocate fresh objects to represent frames.\n"
|
||||
" Clear the current stack's LiveSavedFrameCaches."),
|
||||
|
||||
JS_FN_HELP("saveStack", SaveStack, 0, 0,
|
||||
"saveStack([maxDepth [, compartment]])",
|
||||
" Capture a stack. If 'maxDepth' is given, capture at most 'maxDepth' number\n"
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
// |jit-test| --no-baseline
|
||||
//
|
||||
// For background, see the comments for LiveSavedFrameCache in js/src/vm/Stack.h.
|
||||
//
|
||||
// The cache would like to assert that, assuming the cache hasn't been
|
||||
// completely flushed due to a compartment mismatch, if a stack frame's
|
||||
// hasCachedSavedFrame bit is set, then that frame does indeed have an entry in
|
||||
// the cache.
|
||||
//
|
||||
// When LiveSavedFrameCache::find finds an entry whose frame address matches,
|
||||
// but whose pc does not match, it removes that entry from the cache. Usually, a
|
||||
// fresh entry for that frame will be pushed into the cache in short order as we
|
||||
// rebuild the SavedFrame chain, but if the creation of the SavedFrame fails due
|
||||
// to OOM, then we are left with no cache entry for that frame.
|
||||
//
|
||||
// The fix for 1445973 is simply to clear the frame's bit when we remove the
|
||||
// cache entry for a pc mismatch. Previously the code neglected to do this, but
|
||||
// usually got away with it because the cache would be re-populated. OOM fuzzing
|
||||
// interrupted the code at the proper place and revealed the crash, but did so
|
||||
// with a test that took 90s to run. This test runs in a fraction of a second.
|
||||
|
||||
if (!('oomTest' in this))
|
||||
quit();
|
||||
|
||||
function f() {
|
||||
// Ensure that we will try to allocate fresh SavedFrame objects.
|
||||
clearSavedFrames();
|
||||
|
||||
// Ensure that all frames have their hasCachedSavedFrame bits set.
|
||||
saveStack();
|
||||
|
||||
try {
|
||||
// Capture the stack again. The entry for this frame will be removed due to
|
||||
// a pc mismatch. The OOM must occur here, causing the cache not to be
|
||||
// repopulated.
|
||||
saveStack();
|
||||
} catch (e) { }
|
||||
|
||||
// Capture the stack a third time. This will see that f's frame has its bit
|
||||
// set, even though it has no entry in the cache.
|
||||
saveStack();
|
||||
}
|
||||
|
||||
// This ensures that there is a frame below f's in the same Activation, so that
|
||||
// the assertion doesn't get skipped because the LiveSavedFrameCache is entirely
|
||||
// empty, to handle caches flushed by compartment mismatches.
|
||||
function g() { f(); }
|
||||
|
||||
// Call all the code once, to ensure that everything has been delazified. When
|
||||
// different calls to g perform different amounts of allocation, oomTest's
|
||||
// simple strategy for choosing which allocation should fail can neglect to hit
|
||||
// the SavedFrame creation. This is also why we disable the baseline compiler in
|
||||
// the test metaline.
|
||||
g();
|
||||
|
||||
oomTest(g);
|
|
@ -374,6 +374,9 @@ class CommonFrameLayout
|
|||
void setHasCachedSavedFrame() {
|
||||
descriptor_ |= HASCACHEDSAVEDFRAME_BIT;
|
||||
}
|
||||
void clearHasCachedSavedFrame() {
|
||||
descriptor_ &= ~HASCACHEDSAVEDFRAME_BIT;
|
||||
}
|
||||
uint8_t* returnAddress() const {
|
||||
return returnAddress_;
|
||||
}
|
||||
|
|
|
@ -190,6 +190,10 @@ class RematerializedFrame
|
|||
hasCachedSavedFrame_ = true;
|
||||
}
|
||||
|
||||
void clearHasCachedSavedFrame() {
|
||||
hasCachedSavedFrame_ = false;
|
||||
}
|
||||
|
||||
unsigned numFormalArgs() const {
|
||||
return isFunctionFrame() ? callee()->nargs() : 0;
|
||||
}
|
||||
|
|
|
@ -149,6 +149,11 @@ LiveSavedFrameCache::find(JSContext* cx, FramePtr& framePtr, const jsbytecode* p
|
|||
// this frame for that to happen, but this frame's bit is set.
|
||||
if (pc != frames->back().pc) {
|
||||
frames->popBack();
|
||||
|
||||
// Since we've removed this entry from the cache, clear the bit on its
|
||||
// frame. Usually we'll repopulate the cache anyway, but if there's an
|
||||
// OOM that might not happen.
|
||||
framePtr.clearHasCachedSavedFrame();
|
||||
frame.set(nullptr);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1037,6 +1037,16 @@ LiveSavedFrameCache::FramePtr::setHasCachedSavedFrame() {
|
|||
ptr.match(SetHasCachedMatcher());
|
||||
}
|
||||
|
||||
struct LiveSavedFrameCache::FramePtr::ClearHasCachedMatcher {
|
||||
template<typename Frame>
|
||||
void match(Frame* f) { f->clearHasCachedSavedFrame(); }
|
||||
};
|
||||
|
||||
inline void
|
||||
LiveSavedFrameCache::FramePtr::clearHasCachedSavedFrame() {
|
||||
ptr.match(ClearHasCachedMatcher());
|
||||
}
|
||||
|
||||
} /* namespace js */
|
||||
|
||||
#endif /* vm_Stack_inl_h */
|
||||
|
|
|
@ -777,6 +777,9 @@ class InterpreterFrame
|
|||
void setHasCachedSavedFrame() {
|
||||
flags_ |= HAS_CACHED_SAVED_FRAME;
|
||||
}
|
||||
void clearHasCachedSavedFrame() {
|
||||
flags_ &= ~HAS_CACHED_SAVED_FRAME;
|
||||
}
|
||||
|
||||
public:
|
||||
void trace(JSTracer* trc, Value* sp, jsbytecode* pc);
|
||||
|
@ -1195,7 +1198,7 @@ struct DefaultHasher<AbstractFramePtr> {
|
|||
// recently. When we find a cache hit, we check the entry's SavedFrame's
|
||||
// compartment against the current compartment; if they do not match, we flush
|
||||
// the entire cache. This means that it is not always true that, if a frame's
|
||||
// bit it set, it must have an entry in the cache. But we can still assert
|
||||
// bit is set, it must have an entry in the cache. But we can still assert
|
||||
// that, if a frame's bit is set and the cache is not completely empty, the
|
||||
// frame will have an entry. When the cache is flushed, it will be repopulated
|
||||
// immediately with the new capture's frames.
|
||||
|
@ -1248,6 +1251,7 @@ class LiveSavedFrameCache
|
|||
|
||||
struct HasCachedMatcher;
|
||||
struct SetHasCachedMatcher;
|
||||
struct ClearHasCachedMatcher;
|
||||
|
||||
public:
|
||||
// If iter's frame is of a type that can be cached, construct a FramePtr
|
||||
|
@ -1259,6 +1263,7 @@ class LiveSavedFrameCache
|
|||
|
||||
inline bool hasCachedSavedFrame() const;
|
||||
inline void setHasCachedSavedFrame();
|
||||
inline void clearHasCachedSavedFrame();
|
||||
|
||||
// Return true if this FramePtr refers to an interpreter frame.
|
||||
inline bool isInterpreterFrame() const { return ptr.is<InterpreterFrame*>(); }
|
||||
|
|
|
@ -2011,6 +2011,7 @@ class DebugFrame
|
|||
|
||||
bool hasCachedSavedFrame() const { return hasCachedSavedFrame_; }
|
||||
void setHasCachedSavedFrame() { hasCachedSavedFrame_ = true; }
|
||||
void clearHasCachedSavedFrame() { hasCachedSavedFrame_ = false; }
|
||||
|
||||
// DebugFrame is accessed directly by JIT code.
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "AccessibleCaretEventHub.h"
|
||||
#include "AccessibleCaretLogger.h"
|
||||
#include "mozilla/AsyncEventDispatcher.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/MouseEventBinding.h"
|
||||
#include "mozilla/dom/NodeFilterBinding.h"
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "mozilla/dom/FontFaceSet.h"
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/StyleSheetInlines.h"
|
||||
#include "mozilla/EventDispatcher.h"
|
||||
#include "mozilla/EventStateManager.h"
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* 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/. */
|
||||
|
||||
/**
|
||||
* Macros used to log restyle events.
|
||||
*/
|
||||
|
||||
#ifndef mozilla_RestyleLogging_h
|
||||
#define mozilla_RestyleLogging_h
|
||||
|
||||
#include "mozilla/AutoRestore.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#endif
|
||||
|
||||
#ifdef RESTYLE_LOGGING
|
||||
#define LOG_RESTYLE_VAR2(prefix_, suffix_) prefix_##suffix_
|
||||
#define LOG_RESTYLE_VAR(prefix_, suffix_) LOG_RESTYLE_VAR2(prefix_, suffix_)
|
||||
#define LOG_RESTYLE_DEPTH LOG_RESTYLE_VAR(restyle_depth_, __LINE__)
|
||||
#define LOG_RESTYLE_IF(object_, cond_, message_, ...) \
|
||||
PR_BEGIN_MACRO \
|
||||
if (object_->ShouldLogRestyle() && (cond_)) { \
|
||||
nsCString line; \
|
||||
for (int32_t LOG_RESTYLE_VAR(rs_depth_, __LINE__) = 0; \
|
||||
LOG_RESTYLE_VAR(rs_depth_, __LINE__) < object_->LoggingDepth(); \
|
||||
LOG_RESTYLE_VAR(rs_depth_, __LINE__)++) { \
|
||||
line.AppendLiteral(" "); \
|
||||
} \
|
||||
line.AppendPrintf(message_, ##__VA_ARGS__); \
|
||||
printf_stderr("%s\n", line.get()); \
|
||||
} \
|
||||
PR_END_MACRO
|
||||
#define LOG_RESTYLE(message_, ...) \
|
||||
LOG_RESTYLE_IF(this, true, message_, ##__VA_ARGS__)
|
||||
// Beware that LOG_RESTYLE_INDENT is two statements not wrapped in a block.
|
||||
#define LOG_RESTYLE_INDENT() \
|
||||
AutoRestore<int32_t> LOG_RESTYLE_VAR(ar_depth_, __LINE__)(LoggingDepth()); \
|
||||
++LoggingDepth();
|
||||
#else
|
||||
#define LOG_RESTYLE_IF(cond_, message_, ...) /* nothing */
|
||||
#define LOG_RESTYLE(message_, ...) /* nothing */
|
||||
#define LOG_RESTYLE_INDENT() /* nothing */
|
||||
#endif
|
||||
|
||||
#endif /* mozilla_RestyleLogging_h */
|
|
@ -7,6 +7,7 @@
|
|||
#ifndef mozilla_RestyleManager_h
|
||||
#define mozilla_RestyleManager_h
|
||||
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/OverflowChangedTracker.h"
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* 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/. */
|
||||
|
||||
#ifndef mozilla_RestyleTrackerInlines_h
|
||||
#define mozilla_RestyleTrackerInlines_h
|
||||
|
||||
#ifdef RESTYLE_LOGGING
|
||||
bool
|
||||
mozilla::RestyleTracker::ShouldLogRestyle()
|
||||
{
|
||||
return mRestyleManager->ShouldLogRestyle();
|
||||
}
|
||||
|
||||
int32_t&
|
||||
mozilla::RestyleTracker::LoggingDepth()
|
||||
{
|
||||
return mRestyleManager->LoggingDepth();
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // !defined(mozilla_RestyleTrackerInlines_h)
|
|
@ -383,7 +383,7 @@ load 629035-1.html
|
|||
load 629908-1.html
|
||||
load 635329.html
|
||||
load 636229-1.html
|
||||
skip-if(webrender&&winWidget) == 640272.html 640272-ref.html # bug 1426199 for webrender
|
||||
== 640272.html 640272-ref.html
|
||||
load 645193.html
|
||||
load 645572-1.html
|
||||
load 650475.xhtml
|
||||
|
|
|
@ -79,7 +79,6 @@ EXPORTS.mozilla += [
|
|||
'GeometryUtils.h',
|
||||
'OverflowChangedTracker.h',
|
||||
'PresShell.h',
|
||||
'RestyleLogging.h',
|
||||
'RestyleManager.h',
|
||||
'ShapeUtils.h',
|
||||
'StaticPresData.h',
|
||||
|
|
|
@ -265,9 +265,6 @@ nsPresContext::nsPresContext(nsIDocument* aDocument, nsPresContextType aType)
|
|||
mQuirkSheetAdded(false),
|
||||
mNeedsPrefUpdate(false),
|
||||
mHadNonBlankPaint(false)
|
||||
#ifdef RESTYLE_LOGGING
|
||||
, mRestyleLoggingEnabled(false)
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
, mInitialized(false)
|
||||
#endif
|
||||
|
@ -944,10 +941,6 @@ nsPresContext::Init(nsDeviceContext* aDeviceContext)
|
|||
|
||||
mEventManager->SetPresContext(this);
|
||||
|
||||
#ifdef RESTYLE_LOGGING
|
||||
mRestyleLoggingEnabled = GeckoRestyleManager::RestyleLoggingInitiallyEnabled();
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
mInitialized = true;
|
||||
#endif
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "nsThreadUtils.h"
|
||||
#include "ScrollbarStyles.h"
|
||||
#include "nsIMessageManager.h"
|
||||
#include "mozilla/RestyleLogging.h"
|
||||
#include "Units.h"
|
||||
#include "prenv.h"
|
||||
#include "mozilla/StaticPresData.h"
|
||||
|
@ -1259,14 +1258,6 @@ public:
|
|||
*/
|
||||
bool MayHavePaintEventListenerInSubDocument();
|
||||
|
||||
#ifdef RESTYLE_LOGGING
|
||||
// Controls for whether debug information about restyling in this
|
||||
// document should be output.
|
||||
bool RestyleLoggingEnabled() const { return mRestyleLoggingEnabled; }
|
||||
void StartRestyleLogging() { mRestyleLoggingEnabled = true; }
|
||||
void StopRestyleLogging() { mRestyleLoggingEnabled = false; }
|
||||
#endif
|
||||
|
||||
void InvalidatePaintedLayers();
|
||||
|
||||
protected:
|
||||
|
@ -1504,11 +1495,6 @@ protected:
|
|||
// Has NotifyNonBlankPaint been called on this PresContext?
|
||||
unsigned mHadNonBlankPaint : 1;
|
||||
|
||||
#ifdef RESTYLE_LOGGING
|
||||
// Should we output debug information about restyling for this document?
|
||||
unsigned mRestyleLoggingEnabled : 1;
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
unsigned mInitialized : 1;
|
||||
#endif
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include <functional>
|
||||
#include <limits>
|
||||
#include "gfxContext.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/ComputedStyle.h"
|
||||
#include "mozilla/CSSAlignUtils.h"
|
||||
#include "mozilla/CSSOrderAwareFrameIterator.h"
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include <algorithm>
|
||||
#include "mozilla/ArenaObjectID.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/RestyleLogging.h"
|
||||
#include "mozilla/ServoTypes.h"
|
||||
#include "mozilla/ServoUtils.h"
|
||||
#include "mozilla/StyleComplexColor.h"
|
||||
|
|
|
@ -408,6 +408,17 @@ function push_repo {
|
|||
then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Clean up older review requests
|
||||
# Turn Needs Review D624: No bug, Automated HSTS ...
|
||||
# into D624
|
||||
for diff in $($ARC list | grep "Needs Review" | grep -E "Automated HSTS|Automated HPKP|Automated blocklist" | awk 'match($0, /D[0-9]+[^: ]/, arr) { print arr[0] }')
|
||||
do
|
||||
echo "Removing old request $diff"
|
||||
# There is no 'arc abandon', see bug 1452082
|
||||
echo '{"transactions": [{"type":"abandon"}], "objectIdentifier": "'"${diff}"'"}' | arc call-conduit differential.revision.edit
|
||||
done
|
||||
|
||||
$ARC diff --verbatim --reviewers "${REVIEWERS}"
|
||||
}
|
||||
|
||||
|
|
|
@ -15,20 +15,20 @@ useradd -d /home/worker -s /bin/bash -m worker
|
|||
|
||||
apt-get update -q
|
||||
apt-get install -y --no-install-recommends \
|
||||
arcanist=0~git20170812-1 \
|
||||
bzip2=1.0.6-8.1 \
|
||||
arcanist \
|
||||
bzip2 \
|
||||
ca-certificates \
|
||||
curl \
|
||||
jq=1.5+dfsg-2 \
|
||||
libdbus-glib-1-2=0.110-2 \
|
||||
libgtk-3-0=3.22.28-1ubuntu3 \
|
||||
libxml2-utils=2.9.4+dfsg1-6.1ubuntu1 \
|
||||
libxt6=1:1.1.5-1 \
|
||||
jq \
|
||||
libdbus-glib-1-2 \
|
||||
libgtk-3-0 \
|
||||
libxml2-utils \
|
||||
libxt6 \
|
||||
python \
|
||||
python3=3.6.4-1 \
|
||||
shellcheck=0.4.6-1 \
|
||||
unzip=6.0-21ubuntu1 \
|
||||
wget=1.19.4-1ubuntu2 \
|
||||
python3 \
|
||||
shellcheck \
|
||||
unzip \
|
||||
wget \
|
||||
|
||||
apt-get clean
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ ChromeUtils.defineModuleGetter(this, "TestUtils",
|
|||
"resource://testing-common/TestUtils.jsm");
|
||||
Cu.importGlobalProperties(["XMLHttpRequest"]);
|
||||
|
||||
PromiseTestUtils.whitelistRejectionsGlobally(/Message manager disconnected/);
|
||||
|
||||
const server = createHttpServer();
|
||||
const gServerUrl = `http://localhost:${server.identity.primaryPort}`;
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "mozilla/Logging.h"
|
||||
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/DebugOnly.h"
|
||||
#include "mozilla/MouseEvents.h"
|
||||
#include "mozilla/MiscEvents.h"
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
#include "gfxEnv.h"
|
||||
#include "gfxPlatform.h"
|
||||
#include "gfxPrefs.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/Logging.h"
|
||||
#include "mozilla/MathAlgorithms.h"
|
||||
#include "mozilla/MiscEvents.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче