Re: Extending the length of an XPCOM string when writing to it via a raw pointer

2018-08-30 Thread Henri Sivonen
On Thu, Aug 30, 2018 at 7:43 PM, Henri Sivonen wrote: >> What is then the point of SetCapacity anymore? > > To avoid multiple allocations during a sequence of Append()s. (This is > documented on the header.) At this point, it's probably relevant to mention that SetCapacity() in situations other t

Layout Bugzilla components

2018-08-30 Thread Cameron McCormack
[bcc: firefox-dev, firefox-triage-leads] Hi, The Layout team has done some Bugzilla component reorganization to distribute features and areas of code a bit better. There are a number of new components split out from existing ones: * Previously covered by CSS Parsing and Computation: ** CSS Tr

Re: Rebuild speeds (Was: Re: JS compilation/evaluation APIs are now in #include "js/CompilationAndEvaluation.h")

2018-08-30 Thread Michael Shal
On Thu, Aug 30, 2018 at 6:04 PM, Michael Shal wrote: > > > In this case, the 99:44 rebuild times look to be an artifact of how the > outputs of GenerateServoStyleConsts.py are consumed by a large chunk of the > Rust and C++ code. Attached is a graphviz .dot file for reference (with > graphviz, 'do

Re: Dead-code removal of unused Rust FFI exports

2018-08-30 Thread Mike Hommey
On Thu, Aug 30, 2018 at 10:21:09AM -0500, Tom Ritter wrote: > CFI vcall requires one to specify a -fvisibility flag on the command line, > with hidden being the preffered. We set visibility explicitly in some > difficult-to-quickly-identify ways, and adding -fvisibility=hidden > triggered issues wi

Re: Rebuild speeds (Was: Re: JS compilation/evaluation APIs are now in #include "js/CompilationAndEvaluation.h")

2018-08-30 Thread Michael Shal
On Wed, Aug 29, 2018 at 11:36 AM, Boris Zbarsky wrote: > On 8/29/18 10:32 AM, Ted Mielczarek wrote: > >> so it's possible that there are things here that are artifacts of our tup >> build implementation. >> > > Worth keeping in mind, thank you. Would that possibly account for the > exactly-the-s

Re: Intent to remove DHE ciphers from WebRTC DTLS handshake

2018-08-30 Thread Nicholas Alexander
On Wed, Aug 29, 2018 at 3:56 PM, Nils Ohlmeier wrote: > Summary: > > We are looking at removing the DHE cipher suites from the DTLS handshake > in Firefox soon. > > Ciphers: > - TLS_DHE_RSA_WITH_AES_128_CBC_SHA > - TLS_DHE_RSA_WITH_AES_256_CBC_SHA > are the two suites which we want to remove, be

Re: Extending the length of an XPCOM string when writing to it via a raw pointer

2018-08-30 Thread Henri Sivonen
On Thu, Aug 30, 2018 at 6:00 PM, smaug wrote: > On 08/30/2018 11:21 AM, Henri Sivonen wrote: >> >> We have the following that a pattern in our code base: >> >> 1) SetCapacity(newCapacity) is called on an XPCOM string. >> 2) A pointer obtained from BeginWriting() is used for writing more >> tha

Re: Dead-code removal of unused Rust FFI exports

2018-08-30 Thread Tom Ritter
CFI vcall requires one to specify a -fvisibility flag on the command line, with hidden being the preffered. We set visibility explicitly in some difficult-to-quickly-identify ways, and adding -fvisibility=hidden triggered issues with NSS (as well as apparently being redundant to what we currently d

Re: Extending the length of an XPCOM string when writing to it via a raw pointer

2018-08-30 Thread smaug
On 08/30/2018 11:21 AM, Henri Sivonen wrote: We have the following that a pattern in our code base: 1) SetCapacity(newCapacity) is called on an XPCOM string. 2) A pointer obtained from BeginWriting() is used for writing more than Length() but no more than newCapacity code units to the XPCOM

Re: Dead-code removal of unused Rust FFI exports

2018-08-30 Thread Ted Mielczarek
I thought we had filed a Rust issue on this but apparently not. There's some good discussion in this issue: https://github.com/rust-lang/rust/issues/37530 For Firefox, simply having an equivalent to `-fvisilbility=hidden` so that all the symbols in the generated static library are hidden would b

(Mobile) Component Idea - Performance Policy Manager

2018-08-30 Thread Stefan Arentz
Hello everyone, I was debugging something completely unrelated to Firefox on my Mac when I saw the following events in my console: 501:com.apple.safarishared.WBSParsecDSession.*autoFillDataUpdate*:FD5887:[ {name: *DeviceActivityPolicy*, policyWeight: 2.000, response: {*Decision: Can Proceed*,

Re: Dead-code removal of unused Rust FFI exports

2018-08-30 Thread Michael Woerister
For some background: The Rust compiler will mark everything as `hidden` in LLVM IR unless it is exported via a C interface (via either #[no_mangle] or #[export_name]). So the FFI symbols in gkrust will have default visibility. LLD will thus probably retain and re-export them, even if they are not c

Re: How do I inject the WebExtensions API into a ?

2018-08-30 Thread Andrew Swan
Geoff, First, I'm moving this over to dev-addons since it is about the internals of the webextensions implementation and probably not of interest to many of the people on dev-platform. Anybody from dev-platform who is interested, feel free to follow us over to dev-addons. The short answer is tha

Re: (Mobile) Component Idea - Performance Policy Manager

2018-08-30 Thread Michael Comella
Hey Stefan - good idea! fwiw, the Android support library has the WorkManager API which handles similar functionality. However, it's a push rather than a poll (as you suggested): you tell it the constraints under which

Extending the length of an XPCOM string when writing to it via a raw pointer

2018-08-30 Thread Henri Sivonen
We have the following that a pattern in our code base: 1) SetCapacity(newCapacity) is called on an XPCOM string. 2) A pointer obtained from BeginWriting() is used for writing more than Length() but no more than newCapacity code units to the XPCOM string. 3) SetLength(actuallyWritten) is called