Commit Graph

672 Commits

Author SHA1 Message Date
Boris Zbarsky
14e7edc59d Bug 876805. Fix unsafe reference gc hazards in dom/ code. r=smaug 2013-05-29 16:16:04 -04:00
Phil Ringnalda
2fabeb0e6b Merge the last PGO-green cset on m-i to m-c 2013-05-27 09:44:40 -07:00
octoploid@yandex.com
a35456ccd9 Bug 875790 - Revert AutoPushJSContext change in nsJSContext::CompileScript due to crashes. r=bholley 2013-05-27 06:40:37 -07:00
Jon Coppeard
f53a29e132 Bug 874691 - Make CC participant tracing indirect r=mccr8 r=smaug r=bz 2013-05-27 12:50:49 +01:00
Bobby Holley
11f2396ec2 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
1b2f22fe61 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
ba05c93769 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
2e08885c40 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
783eb84d1c Bug 868130 - Make sure mContext is stack-top in nsJSContext::CompileScript. r=gabor 2013-05-22 10:05:23 -06:00
Jan de Mooij
2c2722d303 Bug 857845 part 3 - Remove JM JSAPI flags, memory reporters and browser prefs. r=djvj
--HG--
extra : rebase_source : 8b2ed85801fcd8c8fd0fc16a89b1a275add1a310
2013-05-22 14:50:45 +02:00
Bobby Holley
0bda6fb49c Bug 841312 - Remove the termination function API. r=bz
\o/
2013-05-21 11:45:56 -06:00
Bobby Holley
e212c13aff 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
e7c16849ba 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
b61d46f51a Backed out changeset 0ad1a92ca568 (bug 860941) 2013-05-17 09:08:44 +01:00
Bobby Holley
01f304382c 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
70b156af55 Bug 868312 - Rooting fixes for dom r=bz 2013-05-12 01:17:42 -04:00
David Zbarsky
e521e7ffff Bug 868312 - Rooting fixes for dom r=bz 2013-05-10 14:22:21 -04:00
David Zbarsky
3c839fc3b2 Bug 868312: Root dom/workers r=bz 2013-05-09 03:27:40 -04:00
Bobby Holley
af4114de6c Bug 868635 - Make merging CC heuristics go through scx. r=mccr8 2013-05-07 14:18:03 -07:00
Luke Wagner
39b73739d0 Bug 868184 - OdinMonkey: enable by default on beta/release (r=vlad)
--HG--
extra : rebase_source : c97bf37723eded74f95aae21e2baa692cf059c2e
2013-05-07 13:34:17 -07:00
Bobby Holley
be7264ecab Bug 868122 - Remove nsIScriptContextPrincipal. r=gabor
\o/
2013-05-06 16:53:10 -07:00
David Zbarsky
38f5841d1a Bug 866450 Part 7: Root some additional JS::Values found during review r=bz 2013-05-02 05:12:47 -04:00
David Zbarsky
6557f4fec7 Bug 866450 Part 3: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
David Zbarsky
a79bf02c5d Bug 866450 Part 2: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
Ed Morley
581e7b778e Backed out changeset b514d768d793 (bug 866450) 2013-05-02 11:57:14 +01:00
Ed Morley
28ddd7f05a Backed out changeset 6e6a175fc36a (bug 866450) 2013-05-02 11:57:10 +01:00
Ed Morley
37d84a3fe7 Backed out changeset e0b51717bb64 (bug 866450) 2013-05-02 11:56:57 +01:00
David Zbarsky
0e20dc3030 Bug 866450 Part 7: Root some additional JS::Values found during review r=bz 2013-05-02 05:12:47 -04:00
David Zbarsky
b170dafbb3 Bug 866450 Part 3: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
David Zbarsky
0566d3158e Bug 866450 Part 2: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
Bobby Holley
402c35b1ff Bug 865729 - Remove nsIJSContextStack from dom/foo. r=gabor 2013-04-29 11:16:18 -07:00
Andreas Gal
8d87fa0466 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
e78504c9a9 Bug 859817 - Remove implicit conversions from raw pointer to already_AddRefed; r=Ms2ger 2013-04-22 14:15:59 +03:00
Boris Zbarsky
f75142b01d Bug 864727 part 5. Make all the WrapObject methods take a handle for the scope object. r=ms2ger 2013-04-25 12:29:54 -04:00
David Zbarsky
e7c500d80d Bug 861729 - Remove nsPIDOMWindow::GetExtantDocument r=Ms2ger 2013-04-24 00:22:37 -04:00
Xin Zhang
5e389b35b8 Bug 857385 - Make various JSFunctionSpec arrays const. r=waldo
--HG--
extra : rebase_source : 24141998ffad3b0e6bad98b6fc0ce3754e448d5b
2013-04-22 14:15:49 -07:00
Jose Cortes
47c6e6e146 Bug 842186 - Replace use of jsval with JS::Value in dom/base. r=jwalden
From 1a684ed61615d32965201e55335478d5f403ac4a Mon Sep 17 00:00:00 2001
 cpp files in the dom/base/ directory. r=jwalden
---
 dom/base/Crypto.cpp                     |  3 +-
 dom/base/DOMRequest.cpp                 | 12 +++---
 dom/base/DOMRequest.h                   |  4 +-
 dom/base/Navigator.cpp                  | 10 ++---
 dom/base/nsDOMJSUtils.h                 |  6 +--
 dom/base/nsDOMWindowUtils.cpp           | 20 ++++-----
 dom/base/nsGlobalWindow.cpp             | 24 +++++------
 dom/base/nsIJSNativeInitializer.h       |  4 +-
 dom/base/nsJSEnvironment.cpp            | 73 +++++++++++++++++----------------
 dom/base/nsJSEnvironment.h              |  8 ++--
 dom/base/nsJSTimeoutHandler.cpp         |  4 +-
 dom/base/nsJSUtils.h                    |  2 +-
 dom/base/nsStructuredCloneContainer.cpp | 10 ++---
 13 files changed, 91 insertions(+), 89 deletions(-)

--HG--
extra : rebase_source : af1420550a745aba9fd6c20297ac3cd0075f5ead
2013-04-11 18:52:10 -04:00
Boris Zbarsky
add8499ced Bug 810644 part 2. Eliminate the now-unused CallEventHandler. r=smaug, sr=peterv 2013-01-03 14:02:42 -05:00
Steve Fink
c264467809 Bug 789593 - Clone typed arrays by cloning their buffers and only saving construction parameters. r=jorendorff, bent
Also enters a compartment where needed, and bumps both the structured clone and IndexedDB schema versions
2013-02-22 13:43:28 -08:00
Jan de Mooij
10ce141c07 Merge from mozilla-central. 2013-03-26 10:57:26 +01:00
Jan de Mooij
4c6bace32c Merge from mozilla-inbound.
--HG--
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFEConvolveMatrixElement.cpp
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFEConvolveMatrixElement.h
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFEDiffuseLightingElement.cpp
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFEDiffuseLightingElement.h
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFEDisplacementMapElement.cpp
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFEDisplacementMapElement.h
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFEOffsetElement.cpp
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFEOffsetElement.h
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFESpecularLightingElement.cpp
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFESpecularLightingElement.h
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFESpotLightElement.cpp
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFESpotLightElement.h
2013-03-25 10:27:13 +01:00
Jan de Mooij
eedb10f1f3 Merge from mozilla-central. 2013-03-22 10:39:40 +01:00
Jan de Mooij
d0d422295b Merge from mozilla-central.
--HG--
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFEColorMatrixElement.cpp
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFEColorMatrixElement.h
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFECompositeElement.cpp
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFECompositeElement.h
2013-03-20 12:54:47 +01:00
Terrence Cole
46f8e831e6 Bug 850293 - Remove nsScriptObjectHolder; r=mccr8,bholly sr=smaug
nsScriptObjectHolder is not needed with either conservative or exact rooting.
2013-03-20 13:09:09 -07:00
Jan de Mooij
c1a255d93e Merge from mozilla-central.
--HG--
rename : content/svg/content/src/SVGFEPointLightElement.cpp => content/svg/content/src/SVGFEComponentTransferElement.cpp
rename : content/svg/content/src/SVGFEPointLightElement.cpp => content/svg/content/src/SVGFEComponentTransferElement.h
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFEDistantLightElement.cpp
rename : content/svg/content/src/nsSVGFilters.cpp => content/svg/content/src/SVGFEDistantLightElement.h
2013-03-18 16:53:57 +01:00
Bill McCloskey
bfa3037d1f Bug 759585 - Zones (r=jonco,bhackett,njn,dvander,luke,bz,mccr8,bholley) 2013-03-16 20:36:37 -07:00
Benoit Girard
6ed333dbb5 Bug 851611 - Part 3: Rename headers. r=jrmuizel
--HG--
rename : tools/profiler/sampler.h => tools/profiler/GeckoProfiler.h
rename : tools/profiler/sps_sampler.h => tools/profiler/GeckoProfilerImpl.h
extra : rebase_source : 6ea7c660764a4390cdd8dd91561fff1d7bad6035
2013-03-18 15:25:50 +01:00
Benoit Girard
bbe4c3065e Bug 851611 - Part 2: Update profiler calls. r=jrmuizel
--HG--
extra : rebase_source : f76accc3d3dd86c75cb3e9750734f23ec9c29941
2013-03-16 00:47:02 -04:00
Jan de Mooij
cd6f3e3973 Merge from mozilla-central. 2013-03-08 09:57:47 +01:00
Terrence Cole
c6edf78940 Bug 851568 - Remove HoldScriptObject and DropScriptObject; r=smaug
--HG--
extra : rebase_source : d5bb9bff3dcdb8ceaf8ecb3ea60c96f75e0bc82a
2013-03-19 10:20:22 -07:00