Re: [JS-internals] C++ coding style rule for keeping class fields together

2017-09-27 Thread Andrew McCreight
On Wed, Sep 27, 2017 at 9:18 AM, Jason Orendorff wrote: > Hi everyone. > > I'd like to add a style rule: in a struct/class/union, put all the fields > (that is, non-static member variables) together, at the end. > > Maybe this is dumb, but while working with Rust I got used to this. Rust > doesn'

Re: [JS-internals] Tracking SpiderMonkey project priorities?

2014-04-11 Thread Andrew McCreight
What Bobby says here is right. While sec-high are usually less bad than sec-crit, we would still probably chemspill for a sec-high in the wild. Another thing that is missing is triaging security bugs. If something should be a sec-crit but it hasn't been marked as such, that's probably worse th

Re: [JS-internals] JSWeakMap

2013-12-29 Thread Andrew McCreight
- Original Message - > There is: nondeterministicGetWeakMapKeys, defined in TestingFunctions.cpp. > It's only available in the shell, though. It is actually also available in chrome code in the browser via Components.utils: http://mxr.mozilla.org/mozilla-central/source/dom/browser-el

Re: [JS-internals] WeakRefs and weak event listeners

2013-12-17 Thread Andrew McCreight
#x27;d justify > having weak references. I do think that it is a valid use case, and that, > if it came down to weighing the pros and cons (instead of vetoing the > feature on more fundamental grounds, which I can totally see making sense), > it would be a point in favor of them. > >

Re: [JS-internals] WeakRefs and weak event listeners

2013-12-02 Thread Andrew McCreight
As far as I understand it, weak references are useful to avoid leaks when you don't know (1) who is referring to you or (2) what your lifetime should be. Revocable proxies are useful to avoid leaks when you don't know (1) but you do know (2). Of course, if you know both, you don't need either.

Re: [JS-internals] Weak references

2013-11-07 Thread Andrew McCreight
For completeness (and irrelevant to this particular message I am replying...) I should mention that Bill pointed out in email that the cycle collector can't be completely oblivious to weak references, as I said before. Right now, when the CC identifies a JS object as garbage, it doesn't do anyt

Re: [JS-internals] Weak references

2013-11-01 Thread Andrew McCreight
- Original Message - > Why so? > > function f(e){} > > (function(){ > var iframe = document.getElementByTagName('iframe')[0]; > iframe.addEventListener('someEvent', f); > })() > > In this case, f doesn't hold a reference to anything besides itself, not >

Re: [JS-internals] Weak references

2013-11-01 Thread Andrew McCreight
I have a few disjoint thoughts here. 1. Here's a link to a previous ES-discuss thread about somebody trying to create an exploit by combining observable weak references with conservative GC. https://mail.mozilla.org/pipermail/es-discuss/2013-March/029489.html I think the basic idea is that yo

Re: [JS-internals] New bugzilla component for JIT bugs

2013-10-07 Thread Andrew McCreight
If you do end up doing a mass move, then you should put some distinctive string in a message along with the move, along with an explanation of how to filter it out. That makes clearing out the bugmail pretty easy. You could ask Ehsan for advice, as he did a similar mass move (though not quite

Re: [JS-internals] #include and #ifndef wrapper stuff

2013-06-14 Thread Andrew McCreight
Using two underscores in a symbol name is bad for some reason. I don't recall why but maybe somebody in #developers knows... Andrew - Original Message - > Hi, > > The standardization of our #ifndef wrappers came up in bug 881579. > Here are some examples: > > - jsapi.h: jsapi_h___ >

Re: [JS-internals] Proposal to improve the JS Team for new people and the community

2012-07-31 Thread Andrew McCreight
- Original Message - > Thanks for posting this, Tom. There are a lot of good ideas in there. > Too many to do at once, so I think we'll start with 1 or 2, and then > think about doing others over time. So expect to see something soon. > > In your last post, you mentioned meetings and meeti