Commit Graph

620 Commits

Author SHA1 Message Date
Gijs Kruitbosch
ae54e2bc78 Bug 539095 - Expose high-res timers to web content (performance.now()). r=bz, sr=smaug
--HG--
extra : transplant_source : o%9F%061%D4%B5%7D%5C%FB%95%5D%16%27%DEKU%EC%21%3AR
2012-04-27 09:22:06 +02:00
Bobby Holley
c48d120359 Bug 747749 - Remove call to JS_SetGlobalObject in mozJSComponentLoader. r=luke 2012-04-26 20:40:11 +02:00
Nicholas Nethercote
08dc2dae6b Bug 744311 (part 1) - Preliminary whitespace and code order changes. r=jlebar.
--HG--
extra : rebase_source : f700733d8aa1aed1ae1f9206b4ee9063f9a03341
2012-04-09 22:52:33 -07:00
Boris Zbarsky
e2ed0fe94a Bug 747815. Use const strings for arguments in DOM bindings. r=peterv 2012-04-26 00:42:03 -04:00
Ryan VanderMeulen
3d3d4922c1 Backout a0b3af4ac9f5 (bug 735280) due to Android jsreftest orange. 2012-04-25 21:59:36 -04:00
Gabor Krizsanits
0f38ab4f31 Bug 735280 - Part 3: Components object specific wrapper. r=bholley 2012-04-25 20:12:33 -04:00
Gabor Krizsanits
07fb83f53a Bug 735280 - Part 2: Add pre-create to nsXPComponents. r=bholley 2012-04-25 20:12:33 -04:00
Gabor Krizsanits
a9ded93717 Bug 735280 - Part 1: Connect XPCWrappedNativeScope and Components. r=bholley 2012-04-25 20:12:33 -04:00
Andrew McCreight
a9c6928a04 Bug 678615, part 2: remove FinishCycleCollection. r=smaug 2012-04-25 08:10:09 -07:00
Andrew McCreight
a5af270e47 Bug 678615 - remove ExplainLiveExpectedGarbage. r=smaug sr=peterv 2012-04-25 08:10:09 -07:00
Mike Hommey
79542a4d88 Bug 747870 - Properly align XPCLazyCallContext::mData. r=bholley 2012-04-25 09:09:08 +02:00
Matt Brubeck
d5da39b00f Back out bug 730208 and bug 747543 because of xpcshell test failures 2012-04-24 20:47:16 -07:00
Ryan VanderMeulen
d485f6d4b3 Backout 0b170d1f5d10 (bug 735280) due to red. 2012-04-24 22:09:23 -04:00
Gabor Krizsanits
f58f1c2ecd Bug 735280 - Part 3: Components object specific wrapper. r=bholley 2012-04-24 21:48:02 -04:00
Gabor Krizsanits
8abef4d8c3 Bug 735280 - Part 2: Add pre-create to nsXPComponents. r=bholley 2012-04-24 21:48:01 -04:00
Gabor Krizsanits
e6e268bb09 Bug 735280 - Part 1: Connect XPCWrappedNativeScope and Components. r=bholley 2012-04-24 21:47:54 -04:00
Ehsan Akhgari
a992263c77 Merge mozilla-central into mozilla-inbound 2012-04-24 21:29:44 -04:00
Patrick Wong
30fd6e9e6a Bug 745659 - Removed the nsPrintfCString constructor which takes a length and all corresponding instances that call that particular constructor. This is accomplished by removing the length component from the instantiation. r=jlebar 2012-04-24 14:43:00 -04:00
Ehsan Akhgari
624b7c422e Merge from mozilla-central 2012-04-23 18:17:44 -04:00
Kyle Huey
a2478f9645 Bug 747245: Fix a silly weak reference assertion. r=bent a=mfinkle 2012-04-23 14:14:10 -07:00
Ehsan Akhgari
06098487ea Merge mozilla-central into birch 2012-04-22 16:10:35 -04:00
Boris Zbarsky
e6901a65af Bug 742168. Refer to experimental bindings, not Paris bindings, in the pref code, since it will only control a subset of the Paris bindings. r=peterv 2012-04-18 12:02:04 -04:00
Marco Bonardo
8fd56f3066 Merge last green PGO from inbound to central 2012-04-17 15:31:58 +02:00
Olli Pettay
d796636855 Bug 731875 - Geolocation doorhanger might cause a zombie compartment, GeoPositionOptions part, r=dougt 2012-04-16 22:08:48 +03:00
Justin Lebar
5766598758 Bug 741378 - Rejigger the js memory reporters to match jemalloc's. r=njn 2012-04-16 12:20:54 +10:00
Justin Lebar
b391903730 Back out changeset 21f34fdd64a3 (bug 741378) because it breaks telemetry. r=me 2012-04-16 11:34:00 +10:00
Justin Lebar
dbb7a3bbac Bug 741378 - Rejigger the js memory reporters to match jemalloc's. r=njn 2012-04-16 11:17:26 +10:00
Bobby Holley
1037d6c217 Bug 745483 - Don't assert that TI is enabled when the pref is disabled. r=jdm 2012-04-15 17:54:03 -07:00
Bobby Holley
b0e37aa6d8 Bug 743843 - Introduce the options object for Components.Exception. r=Ms2ger,sr=mrbkap 2012-04-15 17:51:37 -07:00
Bobby Holley
50e6634137 Bug 743843 - Ditch the confusing switch-based parsing and add some comments. r=Ms2ger 2012-04-15 17:51:36 -07:00
Bobby Holley
1e648b7690 Bug 743843 - Factor individual argument parsers into helper methods. r=Ms2ger 2012-04-15 17:51:36 -07:00
Bobby Holley
d8267ab1e1 Bug 743843 - Factor out Exception argument parsing into a helper class. r=Ms2ger
For ease of reviewing, note that there are only 2 changes to the big switch statement:
1 - return ThrowAndFail(...) -> return false.
2 - eMsgBytes -> messageBytes
2012-04-15 17:51:36 -07:00
Ms2ger
1de8ab38d4 Bug 742893 - Part a: Make xpc_qsValueTo{Uint,Int}64 public; r=bholley 2012-04-14 15:07:31 +02:00
Ms2ger
c6ce9f7d79 Bug 741349 - Get rid of the mozilla::xpconnect::memory namespace; r=bholley 2012-04-14 15:05:19 +02:00
Ms2ger
a37d5dbaac Bug 741347 - Remove nsIXPConnect::DefineDOMQuickStubs, call DOM_DefineQuickStubs directly instead; r=bholley 2012-04-14 15:05:17 +02:00
Ms2ger
8299fe6b09 Backing out bf0a78471e5e:dc7022e2d807 for inexplicable windows crashes. 2012-04-14 17:52:34 +02:00
Ms2ger
2b4ce9574c Bug 745427 - Fix XPCWrappedNativeScope::SetContext; r=gal 2012-04-14 15:10:05 +02:00
Ms2ger
7164d44025 Bug 742893 - Part a: Make xpc_qsValueTo{Uint,Int}64 public; r=bholley 2012-04-14 15:07:31 +02:00
Ms2ger
5a16b6f2fa Bug 741349 - Get rid of the mozilla::xpconnect::memory namespace; r=bholley 2012-04-14 15:05:19 +02:00
Ms2ger
ead7156eeb Bug 741347 - Remove nsIXPConnect::DefineDOMQuickStubs, call DOM_DefineQuickStubs directly instead; r=bholley 2012-04-14 15:05:17 +02:00
Ms2ger
f88fab52fb Bug 741245 - Remove nsresult return value from nsXPConnect::GetSafeJSContext(); r=bholley 2012-04-14 15:05:01 +02:00
Bobby Holley
dd4ac27670 Bug 745661 - Make TI assertion handle safe mode, too. r=khuey 2012-04-16 16:57:36 -07:00
David Anderson
f84d3b7b8d Remove more uses of JS_FrameIterator (bug 744617, r=mrbkap). 2012-04-16 12:30:04 -07:00
David Anderson
2b1abddde3 Remove simple JS_FrameIterator uses in xpconnect (bug 744617, r=bholley).
--HG--
extra : rebase_source : c206450cf46011543f58cded4c5aff2d49932afd
2012-04-16 12:25:28 -07:00
Steve Fink
c7e97d8358 Bug 730208 - UnmarkGray fixups for globals and contexts. r=billm
A common source of potential black -> gray edges is JSAPI calls made on objects with gray globals or contexts holding gray globals. (The call could potentially update a black object with a pointer to that global.) This patch mostly traps places where contexts are used, and unmarks their globals. It also includes some more global unmarking.

--HG--
extra : rebase_source : 1286bdbc4c337956242c292e0fa385629ee8850b
2012-03-14 09:32:58 -07:00
Steve Fink
4642a9a56c Bug 730208 - XPConnect changes to UnmarkGray some more objects and return them for convenience. r=mccr8
--HG--
extra : rebase_source : a1d56aa4dc9dcf1fe280c42667710494f2481a7c
2012-03-20 21:22:40 -07:00
Mark Capella
1a44f1208f Bug 740688 - Use uintptr_t instead of PRUword, and intptr_t instead of PRWord. r=jwalden
--HG--
extra : rebase_source : 648a581323d2c2893df780f71fe34dadcc4bbaab
2012-04-11 17:17:44 -07:00
Luke Wagner
f5f4ed58b7 Bug 744842 - don't include actual args in error.stack.toString (r=dmandelin)
--HG--
extra : rebase_source : 66a780c6abfc4fadc7cc08ed97224296af20ad61
2012-04-11 18:07:44 -07:00
Bobby Holley
ac0a01ac3b Bug 744034 - Link the script context to the outer window earlier to ensure that we always have TI for content. r=mrbkap 2012-04-12 11:21:12 -07:00
Masatoshi Kimura
23049011a9 Bug 730161 - Replace IDBDatabaseException and FileException with DOMException. r=sicking 2012-04-11 17:55:21 -04:00
Andrew McCreight
0f2d884b02 Bug 744272. disable test_watchpoints due to bogus failures. rs=billm 2012-04-10 18:43:22 -07:00
Kyle Huey
a321486239 Refix bug 741248 harder. r=me 2012-04-09 17:41:22 -07:00
Matt Brubeck
0f3bc5ceb0 Merge last green changeset from inbound to mozilla-central 2012-04-09 10:05:48 -07:00
Igor Bukanov
5220367ed1 Bug 737364 - part 2 - replace JSContext with JSRuntime in the GC-related API
This part replaces the JSContext *cx argument in most GC-related API
with JSRuntime *rt. When possible, the patch removes the code to obtain
a temporary cx just to run the GC.

The patch also removes JS_DestroyContextMaybeGC. That function is not
used in FF code base and its implementation is broken. It requires that
the context has an entered compartment when it is destroyed, which in
turns implies a missing leave compartment call.
2012-03-28 12:13:30 +02:00
Kyle Huey
e680841744 Fix Bug 743376. r=bz 2012-04-06 17:44:50 -07:00
Bill McCloskey
90e65d2fdb Bug 742570 - Change API for compartment GCs (r=igor) 2012-04-03 12:23:11 -07:00
Bill McCloskey
3ace6566fe Bug 742570 - Remove the compartment option for gczeal (r=igor) 2012-04-03 11:41:56 -07:00
Gabor Krizsanits
c306ffc838 Bug 733035 - postMessage support for sandboxes. r=khuey 2012-04-05 18:33:20 -04:00
Takanori MATSUURA
6ba21f9576 Bug 737006 - Use internal ply only if needed. r=khuey 2012-04-06 14:06:52 -04:00
Bobby Holley
6d5b3754f7 Bug 739796 - Make same-origin cross-compartment Location object access go through the LW in the host compartment. r=gal
--HG--
extra : rebase_source : d5e07d4628bfd5990d127b4316219a43c4e0de88
2012-04-05 12:21:12 -07:00
Bobby Holley
5c79d2757f Bug 739796 - Make js_TransplantObjectWithWrapper and GetSameCompartmentSecurityWrapper play nicely together. r=mrbkap
--HG--
extra : rebase_source : c132069987b4cae121dfcf1b19ffacaee845df1e
2012-04-05 12:21:12 -07:00
Bobby Holley
a3abb07ffe Bug 739796 - Move same-compartment security wrapping into a method on XPCWrappedNative. r=gal
--HG--
extra : rebase_source : 48c61d699d27d390be2bcfb006f12264345f9d49
2012-04-05 12:21:12 -07:00
Igor Bukanov
45bee87157 Bug 737365 - stop using the cx during finalization, part 3.
This part removes the usage of JSContext* during the finalization and
when sweeping the compartments. That required to change quite a few
methods in type inference, jit and debugger implementation to take a
FreeOp rather than JSContext pointer. In turn that also often required
to replace cx->compartment usage with extracting the compartment from
the passed objects or pass the compartment explicitly. On the plus side
it allowed to remove fallible compartment enter code in methods that
could be called during finalization.
2012-03-20 11:22:05 +01:00
Igor Bukanov
83623b313c Bug 737365 - stop using the cx during finalization, part 1.
This part changes the signatures for various finalization API to take
not JSContext* but rather either JSFreeOp structure or its
library-private counterpart FreeOp. These structures wrap parameters
that are passed to the finalizers removing most of explicit dependencies
on JSContext in the finalization code.
2012-03-19 15:34:55 +01:00
Justin Lebar
c7747cbafe Bug 738624 - Add ghost windows to about:compartments. r=njn
--HG--
extra : rebase_source : c16cdfc4c06b363f54f1d0f37bb006cf977b079a
2012-04-02 22:28:05 -04:00
Terrence Cole
f55deb7328 Bug 741005 - Remove XPCNativeWrapperMap; r=bholley
This appears to be completely unused.
2012-03-30 15:56:35 -07:00
Matt Brubeck
6b29960c06 Back out bug 738011, bug 738624, and bug 737857 because of WinXP debug reftest log errors
--HG--
extra : rebase_source : 965c755f6416e2ca102b38633fe7a2c7267e956e
2012-04-02 12:44:31 -07:00
Matt Brubeck
ee9f4c7f0f Merge mozilla-central to mozilla-inbound 2012-04-02 11:03:29 -07:00
Kyle Huey
8a52e3998a Bug 722671: Components.utils.getWeakReference should get a reference to the underlying native object if possible. r=mrbkap 2012-04-01 19:21:13 -07:00
Ed Morley
7b8f9d67b3 Merge last PGO-green changeset of mozilla-inbound to mozilla-central 2012-03-31 22:41:59 +01:00
Olli Pettay
aef37dab12 Bug 641821, MutationObserver, r=sicking
--HG--
extra : rebase_source : a680c883b22976edf38eea23fb516215e081084f
2012-03-31 09:30:13 -07:00
Peter Van der Beken
c2e642fbcc Fix for bug 740069 (Generate JS bindings in C++ with a python script for DOM objects on the main thread and in workers. Infrastructure and new bindings for XMLHttpRequest). Patch by bent/bz/bholley/jst/khuey/peterv, r=bent/bz/bholley/jlebar/khuey/peterv/sicking/smaug.
--HG--
rename : js/xpconnect/tests/mochitest/test_bug462428.html => dom/bindings/test/test_lookupGetter.html
2012-03-30 21:42:20 -07:00
Terrence Cole
f39a8777a1 Bug 738868 - Switch JSObject2JSObjectMap to new HashTable; r=mrbkap 2012-03-27 09:55:55 -07:00
Peter Van der Beken
42c9f22f81 Fix for bug 740064 (Refactor XrayWrapper). r=bholley.
--HG--
extra : rebase_source : 60559d74b10761a794d83a0a63dc60a92b2d48eb
2012-03-27 16:31:37 -07:00
Doug Turner
1971e5dc9f Bug 739760 - doubles and floats can't be used in dictionaries. r=khuey 2012-03-29 00:05:44 -07:00
Luke Wagner
bcfb0e3bd1 Bug 733793 - Check for null return from JS_ObjectToOuterObject (r=bholley)
--HG--
extra : rebase_source : 2b7fbb3a72f641785de7f7707e9b6e8013b4eb6d
2012-03-28 16:15:38 -07:00
Andrew McCreight
a59c979d1b Bug 738700 - unmark wrapped gray objects from nsISupports. r=smaug 2012-03-28 21:51:46 -07:00
Andrew McCreight
6b700b5814 Bug 712735 - Don't add JS holders with no gray children as XPConnect roots. r=smaug 2012-03-28 21:23:01 -07:00
Jared Wein
ac11ea4de6 Bug 730318 - Implement a way for chrome js to enumerate the plugin objects on a page for activation. r=khuey 2012-03-28 08:53:56 -07:00
Jared Wein
a80b6db592 Backed out changeset 8e42ba558f07 (bug 730318) CLOSED TREE 2012-03-27 15:23:53 -07:00
Andrew McCreight
b2648dcd9f Bug 708825 - set mIdentity to null if compartment enter fails. r=bholley 2012-03-09 18:41:13 -08:00
Justin Lebar
155a287d43 Bug 738624 - Add ghost windows to about:compartments. r=njn
--HG--
extra : rebase_source : a486e644351af72a4276f26de2e4588ee851426f
2012-04-02 10:37:04 -04:00
Tom Schuster
fef9c89dba Bug 711843 - Update JSAPI for typed arrays, remove uses of jstypedarray.h outside the engine [r=Waldo,bz,Ms2ger,bholley,bjacob,philikon,evilpie,bent,yourmama] [a=mfinkle thanks to gkw] 2012-01-14 09:43:00 -08:00
Boris Zbarsky
a3e1420cf0 Bug 726949. Instead of using the given proto for the sandbox directly, use a proxy that forwards to the given proto but rebinds all getters/setters/methods to use the given proto, not the sandbox global, as this. r=bholley, a=tracking-firefox
The code in XPCQuickStubs.h just moved from XPCQuickStubs.cpp.
2012-04-19 14:19:41 -04:00
Ed Morley
8043672933 Backout 3e24a0ebd104 (bug 726949) for M-oth orange; a=backout 2012-04-19 12:28:43 -07:00
Boris Zbarsky
757816f10d Bug 726949. Instead of using the given proto for the sandbox directly, use a proxy that forwards to the given proto but rebinds all getters/setters/methods to use the given proto, not the sandbox global, as this. r=bholley, a=tracking-firefox
The code in XPCQuickStubs.h just moved from XPCQuickStubs.cpp.
2012-04-19 14:19:41 -04:00
Matt Brubeck
955934c3d9 Bug 743325 - Back out 554ab0a2f470 (bug 734503) because it broke touch events in XUL Fennec [r=peterv] 2012-04-24 07:51:56 -07:00
Jared Wein
883053cd10 Bug 730318 - Implement a way for chrome js to enumerate the plugin objects on a page for activation. r=khuey 2012-03-27 13:50:50 -07:00
Andrew McCreight
d1c47fdce5 Bug 736563 - mark global objects held by live windows black during GC. r=smaug 2012-03-27 12:22:10 -07:00
Gregor Wagner
ec5cd78551 Bug 678695 - Settings API. r=sicking, fabrice, smaug 2012-03-26 14:49:38 -07:00
Bobby Holley
e3df69dd0f Bug 738874 - Don't allow non-classinfo XPCWNs to be wrapped cross-compartment. r=mrbkap 2012-03-25 22:35:50 -07:00
Makoto Kato
a41e6dd26b Bug 716333 - get rid of WithConversion (xpconnect part). r=bholley 2012-03-26 14:12:15 +09:00
Igor Bukanov
7296e0408c bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke
The patch shrinks the API presented in jsxdrapi.h down to 4 functions to
encode/decode scripts and interpreted functions to/from the memory. The
newly introduced implementation header vm/Xdr.h replaces the former
JSXDRState with the template class XDRState parametrized by the enum
type with two constants, XDR_ENCODE and XDR_DECODE. This way a compiler
can fully eliminate the former runtime checks for the decoding/encoding
mode. As a drawback this required to explicitly instantiate the xdr
implementation as I do not want to put all the xdr code to header files.

The memory-only XDR allows to avoid coping filename and to-be-atomized
chars to a temporary buffer as the code can just access the buffer
directly. Another change is that new XDRScript takes as a parameter its
parent script. This allowed to avoid keeping filename in XDRState and
simplify the filename management.

Another change is the removal of JS_HAS_HDR. As CloneScript uses XDR to
copy a script, JS_HAS_XDR cannot be disabled.

--HG--
rename : js/src/jsxdrapi.cpp => js/src/vm/Xdr.cpp
extra : rebase_source : f8f1536a86b7c3fe7296a16b6677bd21664af98a
2012-02-20 11:58:00 +01:00
Matt Brubeck
f83a9ab93e Merge mozilla-central and mozilla-inbound 2012-03-24 09:05:27 -07:00
Masatoshi Kimura
9177b368f2 Bug 736686 - Part 1: Make dictionary initializers callable off main thread. r=khuey 2012-03-24 12:33:49 +01:00
Dão Gottwald
766a2b3244 Backed out changeset 30798fdc5bad 2012-03-24 12:33:30 +01:00
Peter Van der Beken
6fd0c1b877 Bug 738593 - Rename IsProxy to IsDOMBinding; r=mrbkap 2012-03-16 16:44:09 +01:00
Ms2ger
679b93a7ba Bug 736619 - remove the unused struct ClearedGlobalObject from XPCJSRuntime; r=bholley 2012-03-24 09:18:22 +01:00
Jared Wein
3f49c23fdd Backed out changeset 5f79a3dd45ff (bug 730318) r=bustage 2012-03-23 11:46:12 -07:00
Jared Wein
61ab14237c Bug 730318 - Implement a way for chrome js to enumerate the plugin objects on a page for activation. r=khuey 2012-03-22 13:53:59 -07:00