Commit Graph

1089 Commits

Author SHA1 Message Date
Bill McCloskey
24cb982abe Bug 895340 - Fix error reporting of JS exceptions from C++ (r=bholley) 2013-07-23 08:32:36 -07:00
Olli Pettay
82cc8937c7 Bug 895578 - Make SnowWhiteKiller to use fallible TArray, r=mccr8 2013-07-19 15:53:16 +03:00
Bobby Holley
a1d65d2e7c Bug 887334 - Miscellaneous JSAutoCompartments. r=luke 2013-07-17 11:53:53 -07:00
Olli Pettay
b734d7bc01 bug 789919, (snow-white) make addref/release of CCable objects faster by removing indirect refcnt increase/decrease, r=mccr8, test changes r=ehsan 2013-07-09 13:30:58 -04:00
Brian Hackett
efa24e41bc Bug 890636 - Remove JSOPTION_PCCOUNT, r=jandem. 2013-07-08 09:17:35 -06:00
Bobby Holley
89c7defd3a Bug 860085 - Stop using XPConnect::ReleaseJSContext in nsJSEnvironment::DestroyJSContext. r=gabor,mccr8
We now have the invariant that any in-use cx must be pushed onto the JSContext
stack with one of our stack-scoped automatic nsCxPusher classes. These classes
hold a strong ref to the nsIScriptContext associated with the JSContext they
push (if any). This means that, if this cx is in use, we will always have at
least one strong reference to the nsJSContext coming from the stack, meaning
that neither the destructor nor the Unlink() implementation will be called.
So we don't need to do any deferred destruction of the cx anymore.
2013-07-03 11:05:19 -06:00
Gregor Wagner
42f1e9c3f3 Bug 887125 - Allow 0 for Memory GC Preferences. r=bent 2013-06-27 14:40:17 +08:00
Nicolas B. Pierron
280087ba89 Bug 829841 - Add an option to enable eager compilation in the browser. r=dvander 2013-06-24 05:13:05 -07:00
Bobby Holley
696acc7cae Bug 875790 - Add cx push back into nsJSContext::CompileScript. r=me 2013-06-21 09:10:27 -07:00
Bill McCloskey
e19b0d18ef Bug 871005 - Add a pref for GC decommit threshold (r=gregor) 2013-06-20 18:06:53 -07:00
Bobby Holley
e6757fa1b3 Bug 883450 - Miscellaneous requests. r=gabor 2013-06-20 11:05:34 -07:00
Jon Coppeard
5ebd30bc01 Bug 877762 - GC: Post-barrier cycle collector participants - 5 Convert JS::Value to use Heap<T> r=smaug 2013-06-18 11:00:37 +01:00
Benjamin Peterson
b97a128e7f Bug 823978 - Rename JSOPTION_STRICT to JSOPTION_EXTRA_WARNINGS. r=Waldo 2013-06-11 12:49:11 -07:00
Ryan VanderMeulen
05d0234247 Backed out changeset 1df122edcf0d (bug 823978) for bustage (again).
CLOSED TREE (again)
2013-06-11 15:27:46 -04:00
Benjamin Peterson
8192b95a4d Bug 823978 - Rename JSOPTION_STRICT to JSOPTION_EXTRA_WARNINGS. r=Waldo 2013-06-11 11:30:18 -07:00
Ryan VanderMeulen
44c3c3cd0e Backed out changeset 7e69e102a432 (bug 823978) for bustage.
CLOSED TREE
2013-06-11 14:28:17 -04:00
Benjamin Peterson
c2652ce2ee Bug 823978 - Rename JSOPTION_STRICT to JSOPTION_EXTRA_WARNINGS. r=Waldo 2013-06-11 10:55:21 -07:00
Boris Zbarsky
b81ccaeaf1 Bug 876805. Fix unsafe reference gc hazards in dom/ code. r=smaug 2013-05-29 16:16:04 -04:00
Phil Ringnalda
212acec46b Merge the last PGO-green cset on m-i to m-c 2013-05-27 09:44:40 -07:00
40880196f0 Bug 875790 - Revert AutoPushJSContext change in nsJSContext::CompileScript due to crashes. r=bholley 2013-05-27 06:40:37 -07:00
Jon Coppeard
048b511f81 Bug 874691 - Make CC participant tracing indirect r=mccr8 r=smaug r=bz 2013-05-27 12:50:49 +01:00
Bobby Holley
1c71eb60c4 Bug 868110 - Introduce a more private API for the consumers that really do need the default compartment object. r=luke
The primary consumer of this is the whole inner/outer DOM window setup, which
uses the default global to track the current inner. But there are few other
random ones as well.

We use this as an opportunity to convert a bunch of consumers from the two-step
GetNativeContext() -> JS_GetGlobalObject() into just |GetNativeGlobal()|. This
will make things much easier to convert when we start tracking the current inner
explicitly.
2013-05-22 15:42:44 -06:00
Bobby Holley
c9c266aea9 Bug 868130 - Remove the lion's share of JSAutoRequests in gecko. r=gabor
There are still a handful that either are used with other runtimes, or that
happen very early/late in cx the lifetime of various things where it doesn't
necessarily make sense to have a cx on the stack. This should definitely ensure
that we're not doing double-duty with the nsCxPusher change, though.
2013-05-22 10:05:28 -06:00
Bobby Holley
c3247a55cf Bug 868130 - Include nsCxPusher.h everywhere we need it, and stop including it from nsContentUtils.h. r=gabor 2013-05-22 10:05:26 -06:00
Bobby Holley
83aad34bb0 Bug 868130 - Make sure mContext is stack-top in the various places where nsJSEnvironment uses it. r=gabor
I also replaced some uses of mJSContext with AutoJSContext upon auditing that
they're only ever called by other nsJSContext functions that just pushed. This
makes the code much easier to audit because we know that we're just inheriting
the caller's cx (which is stack-top) rather than injecting a potentially-
unrelated cx.
2013-05-22 10:05:24 -06:00
Bobby Holley
17217eb977 Bug 868130 - Make sure mContext is stack-top in nsJSContext::CompileScript. r=gabor 2013-05-22 10:05:23 -06:00
Jan de Mooij
13b3a7e5aa Bug 857845 part 3 - Remove JM JSAPI flags, memory reporters and browser prefs. r=djvj 2013-05-22 14:50:45 +02:00
Bobby Holley
2a1ff7aa46 Bug 841312 - Remove the termination function API. r=bz
\o/
2013-05-21 11:45:56 -06:00
Bobby Holley
0dd25b5a1f Bug 860941 - Separate the handling of |dialogArguments| and |arguments|, and use IDL for the |dialogArguments| getter. r=jst
This patch is bigger than I'd like it to be, but there are a lot of interlocked
dependencies and I eventually decided it was easier to just lump it together.

The semantics of |showModalDialog|/|window.dialogArguments| (an web-exposed
HTML5 feature) and |openDialog|/|window.arguments| (a XUL-proprietary feature)
are quite different. The former is essentially a security-checked JSVal, while
the latter gets converted into an array. We handled them together in the old
world, which led to a lot of confusion and muddled semantics. This patch
separates them.

This patch also eschews the roundabout resolve hook for dialogArguments in favor
of returning them directly from the XPIDL getter. This better matches the
behavior in the spec, especially because it allows dialogArguments to live on
the outer as they're supposed to, rather than the first inner that happens to
end up in the docshell. All in all, this should make this all very
straightforward to convert WebIDL when the time comes.

The current spec on the origin checks here is pretty fictional, so I've filed
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21932 to fix it. This patch
should more or less preserve the current security behavior.
2013-05-17 10:43:19 -07:00
Andrew McCreight
b1e16e7101 Bug 865320 - Move the logic for deciding when to doing a merging CC into the cycle collector. r=smaug 2013-04-29 16:41:41 -07:00
Ed Morley
6d0c9e05ad Backed out changeset 0ad1a92ca568 (bug 860941) 2013-05-17 09:08:44 +01:00
Bobby Holley
dcff86037c Bug 860941 - Separate the handling of |dialogArguments| and |arguments|, and use IDL for the |dialogArguments| getter. r=jst
This patch is bigger than I'd like it to be, but there are a lot of interlocked
dependencies and I eventually decided it was easier to just lump it together.

The semantics of |showModalDialog|/|window.dialogArguments| (an web-exposed
HTML5 feature) and |openDialog|/|window.arguments| (a XUL-proprietary feature)
are quite different. The former is essentially a security-checked JSVal, while
the latter gets converted into an array. We handled them together in the old
world, which led to a lot of confusion and muddled semantics. This patch
separates them.

This patch also eschews the roundabout resolve hook for dialogArguments in favor
of returning them directly from the XPIDL getter. This better matches the
behavior in the spec, especially because it allows dialogArguments to live on
the outer as they're supposed to, rather than the first inner that happens to
end up in the docshell. All in all, this should make this all very
straightforward to convert WebIDL when the time comes.

The current spec on the origin checks here is pretty fictional, so I've filed
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21932 to fix it. This patch
should more or less preserve the current security behavior.
2013-05-16 23:33:14 -07:00
David Zbarsky
38c8f91df5 Bug 868312 - Rooting fixes for dom r=bz 2013-05-12 01:17:42 -04:00
David Zbarsky
82142be8bc Bug 868312 - Rooting fixes for dom r=bz 2013-05-10 14:22:21 -04:00
David Zbarsky
cc3ae7e546 Bug 868312: Root dom/workers r=bz 2013-05-09 03:27:40 -04:00
Bobby Holley
2c8eddabec Bug 868635 - Make merging CC heuristics go through scx. r=mccr8 2013-05-07 14:18:03 -07:00
Luke Wagner
5a550b33ba Bug 868184 - OdinMonkey: enable by default on beta/release (r=vlad) 2013-05-07 13:34:17 -07:00
Bobby Holley
2661c1979e Bug 868122 - Remove nsIScriptContextPrincipal. r=gabor
\o/
2013-05-06 16:53:10 -07:00
David Zbarsky
987c67c0fd Bug 866450 Part 7: Root some additional JS::Values found during review r=bz 2013-05-02 05:12:47 -04:00
David Zbarsky
1bc9e28725 Bug 866450 Part 3: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
David Zbarsky
4ee20224dc Bug 866450 Part 2: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
Ed Morley
50846cada0 Backed out changeset b514d768d793 (bug 866450) 2013-05-02 11:57:14 +01:00
Ed Morley
783d08690f Backed out changeset 6e6a175fc36a (bug 866450) 2013-05-02 11:57:10 +01:00
Ed Morley
543ebd4b9a Backed out changeset e0b51717bb64 (bug 866450) 2013-05-02 11:56:57 +01:00
David Zbarsky
5031a5f872 Bug 866450 Part 7: Root some additional JS::Values found during review r=bz 2013-05-02 05:12:47 -04:00
David Zbarsky
f600017ce2 Bug 866450 Part 3: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
David Zbarsky
d9ede3c906 Bug 866450 Part 2: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
Bobby Holley
18bc49a336 Bug 865729 - Remove nsIJSContextStack from dom/foo. r=gabor 2013-04-29 11:16:18 -07:00
Andreas Gal
1d0cdd180c Bug 862970 - Don't lock images on the active page on B2G. r=jlebar,joe 2013-04-25 18:36:53 -07:00
Aryeh Gregor
6714817176 Bug 859817 - Remove implicit conversions from raw pointer to already_AddRefed; r=Ms2ger 2013-04-22 14:15:59 +03:00