Commit Graph

367 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
3bb02fa89f Bug 1546048 - Use std::ffi::CStr and the cstr crate instead of custom stuff in xpcom. r=lina
Also, this checks for strings with nulls, which is nice (though I guess an
uncommon mistake).

Differential Revision: https://phabricator.services.mozilla.com/D28312

--HG--
extra : moz-landing-system : lando
2019-04-22 05:09:23 +00:00
Myk Melez
e2338641e4 Bug 1460811 - migrate XULStore to rkv r=bgrins,lina
Differential Revision: https://phabricator.services.mozilla.com/D25355

--HG--
rename : toolkit/components/xulstore/components.conf => toolkit/components/xulstore/tests/gtest/moz.build
extra : moz-landing-system : lando
2019-04-22 02:59:51 +00:00
Coroiu Cristina
5f4315f3ee Backed out changeset 37054e6d6bbb (bug 1460811) for marionette failures at marionette_harness/tests/unit/test_cli_arguments.py on a CLOSED TREE 2019-04-20 00:05:55 +03:00
Myk Melez
2eece48676 Bug 1460811 - migrate XULStore to rkv r=bgrins,lina
Differential Revision: https://phabricator.services.mozilla.com/D25355

--HG--
rename : toolkit/components/xulstore/components.conf => toolkit/components/xulstore/tests/gtest/moz.build
extra : moz-landing-system : lando
2019-04-19 17:42:48 +00:00
Razvan Maries
1f6c35708a Backed out changeset 2f8f0e53a7db (bug 1460811) for leakcheck perma failures. CLOSED TREE 2019-04-19 00:16:32 +03:00
Myk Melez
f61d3b4399 Bug 1460811 - migrate XULStore to rkv r=bgrins,lina
Differential Revision: https://phabricator.services.mozilla.com/D25355

--HG--
rename : toolkit/components/xulstore/components.conf => toolkit/components/xulstore/tests/gtest/moz.build
extra : moz-landing-system : lando
2019-04-18 19:27:12 +00:00
Myk Melez
c411b93c35 Bug 1543795 - configure lmdb-rkv-sys to use a smaller MDB_IDL_LOGN size r=nanj,glandium
Configure the lmdb-rkv-sys Rust crate to use a smaller MDB_IDL_LOGN size in order to reduce allocations when opening an LMDB environment in read-write mode.

@glandium I adopted the configuration strategy you suggested of creating a "feature" for each reasonable value for the MDB_IDL_LOGN macro.  Fortunately, the range of reasonable values is fairly small.

@nanj Based on your evalution in https://github.com/mozilla/lmdb/pull/2, a value of "9" for this macro should aggressively reduce the allocations while still supporting our existing use cases.  But I'm open to increasing it, if you think a higher initial value would be preferable.

Differential Revision: https://phabricator.services.mozilla.com/D27559

--HG--
extra : moz-landing-system : lando
2019-04-16 16:03:10 +00:00
Henri Sivonen
d88123ff6b Bug 1543388 - Update vendored memchr 2.x crate. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D27485

--HG--
extra : moz-landing-system : lando
2019-04-15 23:44:39 +00:00
Kirk Steuber
1b86be999a Bug 1520321 - Implement XPCOM interface for BITS r=lina
This patch introduces an asynchronous XPCOM interface for the bits client added in Bug 1523417

Differential Revision: https://phabricator.services.mozilla.com/D25161

--HG--
extra : moz-landing-system : lando
2019-04-15 19:44:35 +00:00
Benjamin Bouvier
da79779db2 Bug 1539406: Bump Cranelift to revision 542d799dd7a3b2cc; r=lth
This is the first time we pin a specific Cranelift commit hash to use in Gecko.
The target-lexicon hack is removed and instead we introduce a vendor patch for
cranelift-codegen/cranelift-wasm themselves.

Notable changes happen in top-level Cargo.toml, .cargo/config.in and
js/src/wasm/cranelift/Cargo.toml; the rest has been generated by `mach vendor
rust`.

Differential Revision: https://phabricator.services.mozilla.com/D27316

--HG--
extra : moz-landing-system : lando
2019-04-15 10:39:28 +00:00
Noemi Erli
dd7e27f4a8 Merge inbound to mozilla-central. a=merge 2019-04-09 12:55:19 +03:00
Razvan Maries
51bf310eab Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2019-04-09 00:02:13 +03:00
Bastien Orivel
8b5dc7e481 Bug 1516337 - Part 1: Dedupe sha2 and related dependencies r=froydnj
This also removes the lalrpop files from the .git/hgignore as that
breaks the build since lalrpop now includes lrgrammar in the published
crate and that file needs to be vendored

--HG--
extra : histedit_source : e31c07645a87a11b19a0b7e44f2a48d791b5f396
2019-04-08 23:17:50 +03:00
Lina Cambridge
6bef7b8477 Bug 1542528 - Add an xpcom::c_str macro for creating static C strings. r=froydnj
This is based on the `c_str` macro in `js/rust/src/heap.rs`, but
returns a `NulTerminatedCStr` type that can be cast to a pointer.

This commit also changes `ThreadPtrHolder::new` to take a
`NulTerminatedCStr`, and removes an unnecessary `RefPtr` reference in
`is_current_thread`.

Differential Revision: https://phabricator.services.mozilla.com/D26429

--HG--
extra : moz-landing-system : lando
2019-04-08 14:43:35 +00:00
Myk Melez
8921690f26 Bug 1542888 - avoid Rkv::Manager call to std::fs::canonicalize r=lina
Avoid using Rkv::Manager, which calls std::fs::canonicalize, triggering bug 1531887 in Firefox on Android.

Differential Revision: https://phabricator.services.mozilla.com/D26605

--HG--
extra : moz-landing-system : lando
2019-04-09 03:57:18 +00:00
Dana Keeler
61bd4db566 Bug 1535752 - avoid unnecessarily base64-encoding inputs to nsICertStorage when we already have DER r=mgoodwin
Differential Revision: https://phabricator.services.mozilla.com/D26034

--HG--
extra : moz-landing-system : lando
2019-04-05 21:19:21 +00:00
Lina Cambridge
55eaa1eb23 Bug 1540894 - Vendor Dogear v0.2.3. r=tcsc
Differential Revision: https://phabricator.services.mozilla.com/D26274

--HG--
extra : moz-landing-system : lando
2019-04-05 20:44:18 +00:00
Coroiu Cristina
749dbdc496 Merge mozilla-central to inbound a=merge 2019-04-05 06:23:29 +03:00
Jan Beich
d099734e70 Bug 1530098 - Update libc crate to 0.2.51 to pick up FreeBSD fixes for non-x86. r=froydnj
--HG--
rename : third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/x86.rs => third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/arm.rs
rename : third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs => third_party/rust/libc/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs
rename : third_party/rust/libc/src/unix/notbsd/emscripten.rs => third_party/rust/libc/src/unix/notbsd/emscripten/mod.rs
rename : third_party/rust/libc/src/unix/notbsd/linux/s390x.rs => third_party/rust/libc/src/unix/notbsd/linux/s390x/mod.rs
rename : third_party/rust/libc/src/unix/solaris/mod.rs => third_party/rust/libc/src/unix/solarish/mod.rs
rename : third_party/rust/libc/src/unix/uclibc/mips/mips32.rs => third_party/rust/libc/src/unix/uclibc/mips/mips32/mod.rs
rename : third_party/rust/libc/src/unix/uclibc/mips/mips64.rs => third_party/rust/libc/src/unix/uclibc/mips/mips64/mod.rs
2019-04-05 01:34:23 +00:00
Emilio Cobos Álvarez
c028706efc Bug 1541913 - Use Servo lengths for column-width. r=boris
Depends on D26154

Differential Revision: https://phabricator.services.mozilla.com/D26155

--HG--
extra : moz-landing-system : lando
2019-04-04 18:29:57 +00:00
Kartikaya Gupta
4752e32d5b Bug 1529117 - Bump serde and serde_derive to branch from 1.0.88. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D20460

--HG--
extra : moz-landing-system : lando
2019-04-04 15:41:57 +00:00
Emilio Cobos Álvarez
f59ad7aa8e Bug 1490401 - MatchMedia should work inside display: none iframes. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D25926

--HG--
extra : moz-landing-system : lando
2019-04-04 11:25:31 +00:00
Ciure Andrei
4116e08315 Merge inbound to mozilla-central. a=merge 2019-04-04 07:34:14 +03:00
Dana Keeler
a483dcca02 Bug 1539415 - make nsICertStorage (cert_storage) asynchronous for functions called from the main thread r=jcj,mgoodwin
The Set* functions of nsICertStorage (SetRevocationByIssuerAndSerial,
SetRevocationBySubjectAndPubKey, SetEnrollment, and SetWhitelist) are called on
the main thread by the implementations that manage consuming remote security
information. We don't want to block the main thread, so this patch modifies
these functions to take a callback that will be called (on the original thread)
when the operation in question has been completed on a background thread.

The Get* functions of nsICertStorage (GetRevocationState, GetEnrollmentState,
and GetWhitelistState) should only be called off the main thread. For the most
part they are, but there are at least two main-thread certificate verifications
that can cause these functions to be called on the main thread. These instances
are in nsSiteSecurityService::ProcessPKPHeader and
ContentSignatureVerifier::CreateContextInternal and will be dealt with in
bug 1406854 bug 1534600, respectively.

Differential Revision: https://phabricator.services.mozilla.com/D25174

--HG--
extra : moz-landing-system : lando
2019-04-03 23:24:19 +00:00
Nathan Froyd
7eee5d9139 Bug 1537643 - update cc crate; r=glandium
This update from the official sources brings in the changes that we were
using glandium's fork for, as well as changes enabling us to tweak more
settings on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D25888

--HG--
extra : moz-landing-system : lando
2019-04-03 00:06:04 +00:00
Andrew Osmond
a26277d8ff Bug 1541059 - Add support for KHR_debug to WebRender for debug markers. r=kvark
Today we already support EXT_debug_marker for debug markers in
WebRender. This is useful to categorize GL API calls in tools such as
APITrace and RenderDoc. However not all drivers indicate support for
said extension, but instead support KHR_debug. This patch makes us
support both methods, preferring KHR_debug.

Differential Revision: https://phabricator.services.mozilla.com/D25787
2019-04-02 12:31:03 -04:00
Emilio Cobos Álvarez
63d22618c3 Bug 1520953 - Update gleam. r=kats,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D25602

--HG--
extra : moz-landing-system : lando
2019-04-01 17:54:08 +00:00
Emilio Cobos Álvarez
7d6f6c28d7 Bug 1536582 - Autogenerate Servo_ binding functions with cbindgen. r=boris
This depends on https://github.com/eqrion/cbindgen/pull/308. Other than that,
this should be ready to go.

There's still a bit more magic than what I'd like to eventually. I should be
able to make cbindgen not rename types if it doesn't know about them, or
something.

But this removes most of the manual binding function implementations (all but
the ones that are declared via macros, which cbindgen doesn't see across).

I need to give up on the _Drop functions taking an Owned<T> because of
instantiation order fiasco. In order to define DefaultDelete I need Owned to be
complete, but I cannot do it after including the generated file since some
declarations already instantiate the specialization. Oh well.

Differential Revision: https://phabricator.services.mozilla.com/D24798

--HG--
rename : servo/components/style/cbindgen.toml => servo/ports/geckolib/cbindgen.toml
extra : moz-landing-system : lando
2019-03-30 20:18:33 +00:00
Cameron McCormack
3a08c03925 Bug 1474793 - Part 11: Add FFI API to use SharedMemoryBuilder. r=emilio
Depends on D17197

Differential Revision: https://phabricator.services.mozilla.com/D17198

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:27 +00:00
Cameron McCormack
6b5853fa8e Bug 1474793 - Part 10.8: Add derived ToShmem implementations. r=emilio
Depends on D17196

Differential Revision: https://phabricator.services.mozilla.com/D17197

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:25 +00:00
Cameron McCormack
d46b90bcd7 Bug 1474793 - Part 10.2: Add ToShmem impls for collections and strings. r=emilio
Depends on D17190

Differential Revision: https://phabricator.services.mozilla.com/D17191

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:13 +00:00
Cameron McCormack
cf65641653 Bug 1474793 - Part 10.1: Add simple ToShmem implementations. r=emilio
Depends on D17189

Differential Revision: https://phabricator.services.mozilla.com/D17190

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:11 +00:00
Cameron McCormack
8c9949aa66 Bug 1474793 - Part 9: Add support for deriving ToShmem. r=emilio
Depends on D17188

Differential Revision: https://phabricator.services.mozilla.com/D17189

--HG--
extra : moz-landing-system : lando
2019-03-30 00:16:08 +00:00
Cameron McCormack
c1d7542bbd Bug 1474793 - Part 8: Factor out some of style_derive. r=emilio
Depends on D17187

Differential Revision: https://phabricator.services.mozilla.com/D17188

--HG--
rename : servo/components/style_derive/Cargo.toml => servo/components/derive_common/Cargo.toml
rename : servo/components/style_derive/cg.rs => servo/components/derive_common/cg.rs
extra : moz-landing-system : lando
2019-03-30 00:16:01 +00:00
Cameron McCormack
b3a8e5cfb6 Bug 1474793 - Part 7: Add SharedMemoryBuilder type and ToShmem trait. r=emilio
Depends on D17186

Differential Revision: https://phabricator.services.mozilla.com/D17187

--HG--
extra : moz-landing-system : lando
2019-03-30 00:15:59 +00:00
Myk Melez
5b6def9858 Bug 1538093 - reopen security_state env as read-only when not writing r=keeler
The new rkv-based cert_storage database caused a Heap Unclassified regression because of memory that LMDB reserves when opening a database in read-write mode. Since cert_storage usage is read-heavy, this change claws back that regression by opening it in read-only mode except when changes are being made.

Differential Revision: https://phabricator.services.mozilla.com/D25098

--HG--
extra : moz-landing-system : lando
2019-03-29 19:48:00 +00:00
Nan Jiang
719f34cee5 Bug 1522638 - Add bulk insert to kvstore r=myk,mossop,nika
This adds the bulk insert to kvstore as discussed in Bug 1522638

Differential Revision: https://phabricator.services.mozilla.com/D22032

--HG--
extra : moz-landing-system : lando
2019-03-27 14:16:59 +00:00
Emilio Cobos Álvarez
cfa6b9a741 Bug 1529681 - Update bindgen. r=bbouvier
This works around an LLVM bug and also pulls a fair amount of bugfixes and perf
improvements. None of the breaking changes affect either the style system or
cranelift stuff.

Changelog for convenience:

https://github.com/rust-lang/rust-bindgen/compare/v0.43.2...v0.49.0

Differential Revision: https://phabricator.services.mozilla.com/D20899

--HG--
extra : moz-landing-system : lando
2019-03-27 14:39:41 +00:00
Narcis Beleuzu
75b2169450 No Bug - Fix merge conflict on Cargo.lock. CLOSED TREE
--HG--
extra : histedit_source : 41a7f9d2ffe5ef02958538674b91ad1e913e53ba
2019-04-05 02:08:39 +03:00
Coroiu Cristina
81988cf6f0 Merge mozilla-central to inbound a=merge
--HG--
rename : browser/components/newtab/locales-src/bn-BD/strings.properties => browser/components/newtab/locales-src/bn/strings.properties
rename : browser/components/newtab/prerendered/locales/bn-BD/activity-stream-noscripts.html => browser/components/newtab/prerendered/locales/bn/activity-stream-noscripts.html
rename : browser/components/newtab/prerendered/locales/bn-BD/activity-stream-prerendered-noscripts.html => browser/components/newtab/prerendered/locales/bn/activity-stream-prerendered-noscripts.html
rename : browser/components/newtab/prerendered/locales/bn-BD/activity-stream-prerendered.html => browser/components/newtab/prerendered/locales/bn/activity-stream-prerendered.html
rename : browser/components/newtab/prerendered/locales/bn-BD/activity-stream-strings.js => browser/components/newtab/prerendered/locales/bn/activity-stream-strings.js
rename : browser/components/newtab/prerendered/locales/bn-BD/activity-stream.html => browser/components/newtab/prerendered/locales/bn/activity-stream.html
rename : browser/components/newtab/prerendered/locales/mai/activity-stream-noscripts.html => browser/components/newtab/prerendered/locales/trs/activity-stream-noscripts.html
rename : browser/components/newtab/prerendered/locales/mai/activity-stream.html => browser/components/newtab/prerendered/locales/trs/activity-stream.html
extra : rebase_source : 036d21b0bde0e7b1d2b51b7b6fe1f8cc5e088de0
2019-04-05 01:18:50 +03:00
Emilio Cobos Álvarez
db06f2ce85 Bug 1513173 - followup: Update js's cargo.lock file. 2019-04-04 17:59:54 +02:00
Bastien Orivel
51234e0d53 Bug 1513173 - Part 1: Update syn 0.15 related dependencies. r=emilio
I don't think this'll change anything performance-wise but let's try
2019-04-04 14:33:13 +02:00
Mike Hommey
45d8ee6df1 Bug 1538419 - Add support for thumbv7neon to target-lexicon. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D24596

--HG--
extra : moz-landing-system : lando
2019-03-26 03:12:56 +00:00
shindli
a6cb898b72 Backed out changeset c0399366d123 (bug 1538419) for cargo library build bustages CLOSED TREE 2019-03-26 04:46:51 +02:00
Mike Hommey
198b466867 Bug 1538419 - Add support for thumbv7neon to target-lexicon. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D24596

--HG--
extra : moz-landing-system : lando
2019-03-25 12:39:52 +00:00
Henri Sivonen
935b754f86 Bug 1521249 part 2 - Make packed_simd compile with Rust 1.32 and later. r=glandium
This adds the Firefox-required build.rs hack and reverts the commit
that added bitmasks in a way that depends on Rust 1.34 compiler
internals.

Depends on D20288

Differential Revision: https://phabricator.services.mozilla.com/D20289

--HG--
extra : moz-landing-system : lando
2019-03-23 14:17:35 +00:00
Henri Sivonen
7d1d8a5c3c Bug 1521249 part 1 - Update encoding_rs to 0.8.16. r=glandium
This changeset requires nightly Rust (to be changed in the next part).

Depends on D21891

Differential Revision: https://phabricator.services.mozilla.com/D20288

--HG--
rename : third_party/rust/simd/LICENSE-APACHE => third_party/rust/packed_simd/LICENSE-APACHE
rename : third_party/rust/simd/LICENSE-MIT => third_party/rust/packed_simd/LICENSE-MIT
extra : moz-landing-system : lando
2019-03-23 14:17:35 +00:00
Lina Cambridge
99b7c7c7de Bug 1482608 - Port the synced bookmarks merger to Rust. r=nika,mak,markh,tcsc
This commit introduces a Rust XPCOM component,
`mozISyncedBookmarksMerger`, that wraps the Dogear crate for
merging and applying synced bookmarks.

How this works: `SyncedBookmarksMirror.jsm` manages opening
the connection, initializing the schema, and writing incoming
items into the mirror database. The new `mozISyncedBookmarksMerger`
holds a handle to the same connection. When JS code calls
`mozISyncedBookmarksMerger::apply`, the merger builds local and
remote trees, produces a merged tree, applies the tree back to Places,
and stages outgoing items for upload in a temp table, all on the
storage thread. It then calls back in to JS, which inflates Sync
records for outgoing items, notifies Places observers, and cleans up.

Since Dogear has a more robust merging algorithm that attempts to fix
up invalid trees, `test_bookmark_corruption.js` intentionally fails.
This is fixed in the next commit, which changes the merger to handle
invalid structure.

Differential Revision: https://phabricator.services.mozilla.com/D20076

--HG--
extra : moz-landing-system : lando
2019-03-25 04:50:14 +00:00
Lina Cambridge
35f0c7a7f9 Bug 1482608 - Add owning thread pointer holders for Rust code. r=nika,myk
This commit adds `ThreadPtr{Handle, Holder}` to wrap an `XpCom` object
with thread-safe refcounting. These are analagous to
`nsMainThreadPtr{Handle, Holder}`, but can hold references to
objects from any thread, not just the main thread.

`ThreadPtrHolder` is similar to `ThreadBoundRefPtr`. However, it's
not possible to clone a `ThreadBoundRefPtr`, so it can't be shared
among tasks. This is fine for objects that are only used once, like
callbacks. However, `ThreadBoundRefPtr` doesn't work well for loggers
or event emitters, which might need to be called multiple times on
the owning thread.

Unlike a `ThreadBoundRefPtr`, it's allowed and expected to
clone and drop a `ThreadPtrHolder` on other threads. Internally,
the holder keeps an atomic refcount, and releases the wrapped object
on the owning thread once the count reaches zero.

This commit also changes `TaskRunnable` to support dispatching from
threads other than the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D20074

--HG--
extra : moz-landing-system : lando
2019-03-25 04:49:24 +00:00
Lina Cambridge
3e894ac30e Bug 1482608 - Add basic Rust bindings for mozStorage. r=nika,asuth,mak
This commit wraps just enough of the mozStorage API to support the
bookmarks mirror. It's not complete: for example, there's no way
to open, clone, or close a connection, because the mirror handles
that from JS. The wrapper also omits shutdown blocking and retrying on
`SQLITE_BUSY`.

This commit also changes the behavior of sync and async mozStorage
connections. Async (`mozIStorageAsyncConnection`) methods may be called
from any thread on any connection. Sync (`mozIStorageConnection`)
methods may be called from any thread on a sync connection, and from
background threads on an async connection. All connections now QI
to `mozIStorageConnection`, but attempting to call a sync method on
an async connection from the main thread throws.

Finally, this commit exposes an `OpenedConnection::unsafeRawConnection`
getter in Sqlite.jsm, for JS code to access the underlying connection.

Differential Revision: https://phabricator.services.mozilla.com/D20073

--HG--
extra : moz-landing-system : lando
2019-03-25 04:49:18 +00:00