Bobby Holley
6284ce3329
Bug 823348 - Move COW prototype remapping out of wrapper selection. r=mrbkap
...
It's pretty orthogonal, and makes the critical block more complicated than it
needs to be.
2013-01-23 06:04:39 +01:00
Bobby Holley
39970d33e6
Bug 823348 - Precompute various parameters in Rewrap. r=mrbkap
...
This is generally cleaner, and avoids potentially calling these functions
multiple times when we start moving this stuff around.
2013-01-23 06:04:39 +01:00
Bobby Holley
7124dc509b
Bug 823348 - Use GetXrayType for content->chrome Xray wrappers. r=mrbkap
...
There's no reason to do this any different than we do for XOWs and such. The
only thing this might conceivably support would be certain chrome XPWNs-as-COWs.
But that would require that they forced a parent in precreate without being
flagged as DOM objects in classinfo. And it's not clear why we'd want to support
that. And we're generally moving away from COWs anyway.
2013-01-23 06:04:39 +01:00
Bobby Holley
1aedd25af4
Bug 823348 - Use EnsureCompartmentPrivate In Rewrap and stop checking for null. r=mrbkap
2013-01-23 06:04:39 +01:00
Bobby Holley
72ddba04a7
Bug 823348 - Flip off the wantXrays for chrome sandboxes. r=mrbkap
...
wantXrays means that the sandbox wants Xray wrappers even when accessing same-
origin content. The default is true, which Blake says has something to do with
GreaseMonkey and days of old.
This flag never had an effect for chrome, because the chrome->chrome case always
short-circuited to &CrossCompartmentWrapper::singleton. But once we start
respecting the flag as a general-purpose indicator that Xrays should be applied
same-origin, we need to either add a special case in Rewrap or make the flag reflect
reality. The latter seems cleaner and more sane.
However, things are complicated by the fact that there's also a completely different,
orthogonal usage, whereby setting wantXrays to false implicitly waives Xray on the
returned sandbox _and_ on any results returned from evalInSandbox. This is just nuts.
The former can be accomplished by callers manually using .wrappedJSObject, and the
latter by having EvalInSandbox transitively apply waivers from their sandbox arguments.
I've updated the documentation on the MDN page so that it only describes the
reasonable usage. The next step is to get rid of the crazy behavior. I think the
best path of migration is to have wantXrays: false keep implicitly waiving, but
waive return values from EvalInSandbox based on whether the argument was waived. This
patch does that.
2013-01-23 06:04:39 +01:00
Bobby Holley
33983c1d00
Bug 823348 - Make NNXOWs use an explicitly opaque Policy. r=mrbkap
...
There's no reason to be doing a dynamic check here, given that the JSClasses
will never match. Lets be explicit and safe.
2013-01-23 06:04:38 +01:00
Bobby Holley
165e39b43e
Bug 823348 - Do a better job of lying about the holder and make assertions fatal. r=mrbkap
...
I noticed this nonfatal assertion firing, unrelated to my patches. Leaking
the holder is not so great. Let's fix this for real.
2013-01-23 06:04:38 +01:00
Bobby Holley
ddf7e9edc1
Bug 823348 - Remove broken and unused __scriptOnly__ check. r=mrbkap
...
__scriptOnly__ is unused on mxr and addons-mxr. Morevoer, the current
implementation is totally broken, because we check for NNXOW, which only
happens when a random content JS object ends up in some other cross-origin
scope (via addons, presumably), whereas chrome objects use ChomeObjectWrapper.
I'm soon going to replace SCRIPT_ACCESS_ONLY with checked unwrapping, and mark
all COWs as unsafe to unwrap (see bug 821573 and bug 658909). So let's just kill
this thing here.
2013-01-23 06:04:38 +01:00
Bobby Holley
d66093b809
Bug 823348 - Don't set universalXPConnectEnabled for chrome compartments. r=mrbkap
...
There's a browser-chrome test that does this, which means that _all_ subsequent
browser-chrome tests inherit it. So depending on the ordering of cases in
WrapperFactory, we might end up using a CrossCompartmentWrapper rather than an
XrayWrapper, meaning that stuff like nodePrincipal doesn't work anymore.
The semantics of UniversalXPConnect are now entirely dicatated by what makes
our test suite go green. So let's not force ourselves to bend over backwards
during wrapping to handle this case. And let's fix that stupid test while
we're at it.
2013-01-23 06:04:38 +01:00
Bobby Holley
36a6df18c4
Bug 823348 - Uninline UniversalXPConnect management. r=mrbkap
...
Every time the layout of CompartmentPrivate changes, I forget to rebuild in
caps/ and spend half an hour wondering what the heck is going on. :-(
2013-01-23 06:04:38 +01:00
Ehsan Akhgari
16e89b722a
Bug 833631 - Unprefix mozAudioContext; r=roc
...
--HG--
extra : rebase_source : 3c477a97ea842a806f6fad6f5c3a81d6e50b27c3
2013-01-22 20:12:21 -05:00
Steve Fink
57a2c2471b
Bug 828753 - jsid rooting, mostly in jsinfer.*. Also switch JSObject from struct to class. r=terrence
2012-12-31 12:40:21 -08:00
Terrence Cole
85b0b5a254
Bug 803182 - Make the js shell stack limit match the browser's; r=dmandelin
...
This should help ensure that recursion errors found in the shell actually
represent real errors. This also attempts to account for the difference in size
between debug and optimized builds to the size of js::Interpret's stack frame.
2012-10-29 13:36:41 -07:00
Irving Reid
7deeb3fb59
Bug 818958: Tell SPSProfiler when the JS runtime shuts down r=luke
2013-01-18 12:04:35 -05:00
Nicholas Nethercote
004a30a0a5
Bug 832026 - Measure JSRuntime::bumpAlloc_ in the JS memory reporter. r=sstangl.
...
--HG--
rename : js/src/tests/lib/jittests.py => js/src/jit-test/jit_test.py
rename : layout/reftests/w3c-css/submitted/values3/calc-background-image-gradient-1-ref.html => layout/reftests/css-calc/background-image-gradient-1-ref.html
rename : layout/reftests/w3c-css/submitted/values3/calc-background-image-gradient-1.html => layout/reftests/css-calc/background-image-gradient-1.html
rename : layout/reftests/w3c-css/submitted/values3/reftest.list => layout/reftests/css-calc/reftest.list
rename : layout/reftests/text/auto-hyphenation-10-ref.html => layout/reftests/text/auto-hyphenation-10.html
rename : layout/reftests/text/auto-hyphenation-8-ref.html => layout/reftests/text/auto-hyphenation-8.html
rename : layout/reftests/text/auto-hyphenation-9-ref.html => layout/reftests/text/auto-hyphenation-9.html
rename : services/common/servicesComponents.manifest => services/sync/SyncComponents.manifest
extra : rebase_source : 6b9d955241e189e52c6145f3fb4c3169ec834b78
2013-01-17 17:50:21 -08:00
Boris Zbarsky
d53ec45102
Bug 823228 part 2. Move indexed property access on windows from nsWindowSH::GetProperty to the outer window proxy. r=bholley
2013-01-17 12:30:37 -05:00
Bobby Holley
2780e92307
Bug 824864 - Implement nsContentUtils::GetObjectPrincipal. r=bz
...
The SSM interface is super awkward.
2013-01-16 18:50:25 -08:00
Trevor Saunders
9f0ad48b28
bug 822289 - remove NS_IMPL_CYCLE_COLLECTION_CLASS and friends r=mccr8
2013-01-12 07:40:33 -05:00
Andrew McCreight
b934f7fc9a
Bug 829430 - Use the right check for if we're GCing. r=billm
2013-01-15 09:10:36 -08:00
Mats Palmgren
94ede408a1
Bug 786533 - On Windows, one of the system header files (windef.h) defines 'min' and 'max' as macros which breaks any use of std::min/std::max. Define NOMINMAX before including system header files where needed to avoid defining those macros. r=ehsan
2013-01-15 13:22:03 +01:00
Mats Palmgren
6c53161814
Bug 786533 - Replace NS_MIN/NS_MAX with std::min/std::max and #include <algorithm> where needed. r=ehsan
2013-01-15 13:22:03 +01:00
Terrence Cole
912e1ad2ed
Bug 811060 - Move DeflateString out of jsstr and make it Typey; r=Waldo
...
--HG--
extra : rebase_source : 9d239c525e8b0c04a63770d4ed732c9c6da54a2c
2012-11-09 09:45:25 -08:00
Ehsan Akhgari
d843a25f8e
Bug 818224 - Show all chrome script errors originated from private windows; r=bholley
2013-01-14 09:17:37 -05:00
Ms2ger
3c26b8b8e4
Merge latest PGO-green m-i changeset to m-c.
2013-01-11 14:48:33 +01:00
Ms2ger
effe119b3d
Bug 824481 - Cleanup style attribute getters; r=bz
2013-01-11 09:42:59 +01:00
Ehsan Akhgari
1ced5105eb
Merge mozilla-central into mozilla-inbound
2013-01-08 14:59:20 -05:00
Olli Pettay
b63413d754
Bug 827471 - Improve CanSkipWrappedJS, r=mccr8
2013-01-08 19:40:35 +02:00
Andrew McCreight
7d3dd0a3b1
Bug 690970, part 3: fix black-gray edges in weak containers at start of CC. r=billm
2013-01-08 10:36:51 -08:00
Steve Fink
08f99e5f1c
Bug 827225 - Rename JS_GetTypedArrayType to JS_GetArrayBufferViewType, add TYPE_DATAVIEW. r=bz, sr=dmandelin
...
--HG--
extra : rebase_source : c5947273c5d517338ea1f468358511aa979b4959
2013-01-07 15:12:00 -08:00
William Chen
8fc8c7cc9a
Bug 826606 - Set uninitialized values for DeviceProximityEvent according to spec. r=dougt,smaug,khuey
2013-01-08 09:36:05 -08:00
Andrew McCreight
6f2b4df7a3
Bug 777385 - Support (some) Paris bindings objects as weak map keys. r=peterv
...
This adds support for many kinds of Paris bindings objects as weak map keys.
This patch supports nsISupports objects as well as non-cycle-collected
non-nsISupports objects. What is needed for support is to preserve any wrapper,
if the object is wrapper cached. In other cases, we don't need to do anything.
2012-11-09 10:59:02 -08:00
Ed Morley
a150e0c867
Merge mozilla-central to mozilla-inbound
2013-01-07 20:20:51 +00:00
Olli Pettay
a0d72846bb
Bug 705371 - [CC] don't add JSContexts that have no children to the cycle collector graph, r=mccr8
2013-01-07 19:40:46 +02:00
Chia-hung Tai
08eb1bb588
Bug 825836 - Add Blob into JS component. r=sicking
2013-01-04 15:53:25 +08:00
Nicholas Nethercote
6a3f1a1648
Bug 826526 - Modify the orphan node reporter so it handles WebIDL objects. r=bz.
2013-01-06 20:43:54 -08:00
Peter Van der Beken
96b67671a8
Fix for bug 824907 (Convert HTML table elements to WebIDL) - convert HTMLTableColElement to WebIDL. r=bz.
...
--HG--
rename : content/html/content/src/nsHTMLTableCellElement.cpp => content/html/content/src/HTMLTableCellElement.cpp
rename : content/html/content/src/nsHTMLTableColElement.cpp => content/html/content/src/HTMLTableColElement.cpp
rename : content/html/content/src/nsHTMLTableColElement.cpp => content/html/content/src/HTMLTableColElement.h
rename : content/html/content/src/nsHTMLTableElement.h => content/html/content/src/HTMLTableElement.h
rename : content/html/content/src/nsHTMLTableRowElement.cpp => content/html/content/src/HTMLTableRowElement.cpp
rename : content/html/content/src/nsHTMLTableRowElement.cpp => content/html/content/src/HTMLTableRowElement.h
extra : rebase_source : 4654bf54c41231eed6f73a35118d58be0c9af9a0
2012-12-29 15:07:57 +01:00
Peter Van der Beken
71cdba8a1a
Fix for bug 824907 (Convert HTML table elements to WebIDL) - convert HTMLTableRowElement to WebIDL. r=bz.
...
--HG--
extra : rebase_source : d2febac66f508caf3c2b89816e811ed8e2c88856
2012-12-29 15:07:57 +01:00
Peter Van der Beken
88f551c0d3
Fix for bug 824907 (Convert HTML table elements to WebIDL) - convert HTMLTableCellElement to WebIDL. r=bz.
...
--HG--
rename : content/html/content/src/nsHTMLTableCellElement.cpp => content/html/content/src/HTMLTableCellElement.cpp
rename : content/html/content/src/nsHTMLTableCellElement.cpp => content/html/content/src/HTMLTableCellElement.h
rename : content/html/content/src/nsHTMLTableElement.cpp => content/html/content/src/HTMLTableElement.cpp
rename : content/html/content/src/nsHTMLTableElement.h => content/html/content/src/HTMLTableElement.h
rename : content/html/content/src/nsHTMLTableRowElement.cpp => content/html/content/src/HTMLTableRowElement.h
extra : rebase_source : fcf088e7ac91a216ae7ad1cb16d509a17cd7a2a7
2012-12-29 15:07:56 +01:00
Peter Van der Beken
0a9ff23dea
Fix for bug 824907 (Convert HTML table elements to WebIDL) - convert HTMLTableSectionElement to WebIDL. r=bz.
...
--HG--
rename : content/html/content/src/nsHTMLTableRowElement.cpp => content/html/content/src/HTMLTableRowElement.cpp
rename : content/html/content/src/nsHTMLTableSectionElement.cpp => content/html/content/src/HTMLTableSectionElement.cpp
rename : content/html/content/src/nsHTMLTableSectionElement.cpp => content/html/content/src/HTMLTableSectionElement.h
rename : dom/interfaces/html/nsIDOMHTMLTableSectionElem.idl => dom/interfaces/html/nsIDOMHTMLTableSectionElement.idl
extra : rebase_source : b9c1d7dea38653452b44b2033cf2c0140f7b39b1
2012-12-29 15:07:48 +01:00
Peter Van der Beken
7538219944
Fix for bug 824907 (Convert HTML table elements to WebIDL) - convert HTMLTableElement to WebIDL. r=bz.
...
--HG--
rename : content/html/content/src/nsHTMLTableElement.cpp => content/html/content/src/HTMLTableElement.cpp
rename : content/html/content/src/nsHTMLTableElement.h => content/html/content/src/HTMLTableElement.h
extra : rebase_source : 36ef4c094fdf54103ad3c41e299eb86d20956915
2012-12-29 09:08:15 +01:00
Jeff Walden
da2a57bc92
Whitespace tab-killing patrol. No bug, r=sparky
2013-01-04 17:00:43 -06:00
Jeff Walden
be7908afa3
Bug 824217 - Make ChromeObjectWrapper::getPropertyDescriptor not pretend no descriptor exists when the property exists along the prototype chain, when the property is being resolved just before an assignment. r=bholley
2013-01-03 17:55:58 -06:00
William Chen
7cd5470029
Bug 617532 - Implement UndoManager. r=ehsan
2013-01-03 22:54:26 -08:00
Jeff Walden
d9889b3184
Bug 826447 - Change all the proxy API signatures to take unsigned flags, rather than bool set, so that it's easier to find all tests of JSRESOLVE_ASSIGNING. r=bz
...
--HG--
extra : rebase_source : 3b88b411965087984d7973a90f8fa1b06457a6ce
2013-01-03 15:31:36 -06:00
Boris Zbarsky
467b89667e
Bug 824823 part 2. WebIDL binding for HTMLAnchorElement. r=peterv
2013-01-04 12:02:13 -05:00
Boris Zbarsky
6efe50ec6e
Bug 824823 part 0. Fix a test to keep using an XPCWrappedNative element for now until bug 825053 is fixed. Verbal r=peterv
2013-01-04 12:02:13 -05:00
Boris Zbarsky
25524db939
Bug 826423. Fix SpecialPowers.wrap() to reliably detect Xrays. r=peterv
2013-01-04 12:02:13 -05:00
Ehsan Akhgari
f204022ad2
Bug 826602 - Rename nsHTMLCanvasElement to mozilla::dom::HTMLCanvasElement; r=bzbarsky
...
--HG--
rename : content/html/content/public/nsHTMLCanvasElement.h => content/html/content/public/HTMLCanvasElement.h
rename : content/html/content/src/nsHTMLCanvasElement.cpp => content/html/content/src/HTMLCanvasElement.cpp
2013-01-04 00:16:14 -05:00
Ehsan Akhgari
11b68a76e0
Backed out changeset bfb788e7ef51 (bug 826602) because of build failures
...
--HG--
rename : content/html/content/public/HTMLCanvasElement.h => content/html/content/public/nsHTMLCanvasElement.h
rename : content/html/content/src/HTMLCanvasElement.cpp => content/html/content/src/nsHTMLCanvasElement.cpp
2013-01-04 01:07:10 -05:00
Ehsan Akhgari
c8deef991c
Bug 826602 - Rename nsHTMLCanvasElement to mozilla::dom::HTMLCanvasElement; r=bzbarsky
...
--HG--
rename : content/html/content/public/nsHTMLCanvasElement.h => content/html/content/public/HTMLCanvasElement.h
rename : content/html/content/src/nsHTMLCanvasElement.cpp => content/html/content/src/HTMLCanvasElement.cpp
2013-01-04 00:16:14 -05:00