Commit Graph

56 Commits

Author SHA1 Message Date
Bobby Holley
f747c53f93 Bug 773962 - Introduce Cu.recomputeWrappers. r=mrbkap
It's sort of annoying to add this API just for tests, but there's not another
great way to trigger a compartment-wide transplant with Xray waivers
(since setting document.domain doesn't recompute wrappers to/from chrome, and
Xray waivers will stop being accessible to content entirely in bug 742444).
2012-07-23 15:51:18 +02:00
Justin Lebar
488861592f Bug 773980 - Add Components.utils.isDeadWrapper. r=bholley
--HG--
rename : js/xpconnect/tests/Makefile.in => js/xpconnect/tests/browser/Makefile.in
2012-07-19 12:39:43 -04:00
Gabor Krizsanits
2e645f31ef Bug 769273 - part3: Cu.nukeSandbox. r=bholley 2012-07-17 17:41:07 +02:00
Olli Pettay
ba65734702 Bug 773803 - Remove nsIScriptObjectOwner, r=bz
--HG--
rename : dom/base/nsIScriptObjectOwner.h => dom/base/nsIScriptEventHandlerOwner.h
2012-07-14 01:23:59 +03:00
Bobby Holley
79ab421362 Bug 771202 - Add a PostTransplant nsIXPCScriptable hook. r=peterv 2012-07-13 10:55:14 +02:00
Kyle Huey
13d799f93d Bug 765936. r=bent,peterv 2012-07-06 10:28:51 -07:00
Bill McCloskey
5ba066f3bb Bug 758034 - Clean up browser GC API (r=smaug) 2012-06-30 14:16:32 -07:00
Bobby Holley
547f3015cc Bug 755255 - Hoist pending exception junk into XPCJSRuntime. r=mrbkap 2012-06-21 16:14:49 +02:00
Fabrice Desré
d660f450c5 Bug 766378 - adds a createArrayIn() call to create JS arrays in a given scope [r=mrbkap] 2012-06-19 16:54:46 -07:00
Ms2ger
c1e5ff949e Bug 762436 - Get rid of the nsresult return value for nsIXPCScriptable::GetScriptableFlags(); r=mrbkap 2012-06-17 10:11:16 +02:00
Gervase Markham
68d38d677f Bug 759095 - upgrade license to MPL 2, and other licensing cleanups.
--HG--
extra : rebase_source : da55a4937383eda2baf7c9a362501da8ee664146
2012-05-29 16:52:43 +01:00
Gervase Markham
82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Andrew Paprocki
77fe9cf5f6 Bug 736792 - Add JSOPTION_STRICT_MODE for embedders to force ES5 strict mode for all code without requiring "use strict" annotations. r=njn 2012-05-05 15:26:16 -04:00
Ms2ger
a147767a14 Bug 741245 - Remove nsresult return value from nsXPConnect::GetSafeJSContext(); r=bholley 2012-05-05 11:00:05 +02:00
Ms2ger
1d66128fff Bug 741347 - Remove nsIXPConnect::DefineDOMQuickStubs, call DOM_DefineQuickStubs directly instead; r=bholley 2012-04-14 15:05:17 +02:00
Ms2ger
77ca860259 Backing out bf0a78471e5e:dc7022e2d807 for inexplicable windows crashes. 2012-04-14 17:52:34 +02:00
Ms2ger
23617402f0 Bug 741347 - Remove nsIXPConnect::DefineDOMQuickStubs, call DOM_DefineQuickStubs directly instead; r=bholley 2012-04-14 15:05:17 +02:00
Ms2ger
5a2d0a8476 Bug 741245 - Remove nsresult return value from nsXPConnect::GetSafeJSContext(); r=bholley 2012-04-14 15:05:01 +02:00
Ms2ger
9ae4350b73 Merge m-c to m-i. 2012-04-09 09:32:28 +02:00
Igor Bukanov
20e5c3933b 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
bcc7b8930d Fix Bug 743376. r=bz 2012-04-06 17:44:50 -07:00
Igor Bukanov
2d04a4fe3d 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
Igor Bukanov
c8154dcd0e bug 730221 - delegating serialization of script principals to the embedding. r=:luke,:bz
Currently to serialize principals stored in JSScript we have a rather complex
schema. First there is the transcode callback that the embedding must provide
to transcode principals using XDR API. Second we use rather complex glue code
to implement that callback in terms of writing/reading nsIObjectOutputStream/
nsIObjectInputStream. This glue code is duplicated in 3 places. All this can
be avoided if we simply delegate transcoding of principals to the caller. In
addition, at least in the case of the cached startup scripts we do not even
need to transcode the principals as the the cached scripts always have the
system principal so we can skip all the transcode complexity there.

The patch implemnts this idea. In particular, the code in JS engine
responsible for transcoding of principals is replaced by the single API
function JS_XDRSetPrincipals that the embedding can use to set principals for
decoded scripts and functions. Then the startup cache uses this to set the
principals for the decoded script to the system principals. The other two
places in nsJSContext::Serialize and  XBL_SerializeFunction that need to
serialize principals together with a function or script now uses common
utilities in nsXPConnect so the serialization complexity resides in the single
 place.
2012-02-13 14:10:04 +01:00
Bill McCloskey
f24f98c9e3 Bug 729369 - Expose the same set of SpiderMonkey testing APIs to debug shell and debug browser chrome (r=Waldo) 2012-03-06 11:38:44 -08:00
Bobby Holley
c6f2bff359 Bug 720580 - Do the last bit of wrapped global initialization once the dust has settled. r=mrbkap 2012-03-05 15:22:45 -08:00
Bobby Holley
3ca761b44b Bug 720580 - Stop passing aExtraPtr to InitClassesWithNewWrapedGlobal. r=mrbkap
We only ever pass null here anyway, and this whole infrastructure is going away real soon now.
2012-03-05 15:22:44 -08:00
Bobby Holley
5dd44b1a43 Bug 720580 - Remove unnecessary aIID parameter from nsIXPConnect::InitClassesWithNewWrappedGlobal. r=mrbkap 2012-03-05 15:22:44 -08:00
Bobby Holley
5541db6a29 Bug 720580 - Introduce a flag for global natives and assert that we have it. r=mrbkap 2012-03-05 15:22:44 -08:00
Bobby Holley
b103446e9c Bug 720580 - Indicate free bits in nsIXPCScriptable.idl. r=mrbkap 2012-03-05 15:22:43 -08:00
Bill McCloskey
d15702e36f Bug 641025 - Incremental GC (r=igor,smaug,roc,cdleary,gregor) 2012-02-17 14:35:20 -08:00
Bill McCloskey
dc52ba7996 Bug 706227 - Add way for JS_GC API users to give detailed reason for invocation (r=mccr8) 2012-01-25 10:59:55 -08:00
John Schoenick
3f0f696ed4 Bug 718899 - Implement Cu.forceShrinkingGC / Cu.schedulePreciseShrinkingGC r=gwagner 2012-01-19 10:58:25 -08:00
Bill McCloskey
eb67f75e9b Bug 714418 - Remove nsIXPCScriptable::DONT_SHARE_PROTOTYPE (r=bholley, sr=mrbkap) 2012-01-04 14:13:20 -08:00
Bill McCloskey
4d841fae34 Bug 714353 - Remove nsIXPCScriptable::Trace (r=mrbkap) 2012-01-04 14:13:15 -08:00
Bill McCloskey
f4f08ed1fd Bug 714350 - Remove nsXPConnect::RestoreWrappedNativePrototype (r=mrbkap) 2012-01-04 14:13:08 -08:00
Boris Zbarsky
7e84b6a57c Backing out bug 707717 because it seems to be a perf hit, not a perf win. 2011-12-28 16:22:05 -05:00
Boris Zbarsky
da78ac7b6a Bug 707717. Don't dynamically mutate the proto chains of DOM prototypes. r=peterv 2011-12-26 11:31:07 -05:00
aceman
002cb306a6 Bug 711721 - merge nsIScriptError and nsIScriptError2 interfaces; r=neil, sr=bzbarsky 2011-12-21 16:51:29 -05:00
Ms2ger
d0187a210e Bug 708330 - Use IDL for Components.utils.getWeakReference; r=bholley 2011-12-18 11:11:56 +01:00
Ms2ger
a7918e0b57 Bug 708326 - Use IDL for Components.utils.forceGC; r=bholley 2011-12-18 11:11:23 +01:00
Ms2ger
bdcd53f525 Bug 708253 - Use IDL for Components.(utils.)reportError; r=bholley 2011-12-18 11:10:59 +01:00
Ms2ger
fa37af10f4 Bug 705355 - Use IDL for Components.utils.evalInSandbox; r=bholley 2011-12-18 11:09:56 +01:00
Ms2ger
ba42d4d955 Bug 705188 - Use IDL for mozIJSSubScriptLoader::LoadSubScript, {xpcIJSModuleLoader,nsIXPCComponents_Utils}::Import; r=bz 2011-12-18 11:09:16 +01:00
Ms2ger
985487f28e Bug 705344 - Use IDL for Components.(utils.)lookupMethod; r=bholley 2011-12-18 11:08:04 +01:00
aceman
64127191a0 Bug 122213 - Display time and date of messages in toolkit's Error Console. r=neil sr=bz 2011-12-17 05:22:26 +01:00
Ed Morley
ab6e074472 Merge mozilla-central and mozilla-inbound 2011-12-04 15:04:54 +00:00
Ms2ger
18be15f0c0 Bug 705357 - Use IDL for Components.utils.getGlobalForObject; r=bholley 2011-12-03 22:50:16 +01:00
Ms2ger
4226ce573f Bug 705333 - Use IDL for nsJSCID::{CreateInstance,GetService}; r=bholley 2011-12-03 22:50:16 +01:00
Reuben Morais
5033b14eec Bug 704841 - Use implicit_jscontext for Components.utils getters. r=bholley 2011-12-03 15:59:01 +01:00
Ryan VanderMeulen
c8b2d72d22 Bug 705356 - Remove JSOPTION_JIT and JSOPTION_PROFILING. r=dvander 2011-11-28 14:57:31 -08:00