Re: Questions about bindings for L20n

2016-06-10 Thread Neil Deakin

On 2016-06-10 4:51 AM, zbranie...@mozilla.com wrote:

While working on the new localization API (See Intent to Implement post from 
yesterday), we're developing bindings into UI languages used by Firefox and we 
have some decisions to make that could be better answered by this group.

The general API is declarative and DOM-based.  Instead of forcing developers to 
programmatically create string bundles, request raw strings from them and 
manually interpolate variables, L20n uses a Mutation Observer which is notified 
about changes to data-l10n-* attributes.  The complexity of the language 
negotiation, resource loading, error fallback and string interpolation is 
hidden in the mutation handler.  Most of our questions in this email relate to 
what the best way to declare resources is.



The one thing I would recommend you do (and I mentioned this many years 
ago when this was first proposed) is to not use the jargon terms 'l10n' 
or 'l20n' anywhere. They are hard to type and hard to read. Three of the 
four characters in 'l10n' are indistinguishable from similar characters 
in some fonts which can lead to hard to detect bugs.


You should instead spell out words such as 'locale' making it clearer to 
a casual reader the meaning.




  


  
  

Yes. Is there a need for two different elements? The HTML case doesn't 
have this. You could also just use the existing stringbundle element and 
make it handle a different file syntax, perhaps.




 * Is it okay to use the "name" attribute in XUL for the  object?


Yes


 * Is it okay to use data-l10n-* attributes for localizable elements? Or 
perhaps l10n-* would be sufficient?



You should just use bundle="browser". I'm not sure what the data 
attribute is meant to represent here, but the attribute name should be 
simpler as mentioned above (XUL attributes don't have hyphens in them 
either)


It's hard to give concrete suggestions when only some examples are 
given. It would help if you posted a more descriptive proposal of what 
all these elements/attributes do for each language. Maybe this is 
already available?


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to ship: unprefix :dir pseudo-class

2016-05-11 Thread Neil Deakin

On 2016-05-11 4:31 AM, Cameron McCormack wrote:

Mike de Boer:

We use :-moz-locale-dir extensively in frontend code. Who will own
converting that to the unprefixed version? Or, if :-moz-locale-dir
is still supported after the transition period, can we discuss
deprecating it in favour of unprefixed alternatives?


:-moz-locale-dir is kind of XUL-specific, so I don’t think there’s an
obvious standards track alternative.  (It basically means “is this
element in a XUL document for which
https://dxr.mozilla.org/mozilla-central/source/dom/xul/XULDocument.cpp#4488
returns a value that matches the pseudo-classes’ argument”, which
involves looking at localedir="" on the root element or a pref.)



For a xul document, it actually means match the directionality of the 
locale of the user agent for that document. It never matches in an html 
document, although there is a bug 588996 to support this.


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Hash files, signature and key now missing from release directory

2016-04-12 Thread Neil Harris

On 12/04/16 17:32, Ralph Giles wrote:

On Tue, Apr 12, 2016 at 3:51 AM, Neil Harris <n...@tonal.clara.co.uk> wrote:


for example, http://releases.mozilla.org/pub/firefox/releases/45.0.1/

Also note that the releases.mozilla.org host supports https, which
offers an additional verification path.

  -r



Yes, indeed it does, and perhaps I should have put the https link for 
the avoidance of confusion: however, my point about hashes/signature/key 
information was independent of whether the download is http or https -- 
and this issue has been fixed by kmoir, for which many thanks.


-- N
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Hash files, signature and key now missing from release directory

2016-04-12 Thread Neil Harris
I'm not sure if this is the right list for this, but I thought I'd 
better bring this to your attention.


Previous release directories have carried checksum files, with 
signatures and a key file that allows the various binary files to be 
validated. See, for example, 
http://releases.mozilla.org/pub/firefox/releases/45.0.1/


In the most recent release, at 
http://releases.mozilla.org/pub/firefox/releases/45.0.2/ , these files 
appear to be missing, making it impossible to validate the release files 
as authentic.


This seems to me to be a backwards step for Firefox distribution 
security. If this is an oversight, could it be remedied, please? If this 
is a deliberate change, could someone please provide a rationale for the 
changes?


Kind regards,

Neil Harris




___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: navigator.clipboard

2016-03-10 Thread Neil Deakin
The linked document seems only concerned with one usecase of the 
clipboard, that of adding a 'copy to clipboard' type button to a page, 
but doesn't address any other cases, namely the more common case of 
copy/paste using the browser UI (edit menu, keyboard shortcuts), for 
which the existing event driven model is more suited.


I don't think that having two separate APIs for each usage is a good 
idea. I think you want to make use of the DataTransfer object in the new 
APIs as well. For example:

let c = new ClipboardData(...);
...
clipboard.copy(c)

Having an asynchronous promise-based way of retrieving data is needed 
though, but is needed for all clipboard usage, as well as for 
drag-and-drop which also uses DataTransfer. I'd suggest instead to just 
add some additional methods to DataTransfer for this. I filed a bug 
recently (https://bugzilla.mozilla.org/show_bug.cgi?id=1221562) about this.


As an aside, in IE5 one could do:
window.clipboardData.setData("text/plain", "Data");

So the proposed syntax has some precedent.
Neil

On 2016-03-10 3:00 PM, Hallvord Reiar Michaelsen Steen wrote:

People kindly pointed out to me that the plain-text forwarded message
had lost the link to Lucas's draft. Here it is:
https://docs.google.com/document/d/1QI5rKJSiYeD9ekP2NyCYJuOnivduC9-tqEOn-GsCGS4/edit#

On Thu, Mar 10, 2016 at 3:57 PM, Hallvord Reiar Michaelsen Steen
<hst...@mozilla.com> wrote:

Hi dev-platform-people,
while editing the clipboard API spec [1] it's sometimes been suggested
to forget about the old slightly cranky API and start fresh. I haven't
had much response from implementors when such ideas came up on
public-webapps, but here's an interesting E-mail from Lucas Garron at
Google who has drafted a document that might turn into a spec for a
better clipboard API.

I've been allowed to circulate this and ask which developers at
Mozilla might want to be involved in giving feedback on and perhaps
eventually implement such a draft spec. See Lucas's E-mail and the
linked draft below.
-Hallvord

[1] https://w3c.github.io/clipboard-apis/


-- Forwarded message --
From: Lucas Garron <lgar...@google.com>
Date: Wed, Mar 9, 2016 at 4:16 AM
Subject: navigator.clipboard
To: hst...@mozilla.com
Cc: Daniel Cheng <dch...@google.com>


Hello Hallvord,

I'm a security engineer from Chrome who was slightly involved in
bringing text copying to the open web in Chrome. (Daniel Cheng, CCed,
did most of the hard work.)  After introducing copying, we punted on
the topic of image formats, pasting, and clipboard listening, but it
has recently come up again.

At this point, I'm strongly interested in exploring the possibility of
"getting things right" by introducing a fresh clipboard API, which I'm
tentatively referring to as "navigator.clipboard" (although
window.clipboard would be fine, too ;-).

I know that it can be a common fallacy to start over on part of the
web platform, but document.execCommand() has a *lot* of baggage from
its designMode origins and it seems you yourself have wondered whether
browsers should consider something else.
We're seeing is a mounting desire to support more clipboard features
on the open web, and I think now is the time to consider a
straightforward-to-use API that is asynchronous:
- We want to transcode image formats for security, but this would
block a synchronous API.
- Paste will require a permission prompt in Chrome, which is much more
straightforward for Promise-based API.

I've started a very drafty proposal, mostly focused on historical
context and reasons to start fresh.

Do you have time and interest in collaborating to adapting the
clipboard API spec to a fresh clipboard API?

There are teams at Google with an active interest (e.g. Chrome Remote
Desktop, Google Docs) in bringing clipboard paste/listening to the
open web whom I'd like to bring in to lead an effort from the Google
side, but I wanted to ask you early in the process.

Thanks,
»Lucas


___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: e10s tests

2016-01-26 Thread neil
On Tuesday, January 5, 2016 at 2:38:30 PM UTC-5, Felipe G wrote:
> (cross-posted to fx-dev and dev.platform)
> 
> As we drive towards shipping e10s, we are working on making sure that our
> tests work with e10s. As you already know, there's a number of tests that
> are disabled from running on e10s, and we need to enable them. We've
> created a spreadsheet that lists every test that is disabled from running
> on e10s in order to track the remaining work to do.
..

We've managed to enable a good number of tests in the last couple of weeks. 
Thanks to those who have looked at the disabled tests list and added comments 
or fixed tests:

https://docs.google.com/spreadsheets/d/10UeyRoiWV2HjkWwAU51HXyXAV7YLi4BjDm55mr5Xv6c/edit?pref=2=1#gid=0
  
Many tests still lack owners, or at least a mentor who could help someone else 
fix and/or enable the test. If a test shouldn't be enabled in e10s at all, 
please add a comment to the manifest file (such as mochitest.ini) indicating 
the reason.

browser-plain: many of these are under dom/

browser-chrome: good progress here. Several browser/ components need owners and 
work.

devtools tests: hundreds of tests here. The devtools team have assigned owners 
to these (thanks!) but I assume they will need lots of help.

I expanded the documentation at 
https://wiki.mozilla.org/Electrolysis/e10s_test_tips for browser-chrome tests. 
These tips describe utility functions that can help for converting existing 
tests and for writing new tests. This is based on a similar talk I gave during 
the last work week. I can help anyone with converting and enabling tests; if 
not, the rest of the e10s team will be happy to help with any test issues.

Neil
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Question: "Chrome file doesn't exist: ..." in |make mozmill| log by running DEBUG versions of C-C TB

2015-11-25 Thread Neil

ISHIKAWA,chiaki wrote:


Does anybody have an idea of the issue of

> 113 Chrome file doesn't exist: 
/NREF-COMM-CENTRAL/objdir-tb3/dist/bin/chrome/messenger/content/messenger/messengercompose/null 



"null" can't be right.


A test is probably trying to set the src of an image to null instead of 
a real source. (Perhaps it was trying to remove the src? Maybe null 
worked at one point.)


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: FYI: updating yasm on build machines

2015-11-20 Thread Neil

Chris Peterson wrote:


mozilla-build tools already use 1.3


When did it get upgraded? (My mozilla-build only has yasm 1.1)

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: How to stop the docShell to loading new URIs

2015-11-12 Thread Neil

Yonggang Luo wrote:


I opened a window and I don't hope it's loading anymore URIs into the docShell.
How to configure the docShell to do that.
 

I think you can associate an nsIURIContentListener with the docShell and 
then the listener can tell the docShell not to handle content. (Sorry 
but I don't have a convenient example.)


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Building js/xul/css from Firefox faster

2015-10-02 Thread Neil

Mike Hommey wrote:


 ./mach build faster


So is this the complete opposite of ./mach build binaries?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: CloseFile() latency on Windows

2015-09-29 Thread Neil

Gregory Szorc wrote:


Files are opened with _fopen() in "a+" mode if it matters. I can also repro in 
"a" mode.
 


...


Short of going full overlapped I/O

Overlapped I/O isn't supported for operations that change the valid data 
length of the file.

http://blogs.msdn.com/b/oldnewthing/archive/2011/09/23/10215586.aspx

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Changes in chrome JS code due to ES6 global lexical scope

2015-09-18 Thread Neil

Shu-yu Guo wrote:


Good catch and thanks for the correction! The take-home from the example is
that: due to the global lexical scope, a TDZ error could arise later due to
newly introduced bindings.


So for that I guess the code would have to look like this?


var x;
function f() { dump(x); }
f(); // prints undefined​
​


f(); // throws TDZ error?
​let x = 42;


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Changes in chrome JS code due to ES6 global lexical scope

2015-09-17 Thread Neil

Shu-yu Guo wrote:


4. The global lexical scope is extensible. This means dynamic scope (lol!):


function f() { dump(x); }
f(); // prints undefined​
​


​let x = 42;
f(); // prints 42


Would you mind clarifying what this is supposed to demonstrate? It looks 
to me that this is demonstrating TDZ semantics, and under ES6 the first 
call to f() will throw.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Alternative to Bonsai?

2015-09-15 Thread Neil

Joshua Cranmer  wrote:

There is no git or mercurial repository that contains the full history 
of mozilla CVS. Slightly unsurprising, since the full history of 
mozilla CVS actually breaks most conversion tools.


Even "CVS moved" files throw them a loop, I tried looking for blame for 
some code recently and got unstuck because of this.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Is there any events before loading a URL to a docshell.

2015-09-15 Thread Neil

Mike Conley wrote:


From the passed in nsIWebProgress[1], you should be able to get at the 
nsIDOMWindow, and from there, I *think* you can get to the nsIDocShell by 
QI'ing the nsIWebProgress to an nsIInterfaceRequestor and then GetInterface'ing 
nsIDocShell. I haven't tried this, but I'm reasonably certain it will work.



You could probably just QI the nsIWebProgress to nsIDocShell directly.

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: You can now freely mix declarations and statements in all Mozilla C code

2015-09-10 Thread Neil

Nicholas Nethercote wrote:


Therefore, 16 years later, you can now mix statements and declarations
freely in Mozilla C code.
 


We still have Mozilla C code?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: I think XUL overlays should also ignore query strings.

2015-08-16 Thread Neil

Philip Chee wrote:


The first question that occurs to me is what is the rationale? Can we revisit 
this in 2015 to see if the original reason still holds?

Back then ignoring the hash or the search were equally complicated; 
nowadays ignoring the hash is relatively easy.


Anne van Kesteren wrote:


Philip Chee wrote:
 


Can we revisit this in 2015 to see if the original reason still holds?
   


Well, we want to get rid of XUL. I'm not sure it makes much sense to revisit 
any of its design decisions at this point.


Then why don't you object to bug 1034999?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Fwd: mozilla::TemporaryRef is gone; please use already_AddRefed

2015-07-06 Thread Neil

Michael Layzell wrote:


In summary, the nsRefPtr is copied into a temporary in its side of the 
conditional. The nullptr is cast to a struct Foo*, which is constructed into a 
nsRefPtr, which is bound to a temporary, and then moved around a bit between 
temporaries. The resulting temporary xvalue then has the raw pointer extracted 
from it (which uses the rvalue-reference cast call - the part which is causing 
the problem), which is stored locally after the temporaries are destroyed. The 
temporaries which are created in the conditional are then destroyed, which 
causes a Release(), but that is OK because there was an AddRef due to the extra 
copy in the nsRefPtr branch.

So the ternary actually causes an unnecessary AddRef/Release pair, neat.


Neat as in Can we please have a static analysis to detect this please?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: mozilla::TemporaryRef is gone; please use already_AddRefed

2015-07-03 Thread Neil

Nathan Froyd wrote:


I guess we could fix this in current m-c to be smarter about the parameter passing, perhaps by declaring that 
ParameterStoragensCOMPtrT is StoreCopyPassByConstLRefnsCOMPtrT?  (Similarly 
for nsRefPtrT.)


So what's StorensRefPtrPassByPtr for?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: mozilla::TemporaryRef is gone; please use already_AddRefed

2015-07-03 Thread Neil

Aryeh Gregor wrote:


we still want a new type for function parameters that accepts implicit 
conversions from nsRefPtr/nsCOMPtr, to use instead of raw pointers.

Sure, but that won't stop someone from writing ArgFoo foo = 
ReturnFoo2(); will it?


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: mozilla::TemporaryRef is gone; please use already_AddRefed

2015-07-02 Thread Neil

Nathan Froyd wrote:


I tried this, fixed a few compilation errors, then decided this wasn't worth it 
just yet and threw my work into a bug.  Comments appreciated:

https://bugzilla.mozilla.org/show_bug.cgi?id=1179451
 


  1. It's because QueryInterface has to addref, so we can't directly
 pass the returned pointer. (But otherwise it's effectively the
 same as 4.)
  2. Ugh, standard MSVC optimisation doesn't compile an nsCOMPtr in a
 ternary at all well. (If my x86_64 is up to scratch then I think
 it creates an internal flag so it remembers which arm of the
 ternary was constructed.)
  3. Why isn't the const nsCOMPtrT converting to a T*? (There's too
 much indirection for my liking, so I can't work out which storage
 class is getting applied to the argument.)
  4. Maybe I'm confused, but isn't this the pattern we're trying to
 avoid so that we can remove already_AddRefed and use moves instead?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: mozilla::TemporaryRef is gone; please use already_AddRefed

2015-07-02 Thread Neil

Jeff Muizelaar wrote:


I believe this is predicated on removing the implicit conversion from 
nsRefPtrT to T*


Would you mind reminding me what the failure case this avoids is?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Intent to remove: support for old drag events

2015-06-09 Thread Neil Deakin
In bug 1162050, we'd like to remove support for the old non-standard 
drag events, which were left in for a period of compatibility.


The 'draggesture' event should be replaced with the 'dragstart' event 
(such as ondragstart)

The 'dragdrop' event should be replaced with the 'drop' event.

If you use these events, they are fired in the same manner as the 
standard events, so it should be a simple matter of searching and 
replacing the event names.


The non-standard dragexit event will remain as is, as it has no exact 
standard equivalent.


Firefox does not use these events in its code. I filed bug 1171979 for 
fixing this in Thunderbird and bug 1171980 for fixing this in Seamonkey.
If you use these events anywhere or you are the author of an add-on that 
uses these events, you will need to update your code as described above.


The standard drag and drop API is described at:

https://html.spec.whatwg.org/multipage/interaction.html#dnd
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Drag_and_drop

In addition, we would like to remove the long-deprecated 
nsDragAndDrop.js script located in toolkit/content in favour of the 
standard drag and drop API, described at the links above. To ease the 
transition, if necessary, you may wish to include this script ( 
https://dxr.mozilla.org/mozilla-central/source/toolkit/content/nsDragAndDrop.js 
) directly in your project.


Please respond if there are any concerns.

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT and add-on chrome

2015-06-09 Thread Neil

Boris Zbarsky wrote:

That said, it's pretty weird to me that we're exposing the entirety of 
chrome://browser like that.  Seems like we should scope it down.


You could move the relevant files (presumably the CSS for those about: 
pages) into a different package. (Thunderbird did that with its 
messagebody.css to avoid having to expose all of its chrome.)


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement and ship: document.execCommand(cut/copy)

2015-05-26 Thread Neil Deakin

On 2015-05-26 10:42 AM, Jesper Kristensen wrote:
It would be much faster if I could just present a Paste data or

Upload from clipboard button, which could load the data from the
clipboard directly into a JavaScript string without first trying to
render it. I feel that doing this by handling the paste event on a text
area would be a confusing user experience, since you would have a
visible text area that would not work when you type into it, and it
looks like you would see your text when you paste, but you won't. So I
believe I need to trigger the paste event when the user clicks a button
in order to do this.


Your use case is the intended use of the paste event and doesn't require 
a separate button.


The following, for example, pastes only the first letter of the text on 
the clipboard:


input onpaste=this.value = 
event.clipboardData.getData('text/plain')[0]; event.preventDefault()



What you can't do though is have two separate types of pastes, such as a 
normal Paste and a Paste Without Formatting type of option, although you 
could workaround this with a toggle that needs to be clicked first.



___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: NS_LITERAL_CSTRING

2015-05-17 Thread Neil
FYI The patch to make NS_LITERAL_CSTRING only work with string literals 
(and preprocessor macros that expand to string literals) has now been 
merged to mozilla-central.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Changing the style guide's preference for loose over strict equality checks in non-test code

2015-05-16 Thread Neil

Gijs Kruitbosch wrote:


On 14/05/2015 18:12, Martin Thomson wrote:

I have no idea what you are talking about.  I have never had cause to 
use new String() anywhere.  .toString() maybe.


There are more than 1000 hits for new String( in MXR, so our 
codebase disagrees.


Most if these are in JS conformance tests or Java source files. However 
NotificationDB.jsm should probably be fixed to use 
this.runningTask.defer.reject(String(err)); (or err.toString() if it works).


I do remember a case where I switched(!) some code from if (x == N) to 
use switch() instead and that stopped working because x was actually a 
string (from an attribute which was expected to have a numeric value).


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: NS_LITERAL_CSTRING

2015-04-28 Thread Neil

Ehsan Akhgari wrote:


On 2015-04-27 6:29 AM, Neil wrote:

I found the following in-tree examples, none of which would have 
worked with NS_LITERAL_STRING:


These are terrible!


But what should we replace them with?

  1. Change all of those static const char arrays back into #define
  2. Invent a new wrapper for static const char arrays
 (NS_TERMINATED_ARRAY?). Would such a string be marked as sharable?
  3. Something else?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


NS_LITERAL_CSTRING

2015-04-27 Thread Neil
NS_LITERAL_STRING, as its name suggests, only ever gets used on string 
literals, or macros that expand to string literals.


NS_LITERAL_CSTRING gets (ab?)used in all sorts of ways. Should we be 
consistent and require NS_LITERAL_CSTRING to be used on string literals? 
I found the following in-tree examples, none of which would have worked 
with NS_LITERAL_STRING:


static const char f00[] = f00;
F001(NS_LITERAL_CSTRING(f00));
NS_NAMED_LITERAL_CSTRING(f002, NS_LITERAL_CSTRING(F00));
templatesize_t N
void F003(const char (f00)[N])
{
 F003(NS_LITERAL_CSTRING(f00));
}
F004(NS_LITERAL_CSTRING(F00) + NS_LITERAL_CSTRING(f00));
NS_ConvertASCIItoUTF16 f005(NS_LITERAL_CSTRING(f00));
NS_NAMED_LITERAL_CSTRING(f006, f00);
f007.Assign(NS_LITERAL_CSTRING(f00));

When I tried enforcing string literals the compilers also tripped up 
over this line but it might be because of the way macros are expanded:

nsCString f008 = NS_LITERAL_CSTRING(__FUNCTION__);

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Excessive inbound bustage

2015-04-24 Thread Neil

Mike Hommey wrote:


the biggest number of changesets pushed by someone without a backout in the 
last 25271 changesets is 126.


But what's their Try usage like?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: PSA: moz_malloc, moz_realloc, moz_calloc and moz_free are no more

2015-03-31 Thread Neil

Mike Hommey wrote:


  1.

if you look for it, you'll find cases of one family used for allocation and 
another for deallocation, for possibly close to all combinations of families 
(NS_Alloc, nsMemory, moz_malloc, malloc, new).
 

It used to be that you didn't have to look very hard. (At one point I 
instrumented NS_Alloc(=nsMemory::Alloc), PR_Malloc, malloc and new, and 
filed several bugs on the mismatches I found, which means that Gecko 2 
wasn't too bad in this respect.)


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Propose to remove nsAString::AssignLiteral(const char (aStr)[N])

2015-03-02 Thread Neil

Xidorn Quan wrote:


The method name AssignLiteral can easily make people at the callee side think 
it makes the string point to a piece of static data, which has no runtime 
penalty. But this is false.
 

Actually nsACString::AssignLiteral used to copy too until I fixed it 
last year.



Hence I think we should remove this method. All callees should use either 
AssignLiteral(MOZ_UTF16(some string)), or, if don't want to bloat the binary, 
explicitly use AssignASCII(some string).

I already tried that, but AssignASCII takes a const char* parameter 
which has an implicit conversion from a string literal thus making it 
impossible to overload with a template. I do have a patch somewhere that 
changes most of the tree to use AssignLiteral(MOZ_UTF16()) if you're 
interested.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: HTTP/2 and User-Agent strings?

2015-01-28 Thread Neil

Aryeh Gregor wrote:


I remember one particular bug in Firefox (which was only fixed years later) that I 
spent considerable effort trying to figure out how to work around without a UA string 
check, and eventually gave up.  It was something like: if you append #foo to the URL 
while the page is loading in order to jump to span id=foo, but that element 
has not yet loaded when you set the URL, every other browser would jump to the 
element when it was added to the DOM, but Gecko would not.

(I ended up fixing this because I fixed a very similar bug with the MSDN 
blogs, however that case was slightly different in that they linked 
directly to #foo but the element was created dynamically after the 
DOMContentLoaded event. My fix then caused a regression whose fix then 
incidentally fixed Aryeh's bug, almost exactly 5 years after he filed it.)


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Good ways to view Firefox compile errors in a terminal?

2015-01-14 Thread Neil

Nathan Froyd wrote:


Use the second cd command so mach is invoked from the correct directory.
 


Absolute path to mach doesn't work?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: PSA: Support for building with Windows SDK 8.1 removed from Gecko 37

2015-01-09 Thread Neil

Joshua Cranmer  wrote:


On 1/8/2015 10:05 AM, Mike Hoye wrote:

I'm revisiting our docs in light of this to figure out what our real 
minimum hardware/ram/disk requirements are. The temptation to start 
adding If you try to build Firefox with 2 gigs of RAM, you're gonna 
have a bad time memes to the docs is severe.


One of my machines is a 2-core, 2GB machine. I've built Firefox on it 
somewhat recently (~months), but that is without optimization or debug 
symbols. IIRC, it failed to build in debug + debug symbols, but that 
was last tried before we supported debug symbol fission or unified 
file compilation.


2GB builds, although I expect it's on the slow side. 1GB isn't enough 
though, unless you enable shared gkmedias and js (and shared js builds 
are broken anyway because we don't link to js when we should).


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Dropping support for MSVC2012

2015-01-06 Thread Neil

Ted Mielczarek wrote:


Especially with something like MSVC, where some contributors have actually paid 
for Pro versions of the suite and telling them to upgrade involves spending 
actual money that can be a huge deterrent.
 

That's unfortunate since the professional VC2005, VC2008, VC2010 and now 
VC2013 compilers were always freely available, it was just the IDE that 
you had to pay for (or use the cut-down Express version which didn't 
include e.g. the just-in-time debugger or the SDK (which was freely 
available anyway)).


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: PSA: Support for Visual C++ 2010 has been dropped

2014-12-19 Thread Neil

Neil wrote:


Neil wrote:


Mike Hommey wrote:


On Wed, Dec 17, 2014 at 06:06:25PM +, Neil wrote:

I downloaded the MSVC 2013 Community Edition, but there was no sign 
of an SDK, so I downloaded that separately. Is this expected? If 
so, I'll update MDN.


The SDK comes with it.


So you say, but it wasn't there (no windows.h).


My bad, I looked in /include/, but apparently these days it's in /um/.


(Somewhat strange that mozillabuild didn't find it either; having 
installed and now uninstalled the SDK it still finds it. Go figure.)


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: PSA: Support for Visual C++ 2010 has been dropped

2014-12-18 Thread Neil

Mike Hommey wrote:


On Wed, Dec 17, 2014 at 06:06:25PM +, Neil wrote:
 


Ehsan Akhgari wrote:


MSVC 2012 and 2013 can still be used to build Firefox on Windows.


I downloaded the MSVC 2013 Community Edition, but there was no sign of an SDK, 
so I downloaded that separately. Is this expected? If so, I'll update MDN.
   


The SDK comes with it.
 


So you say, but it wasn't there (no windows.h).

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: PSA: Support for Visual C++ 2010 has been dropped

2014-12-17 Thread Neil

Ehsan Akhgari wrote:


MSVC 2012 and 2013 can still be used to build Firefox on Windows.
 

I downloaded the MSVC 2013 Community Edition, but there was no sign of 
an SDK, so I downloaded that separately. Is this expected? If so, I'll 
update MDN.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: prebuilt libraries?

2014-11-28 Thread Neil

Gregory Szorc wrote:


Please read http://www.conifersystems.com/whitepapers/gnu-make/.


after a command fails, |make| does not delete the partially built 
output file


.DELETE_ON_ERROR was added to address this.

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: New chrome-only API to inject content on top of the page

2014-10-29 Thread Neil

Patrick Brosset wrote:

The discussion [2] that led to the bug was about finding a solution to 
display the devtools highlighter (the box-model overlay you see when 
inspecting a page with the devtools) in a way that would work on 
anything that runs gecko (indeed, prior to this bug, the devtools 
highlighter markup would be appended to one of the page's parent XUL 
node, which didn't work on B2G or Fennec, or with e10s enabled).


What's going to happen to the :-moz-devtools-highlighted pseudoclass?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Switching to Visual Studio 2013

2014-10-22 Thread Neil

Mike Hommey wrote:


note that the express version requires to be registered, now.
 

Technically that's only true if you want to build or debug using Visual 
Studio rather than the command-line tools, but that's still a pain.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: The worst piece of Mozilla code

2014-10-17 Thread Neil

Nicholas Nethercote wrote:


I was wondering what people think is the worst piece of code in the entire Mozilla codebase. I'll 
leave the exact meanings of worst and piece of code unspecified...

When you get time, find someone to tell you about Morse code. (No, I 
don't mean Samuel.)


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: The worst piece of Mozilla code

2014-10-17 Thread Neil

Ehsan Akhgari wrote:

Speaking about code that causes correctness bugs that actually affect 
our end users, the best example that I know is editor/.


Not just correctness, but the unique way it use pointers to nsCOMPtr all 
over...


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: The worst piece of Mozilla code

2014-10-17 Thread Neil

Mike Hoye wrote:

I mean, if you find somebody in their office today curled up in a 
ball, rocking back and forth and muttering mork, mork, mork over and 
over again, that person's having a bad flashback. Call for help, stay 
with them. Tell them we've got sqlite now and it's going to be OK.


Those are different use cases; mork did synchronous C++ arbitrary key 
value store very well 15 years ago, as long as you were prepared to 
flush the file on the main thread. (I guess OS.writeAtomic and JSON get 
you there for JS these days.)


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Compiler version expectations

2014-10-17 Thread Neil

Syd Polk wrote:


Does MSVC 2013 run on Windows XP? We still support Win XP for the browser; do 
we support building on it?
 

You can't create a stock build on XP since the latest SDK is 7.1 and the 
gamepad code needs 8.0 and the DirectX code would like it too.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Using __declspec(thread) on Windows

2014-10-17 Thread Neil

Robert O'Callahan wrote:


I assume no-one's finding the Firefox libxul.dll and loading it from their own 
.EXE
 

I assume people are finding the XULRunner libxul.dll and loading it from 
their own .EXE


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Moratorium on new XUL features

2014-10-16 Thread Neil

Boris Zbarsky wrote:

The situation is that we have a bunch of unmaintained code that 
complicates layout.


Out of interest, what does it do that complicates layout? You mentioned 
the box model of course, but what else is there?


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Breakdown of Firefox full installer

2014-10-15 Thread Neil

Robert Strong wrote:


Another example, if the omni.jar is not compressed the installer can compress 
it about as well as if they were individual files and the minimal compression 
currently used by omni.jar makes it so the installer is not able to compress 
the omni.jar nearly as well which increases the installer size.

As I recall we used to do this but it turns out that the size of the 
omni.jar itself is a large factor on startup performance - the time 
saved by reading less data from disk far outweighs the time spent 
decompressing it.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Breakdown of Firefox full installer

2014-10-15 Thread Neil

Gregory Szorc wrote:

If you treat all files from those two archives as a single compression 
context


Aha, this was the bit I was overlooking. Sorry for the confusion.

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Breakdown of Firefox full installer

2014-10-14 Thread Neil

Gregory Szorc wrote:

If you are looking for ideas on how to reduce download size, the way 
omni.ja is included in the installer could be reduced by 4+ MB. Both 
omni.ja and browser/omni.ja are zip archives, where each file has a 
separate compression context. If you treat all files from those two 
archives as a single compression context (like tar+bz2) and stuff them 
in a single archive, you get size reductions of 4+ MB due to the 
compression engine sharing state between files. We can't install 
omni.ja like this on client systems because it is bad for performance 
(we want the ability to extract individual files without reading a 
large compression context - this is a benefit of the zip format). But 
we could ship the files optimized for size (or have installer's 
compression handle the files individually) and have the installer 
re-encode them to omni.ja so they are optimized for performance.


I'm not sure what you're trying to say here. As far as I can see what 
you're suggesting is using some RAR-like rather than ZIP-like format for 
the installer. Why would the way you're compressing the two omni.ja 
files into the installer affect the installed omni.ja files?


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Xulrunner standalone application auto update stopped working

2014-10-06 Thread Neil

Manish wrote:


Also we came across this error on console:

Error: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 
(NS_ERROR_FAILURE) [nsIStringBundle.GetStringFromName]
Source File: XStringBundle
Line: 21
 


If you had a debug build you could try setting a breakpoint here:
http://mxr.mozilla.org/mozilla-release/source/intl/strres/src/nsStringBundle.cpp#219
aName would contain the missing string name, or you could call 
DumpJSStack() to find the caller.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Using c++11 right angle bracket in template code?

2014-10-06 Thread Neil

Trevor Saunders wrote:


for (auto l = tarray.Length() - 1; l  tarray.Length(); l--)

Which is how you'd iterate backwards over a non empty array.


for (auto l = tarray.Length(); l--  0; )

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Using c++11 right angle bracket in template code?

2014-10-06 Thread Neil

Ehsan Akhgari wrote:

The usage of the iterator object which can also store state allows you 
to check for that exact pattern, so arguably you won't lose anything 
using range-based for loops if we added a good iterator implementation 
to nsTArray that checks for mutations.


If you need to check for mutations then you should be using 
nsTObserverArray, which specifically supports iterators that are stable 
even if the array is modified during iteration.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Why does nsWindowMediator have a lock?

2014-10-06 Thread Neil

Josh Matthews wrote:

As far as I can tell, nsWindowMediator::mListLock protects 
mOldestWindow and mTopmostWindow. However, the only direct users of 
nsWindowMediator are the enumerators in 
nsAppShellWindowEnumerator.cpp, and all uses of nsIWindowMediator that 
I could find appear to be in JS (ie. on the main thread) or don't look 
like C++ that runs off the main thread (nsPluginHost and 
ApplicationAccessible seem like the most likely candidates for that to 
be false). Am I missing something? It doesn't appear to be providing 
any benefit here.


Seems to have been added by 
http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/xpfe/appshell/src/nsWindowMediator.cpprev=1.26 
and not actually reviewed as such ;-)


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: PSA: ./mach build subdirectory doesn't work reliably any longer

2014-09-04 Thread Neil

Mike Hommey wrote:


I guess this comes from installing test files.
 

Is there a build target that just installs installable files? (Although 
presumably unless you're using Windows they should probably be symlinks 
in which case you don't need to reinstall them.)


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Upcoming changes to autocomplete code affecting Thunderbird

2014-08-27 Thread Neil

Paolo Amadini wrote:


The first changes to autocomplete will land in the next few weeks.
 


So do you have some bug numbers you can quote us?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Switching to Visual Studio 2013

2014-08-23 Thread Neil

David Major wrote:


* No more linker OOM crashes. VS2013 includes a 64-bit toolchain for 32-bit 
builds, so the linker will no longer be limited to 4GB address space.


So will you be requiring 64-bit builders?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Running mochitests from a copy of the objdir?

2014-08-20 Thread Neil

Gregory Szorc wrote:


Well, mach seems to be working for people doing m-c development.


[Still needs a working build environment, while python runtests.py just 
used to need an objdir.]


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Running mochitests from a copy of the objdir?

2014-08-20 Thread Neil

Neil wrote:


Gregory Szorc wrote:


Well, mach seems to be working for people doing m-c development.


[Still needs a working build environment, while python runtests.py 
just used to need an objdir.]


In fact there was a time where I could cross-compile and copy the objdir 
onto the target OS and run tests.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Running mochitests from a copy of the objdir?

2014-08-20 Thread Neil

Ted Mielczarek wrote:


our supported use cases are run from mach and run from the test package.
 

How does a test package differ from an objdir? Do you still need an 
entire build environment to run a test package?


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Running mochitests from a copy of the objdir?

2014-08-20 Thread Neil

Ted Mielczarek wrote:


it requires you to specify all of the relevant options.
 


And where are these options documented?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Running mochitests from a copy of the objdir?

2014-08-19 Thread Neil

Gregory Szorc wrote:


On 8/18/2014 4:45 PM, Neil wrote:
 


Time was that you could just python runtests.py to run mochitests.

Then we needed modules that you don't get in the default python, so you had to 
invoke python from the virtualenv instead.

Now that doesn't work either, because it's trying to run .mozconfig, so my 
questions are a) why and b) how do I stop it? (I found --binary but that didn't 
seem to be enough on its own.)
   


Can you please describe your workflow

It's quite simple: python runtests.py had all the right defaults for me, 
while the Makefile targets pass a bunch of parameters that I don't want, 
and mach doesn't work in comm-central yet, so I don't know how badly 
that would work out.



(as opposed to giving you hints on how to subtly hack around the existing 
implementation)


I'd prefer hints on how to fix the build system, but I'll take hacks too.

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Running mochitests from a copy of the objdir?

2014-08-19 Thread Neil

Gregory Szorc wrote:

I think the underlying bug here is mach mochitest doesn't work for 
comm-central. It should. I'm sure there is a bug on file somewhere.


Fair enough, but for when it does work, what's the mach version of 
python runtests.py?


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Running mochitests from a copy of the objdir?

2014-08-19 Thread Neil

Jonathan Griffin wrote:


Can you show us the command-line you're using?


../path/to/python runtests.py

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Running mochitests from a copy of the objdir?

2014-08-19 Thread Neil

Gregory Szorc wrote:


On 8/19/14 2:11 PM, Neil wrote:


Gregory Szorc wrote:


I think the underlying bug here is mach mochitest doesn't work for
comm-central. It should. I'm sure there is a bug on file somewhere.


Fair enough, but for when it does work, what's the mach version of 
python runtests.py?


mach mochitest? mach mochitest-plain?

Under the scenes mach is using straight Python to construct the 
mochitest harness/runner and invoke it directly. No extra processes 
necessary.


You can run |mach mach-debug-commands| to locate where each command is 
defined in source. Or, load 
https://hg.mozilla.org/mozilla-central/file/149d3ce6e020/testing/mochitest/mach_commands.py 
for the mochitest commands.


Right, but 
http://hg.mozilla.org/mozilla-central/file/149d3ce6e020/testing/mochitest/mach_commands.py#l290 
suggests that the mach defaults aren't the same as the runtest.py 
defaults, which are the ones that I want.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Exporting user configurations

2014-08-18 Thread Neil

Nicholas Nethercote wrote:


One of the commenters made an interesting suggestion: some kind of about:config 
export tool that would make it easier for Firefox devs to reproduce these kinds 
of problems.
 

The profile prefs.js only contains the modified preferences, if that's 
all you need.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Running mochitests from a copy of the objdir?

2014-08-18 Thread Neil

Time was that you could just python runtests.py to run mochitests.

Then we needed modules that you don't get in the default python, so you 
had to invoke python from the virtualenv instead.


Now that doesn't work either, because it's trying to run .mozconfig, so 
my questions are a) why and b) how do I stop it? (I found --binary but 
that didn't seem to be enough on its own.)


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Upcoming changes to autocomplete code affecting Thunderbird

2014-08-15 Thread Neil

Paolo Amadini wrote:


It soon became apparent that most of the autocomplete code was designed for 
synchronous operation

Synchronous operation of what? Autocomplete works like this: You ask for 
some results; some time later, you get some results. How could that be 
less synchronous?



In fact, a search on the mozilla-central [2] and comm-central [3] repositories 
shows that this shared autocomplete code is only used on Desktop by Firefox and 
Thunderbird, while SeaMonkey uses the older XPFE autocomplete.

More precisely, most* of SeaMonkey's UI uses the XPFE-based autocomplete 
binding. Well, I say XPFE-based; all of the old XPFE interfaces were 
removed long ago. It's basically equivalent to the Toolkit autocomplete 
binding (nsIAutoCompleteInput) plus the additional functionality of 
nsIAutoCompleteController. It also has its own autocomplete popup, but 
the rest is shared with Toolkit. SeaMonkey and Thunderbird do of course 
provide additional nsIAutoCompleteSearch implementations (addrbook gloda 
ldap mydomain news) above those provided by Toolkit (file form-history 
history places-tag-autocomplete search-autocomplete) which Thunderbird 
does not use (except possibly it could provide form history in its 
content tabs, but I have no idea whether that actually works or not). It 
possible that extensions use autocomplete too (DOM Inspector offers file 
and history autocomplete it in its URL bar for instance).



The major change would be the removal of the multiple search sources from the 
autocomplete code, since this feature is used heavily by Thunderbird.

When the code to provide web page autocomplete suggestions was added, it 
was done so in a really hacky way by creating an autocomplete component 
which called another autocomplete component and then merged the results 
together. If only someone had had the idea of using multiple search 
sources. I guess it's too late now.


*SeaMonkey's search bar uses toolkit's autocomplete widget but 
SeaMonkey's popup.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Getting rid of already_AddRefed?

2014-08-14 Thread Neil

Aryeh Gregor wrote:


for instance, here's a real-world bit of code from nsWSRunObject:

 if ((aRun-mRightType  WSType::block) 
 IsBlockNode(nsCOMPtrnsINode(GetWSBoundingParent( {

GetWSBoundingParent() returns an already_AddRefednsINode

Well there's your problem: GetWSBoundingParent doesn't need to own the 
nodes it works on. This is what it should do:


nsINode*
nsWSRunObject::GetWSBoundingParent()
{
 NS_ENSURE_TRUE(mNode, nullptr);
 nsINode* wsBoundingParent = mNode;
 while (!IsBlockNode(wsBoundingParent)) {
   nsINode* parent = wsBoundingParent-GetParentNode();
   if (!parent || !mHTMLEditor-IsEditable(parent)) {
 break;
   }
   wsBoundingParent = parent;
 }
 return wsBoundingParent;
}

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Getting rid of already_AddRefed?

2014-08-13 Thread Neil

Karl Tomlinson wrote:


Aryeh Gregor writes:


The compiler is required to use the move constructor (if one exists) instead of 
the copy constructor when constructing the return value of a function, and also 
when initializing an object from the return value of a function, or assigning 
the return value of a function.  So if you have

 Foo GetFoo() { Foo f(1, 2, 7); /* do lots of stuff to f */ return f; }
 void MyFunction() { Foo f = GetFoo(); }

the copy constructor of Foo will not get called anywhere.
   


I guess that means that with

 struct Bar {
   Bar(Foo f) : mF(f) {}
   Foo GetFoo() { return mF; }

   Foo mF;
 }

GetFoo() would give away what mF owns?

If so, can we require that be more explicit somehow?
 


No, Aryeh's comment only applies to local variables.

Foo GetFoo()
{
   Foo f1, f2;
   if (rand() % 2)
 return f2;
   return f1;
}

Here C++03 compilers may find it hard to do NRVO because we're returning 
different locals. But when a C++11 compiler tries and fails to do NRVO, 
it then tries the move constructor.


Note that using ? : in this case does not work, since that results in a 
Foo which therefore gets copy constructed. See 
http://stackoverflow.com/a/19698477


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Getting rid of already_AddRefed?

2014-08-12 Thread Neil

Aryeh Gregor wrote:


2) It's easier to use, as evidenced by the patches in bugs 1015114 and 1052477. 
 No .forget() is needed, a raw pointer can be returned directly, even things 
like do_QueryInterface can be returned directly without a temporary nsCOMPtr 
(since the return type creates the temporary for you).  You can just return 
whatever you like and the compiler will figure out if an addref is needed.  
There's a noticeable decrease in LoC when converting to use it.


Do you have to name the temporary nsCOMPtr? For example, in the code
   nsCOMPtrnsIAtom atom = GetAtomValue()
   return atom.forget();
Can this be rewritten to
   return nsCOMPtrnsIAtom(GetAtomValue()).forget();
Or better still, if this counts as an rvalue, can we define a move 
constructor from nsCOMPtrT and write

   return nsCOMPtrnsIAtom(GetAtomValue());

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Introducing mozilla::UniquePtr and mozilla::MakeUnique for |new T| and |new T[]| resources

2014-08-01 Thread Neil

Jeff Walden wrote:


Additionally, UniquePtr is best used by threading it through interfaces, beyond just 
immediate use sites.  Rather than returning a raw pointer, code should return UniquePtr 
instead.  Rather than extracting a raw pointer to pass to a method, code should pass 
Move(ptr) instead, and that argument should be a UniquePtr.

Only UniquePtr's own copy and assignment operators should take 
UniquePtr. Other call sites should either take const UniquePtr (if 
they will not take ownership of the pointer), UniquePtr (if they may or 
may not need to take ownership of the pointer) or UniquePtr (if they 
will take ownership of the pointer).


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: I want to implement a ListBox that contains one million(1, 000, 000) custom vbox, how to speed it up.

2014-08-01 Thread Neil

Paul Rouget wrote:


Yonggang Luo wrote:
 


The vbox's content comes from a large database.

Is there any standard way to implement it
   


A xul listbox? You probably want to use a treeview.
It's designed for such use cases.
 


Doesn't help if he needs a custom vbox.

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: I was creating a XUL application and want to enable a bunch of extensions at the first startup,

2014-07-31 Thread Neil

Yonggang Luo wrote:


How to do that?

I want to do it programmatically, such as by using Javascript code.
 

The extensions.autoDisableScopes application preference controls the 
first startup state of extensions, so you can set it to a value 
convenient for your application.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: TOOL_DIRS, TEST_TOOL_DIRS and PARALLEL_DIRS are no more

2014-07-31 Thread Neil

Mike Hommey wrote:


- TOOL_DIRS
 

Does that mean that the tools tier is no more? How do you get something 
done after jar.mn processing?


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


e10s startup?

2014-07-29 Thread Neil
How do toolkit components in content processes start themselves up, does 
it all have to be done through content scripts loaded by the message 
manager?


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to Transition from TBPL to Treeherder

2014-07-23 Thread Neil
I get a slow script warning in my unoptimised nondebug build when the 
page first loads :\


IMHO closing the detail pane should unhighlight the build.

Boris Zbarsky wrote:

3)  The revision id is linkified, but clicking it just focuses the 
corresponding push in treeherder.  Can I get links to the actual 
changesets somehow?


I think the arrow to the right of the revision is supposed to achieve 
this. I'm not sure what the point of the link itself is, or where it's 
documented.


6)  The lack of a clear and obvious is the tree open? indicator is a 
bit annoying.


There is a clear indicator, but it's not obvious. (It's to the left of 
the tree name.)


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Deprecating localstore.rdf

2014-07-23 Thread Neil

Mike Hommey wrote:


Who would object to less use of the rdf code?
 


Especially as you get to reinvent each replacement independently!

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Windows 7 Program Compatibility Assistant

2014-07-20 Thread Neil
Recently I've found that configure has started to fail horribly often 
(i.e. most of the time) because of an inability to create conftest.exe, 
and I know that other people have been having issues with configure 
failing too.


Previously we've been blaming antivirus software and/or Windows Search 
for doing this, but I've already tried turning them off to no avail.


Annoyingly Processs Monitor has the effect of slowing down configure 
sufficiently to make the problem intermittent, but I've been catching 
the netsvcs service opening a handle to conftest.exe with delete 
sharing, so that although rm thinks that it's removed conftest.exe 
Windows is still waiting for netsvcs to close it before it really goes 
away and the next one can be created.


Most of the services hosted by netsvcs look mundane but the Application 
Compatibility service looked suspicious, so I tried to stop it.


This was a bad move as this service controls the UAC prompts, so I was 
unable to launch Process Monitor, but the configure completed anyway, 
which was a good sign.


After rebooting my PC I then researched the service and found that it 
contains several components, some of which can be disabled. In 
particular I have tried disabling the Application Compatibility Engine 
and the Program Compatibility Assistant through gpedit.msc 
(Administrative Templates\Windows Components\Application Compatibility) 
and so far have not had any problems running configure.


Apparently these settings can also increase the chances of success of an 
rm -rf of a large folder.


There is a way to exclude the Program Compatibility Assistant on a 
case-by-case basis but this would either require that conftest.exe 
always be linked with a limited user manifest (tricky as this would need 
to apply to third-party configures) or that all possible paths to 
conftest.exe be listed in the registry (you would need to cover all 
subconfigures in all objdirs).


As yet I have not tried disabling the two compatibility settings 
separately to see which one is responsible, or whether both are needed.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Windows 7 Program Compatibility Assistant

2014-07-20 Thread Neil

Neil wrote:

I have tried disabling the Application Compatibility Engine and the 
Program Compatibility Assistant through gpedit.msc (Administrative 
Templates\Windows Components\Application Compatibility) and so far 
have not had any problems running configure.


As yet I have not tried disabling the two compatibility settings 
separately to see which one is responsible, or whether both are needed.


The Program Compatibility Assistant seems to have no effect, but as soon 
as I turned the Application Compatibility Engine back on then my 
configures started failing.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: PSA: Refcounted classes should have a non-public destructor should be MOZ_FINAL where possible

2014-07-10 Thread Neil

Daniel Holbert wrote:


(a) Your class should have an explicitly-declared non-public destructor. 
(should be 'private' or 'protected')
 

Except for refcounted base classes (which as you note need to have a 
protected virtual destructor), is there a correct style as to whether 
the destructor should be private or protected and virtual or nonvirtual?



First, if your class is abstract, then it shouldn't have AddRef/Release 
implementations to begin with.  Those belong on the concrete subclasses -- not 
on your abstract base class.

What's correct code for abstract class Foo (implementing interfaces 
IFoo1 and IFoo2) with derived classes Bar and Baz (implementing 
interfaces IBar1 and IBar2 or IBaz1 and IBaz2 respectively)?


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Reordering opened windows

2014-07-06 Thread Neil

David Rajchenbach-Teller wrote:


We are considering redesigning slightly how windows are reopened by Session 
Restore, to ensure that most recently used windows are loaded first.
 

I can't quite tell from your phrasing whether the bottleneck here is the 
time it takes to open windows. I'm assuming it is, and that Session 
Restore has to wait for all the windows to open so that it can 
prioritise loading the most recent window first.


Since Session Restore already knows things such as the size and position 
of the window it wants to restore, I'm wondering whether it might it be 
possible to open the windows to about:blank and then start loading 
browser.xul in the most recent window first. (Obviously this only helps 
if there are three or more windows to restore, since you have to have 
loaded browser.xul in the first window to know you want to restore the 
previous session.)


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Are you interested in doing dynamic analysis of JS code?

2014-07-01 Thread Neil

Fitzgerald, Nick wrote:

Honza and the Firebug folks have been asking for something like this 
for a while, and they can't completely remove dependency on the old 
debugger API until there is a replacement.


https://bugzilla.mozilla.org/show_bug.cgi?id=797876


JSD1 just got removed in bug 800200, or does not include the profiler?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: DOMMatrix

2014-06-08 Thread Neil

Benoit Jacob wrote:


Strawman class diagram:

 Transformation
 /  |  \
/   |   \
   /|\
  / | \
Identity   MatrixOther transform types
  e.g. Translation
 

In such a world, the class containing the word Matrix in its name 
would not have a isIdentity() method; and for use cases where having a 
variant type that can avoid being a full blown matrix is meaningful, 
we would have such a variant type, like Transformation in the above 
diagram, and the isIdentity() method there would be merely asking the 
variant type for its type field.


I think roc suggested the possibility of something similar i.e.

   Transformation
   /  |  \
  /   |   \
 /|\
/ | \
Identity   2DMatrix   3DMatrix

Then from JS you would just write (matrix instanceof Identity). I don't 
know whether this would make the implementation unduly complex though.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: DOMMatrix

2014-06-06 Thread Neil

Rik Cabanier wrote:


1. isIdentity()
We settled that this should mean that the matrix was never changed to a non 
identity state.


Are you doing something similar for the 2d/3d case?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: DOMMatrix

2014-06-04 Thread Neil

Dirk Schulze wrote:


There was an argument that:

if (matrix.isInvertible())
matrix.invert();

would force UAs to compute the determinant twice. Actually, UAs can be very 
smart about that. The determinant is a simple double. It can be stored and 
invalidated as needed internally. (If it even turns out to be an issue.)

Maybe not even invalidated, but just kept up-to-date (e.g. determinant 
of product = product of determinants)?


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: bugzilla can now show bugs that have been updated since you last visited them

2014-06-04 Thread Neil

Byron Jones wrote:

thanks to dylan's work on bug 489028, bugzilla now tracks when you 
view a bug, allowing you to search for bugs which have been updated 
since you last visited them.


I shared a basic search which I call Unseen Changes.

I was slightly disappointed that I couldn't search for bugs to which 
I've only commented.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Intent to implement: DOMMatrix

2014-06-03 Thread Neil

Rik Cabanier wrote:


Still up for discussion:
- rename isIdentity

My understanding is that you want to use isIdentity/is2D as an 
optimisation for known classes of matrix, and what you're really 
interested in is if the matrix has had any 2D or 3D transforms applied 
to it, even if those transforms should mathematically cancel each other 
out. (Which is fair enough.) This leads me to think that you could call 
the properties isTransformed and isTransformed3D. Presumably only new 
DOMMatrix() and new DOMMatrix().multiply(new DOMMatrix()) (and other 
similarly trivial constructs) will return a matrix where isTransformed 
is false.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Standardized assertion methods

2014-06-02 Thread Neil

Mike de Boer wrote:


 * do_check_eq(a, b) — equal(a, b)


There's also strictEqual(a, b) for those like me who were wondering.

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: nsRefPtr vs RefPtr

2014-05-13 Thread Neil

Brian Smith wrote:


On Mon, May 12, 2014 at 9:36 AM, Kyle Huey m...@kylehuey.com wrote:


We should get rid of RefPtr, just like we did the MFBT refcounting classes.

The main thing stopping a mechanical search and replace is that the two smart 
pointers have different semantics around already_AddRefed/TemporaryRef :(
   


Nit: Aren't the TemporaryRef semantics better? Seems like replacing 
RefPtr-based stuff's use of RefPtr with nsRefPtr would be be making things at 
least slightly worse here.


Wouldn't nsRefPtr semantics be better still?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Callback from xpcom c++ in multi thread scenerio

2014-05-02 Thread Neil

lukaszb wrote:


Basicly idea is easy from javascript we call db wrapper with take function (callback) 
as argument (that function implement xpidl interface with scriptable and function annotations), in 
db wrapper component we run thread where real database connection exists and fetch 
data, then we join to main thread and return result by callback (mentioned above). BUT application 
crash after calling callback (now there is now proxies api) and I assume that callback i collected 
by collected by javascript GC. (When all happens only in main thread then all it's ok).

Strangely enough I recently fixed a similar-looking problem in 
Thunderbird. There the problem was that the callback was being released 
on the database thread instead of the main thread.


You could of course be extremely careful with your references so that 
your callback never gets released on the database thread. Alternatively, 
these classes make it trivial for you: 
http://mxr.mozilla.org/mozilla-central/source/xpcom/glue/nsProxyRelease.h#67


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: PSA: NS_IMPL_ISUPPORTS and friends are now variadic

2014-04-28 Thread Neil

Birunthan Mohanathas wrote:


Note that due to technical details, the new macros will reject uses with zero 
variadic arguments. In such cases, you will want to continue to use the 
zero-numbered macro, e.g. NS_IMPL_ISUPPORTS0(nsFoo).
 

I can't help wondering who would need to implement only nsISupports. It 
can't be for the refcounting, because you can just use inline 
refcounting. And you've got no way of telling whether an arbitrary 
nsISupports is your object or not.


For example, nsMemoryReporterManager creates an object, hands it out, 
and assumes the one it got back was the one it handed out. (I picked 
that as an easy example that could technically be written safely using 
an nsSupportsPRInt64.)


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: People building and debugging Firefox on Windows wanted

2014-04-24 Thread Neil

Mike Hommey wrote:


   mk_add_options export MOZ_DEBUG_FLAGS=-Z7


-Z7 is faster than -Zi?

Do VS2013 users need to turn off -FS?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: ASSERTION: bad size recorded: 'aInstanceSize == 0 || entry-GetClassSize() == aInstanceSize

2014-04-19 Thread Neil

Kyle Huey wrote:


On Fri, Apr 18, 2014 at 4:56 PM, Neil n...@parkwaycc.co.uk wrote:
 


One of our compilers complains if you try to define something in a different 
namespace to the one in which you declared it, so the NS_IMPL_ macros need to 
be in the same namespace as the class.


I believe using declarations and top-level use of the macros works fine.
 

It turns out that the something that it complains about is a template 
specialisation. Other things do, as you suggest, work fine.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: ASSERTION: bad size recorded: 'aInstanceSize == 0 || entry-GetClassSize() == aInstanceSize

2014-04-18 Thread Neil

L. David Baron wrote:


Classes that use the NS_IMPL_ISUPPORTSn or NS_IMPL_ADDREF + NS_IMPL_RELEASE 
macros should use the fully qualified class name and not depend on being inside 
namespace declarations.
 

One of our compilers complains if you try to define something in a 
different namespace to the one in which you declared it, so the NS_IMPL_ 
macros need to be in the same namespace as the class.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Is there any replacement for Domain Policy in CAPS ( Bug 913734 )

2014-04-15 Thread Neil

xunxun wrote:


于 2014/4/15 星期二 6:46, Neil 写道:


xunxun wrote:


For example, I use the policy by default on my custom build:

pref(capability.policy.policynames, pcxnojs);
pref(capability.policy.pcxnojs.sites, http://nsclick.baidu.com;);
pref(capability.policy.pcxnojs.javascript.enabled, noAccess);

nsclick.baidu.com can cause firefox tab closing costs too much time, 
so I use the policy to avoid it.


Can you not use the content blocker to block scripts from 
nsclick.baidu.com? (I don't know what UI Firefox has for it, I 
normally use the Data Manager. I've successfully blocked Facebook and 
Twitter for example.)


I don't know what is the Data Manager, is it this : 
https://addons.mozilla.org/en-US/firefox/addon/data-manager/ ?


But I don't want to solve the problem using an extension, because I 
only want to block nsclick.baidu.com --- only one domain.


That extension is the only way I know offhand of configuring the content 
blocker, but that doesn't mean that it's the only way, and you can also 
uninstall the extension when you've finished configuring, as the setting 
is stored separately.


--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Enhancing product security with CSP for internal pages

2014-04-15 Thread Neil

Frederik Braun wrote:


On 15.04.2014 00:43, Neil wrote:
 


Frederik Braun wrote:


A few months ago I had the idea to add a Content Security Policy (CSP) to our 
internal pages, like about:newtab for example.


So this just applies to about: pages?


Primarily yes. I think some people are already working on other bits and 
pieces. Of course this also only makes sense for privileged about: pages. This 
would mean about:home can stay as is.
 


So about:certError and about:blocked stay as is too?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Oculus VR support somehwat-non-free code in the tree

2014-04-15 Thread Neil

Mike Hoye wrote:

the window-close button being right next to the send button in 
Thunderbird turns into a real problem after your third coffee, let me 
tell you.


Don't you mean before your third coffee?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Enhancing product security with CSP for internal pages

2014-04-14 Thread Neil

Frederik Braun wrote:


A few months ago I had the idea to add a Content Security Policy (CSP) to our 
internal pages, like about:newtab for example.


So this just applies to about: pages?

--
Warning: May contain traces of nuts.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


  1   2   3   4   >