Commit Graph

992 Commits

Author SHA1 Message Date
Igor Bukanov
c7c6b4d07a 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
e53a94555b Bug 736643 - Add timestamp support to GC/CC JSON output (r=terrence) 2012-03-16 16:36:26 -07:00
Boris Zbarsky
830492af6c Bug 742217. Reduce the use of nested namespaces in our binding code. r=peterv,bent
In the new setup, all per-interface DOM binding files are exported into
mozilla/dom.  General files not specific to an interface are also exported into
mozilla/dom.

In terms of namespaces, most things now live in mozilla::dom.  Each interface
Foo that has generated code has a mozilla::dom::FooBinding namespace for said
generated code (and possibly a mozilla::bindings::FooBinding_workers if there's
separate codegen for workers).

IDL enums are a bit weird: since the name of the enum and the names of its
entries all end up in the same namespace, we still generate a C++ namespace
with the name of the IDL enum type with "Values" appended to it, with a
::valuelist inside for the actual C++ enum.  We then typedef
EnumFooValues::valuelist to EnumFoo.  That makes it a bit more difficult to
refer to the values, but means that values from different enums don't collide
with each other.

The enums with the proto and constructor IDs in them now live under the
mozilla::dom::prototypes and mozilla::dom::constructors namespaces respectively.
Again, this lets us deal sanely with the whole "enum value names are flattened
into the namespace the enum is in" deal.

The main benefit of this setup (and the reason "Binding" got appended to the
per-interface namespaces) is that this way "using mozilla::dom" should Just
Work for consumers and still allow C++ code to sanely use the IDL interface
names for concrete classes, which is fairly desirable.
2012-05-03 00:35:38 -04:00
Bobby Holley
e45a0ff634 Bug 743615 - Handle ImageData in the main thread runtime callbacks. r=bent 2012-04-24 12:58:07 +02:00
David Anderson
dc94dc513f Remove simple JS_FrameIterator use from content, DOM, and caps (bug 744617, r=mrbkap). 2012-04-16 12:30:00 -07:00
Brian Hackett
489dbdacd4 Allow purging analysis-temporary while retaining jitcode, bug 778724. r=luke 2012-08-22 12:28:34 -06:00
Bill McCloskey
f2e0e7f623 Bug 735916 - Fix javascript.options.mem.log (r=terrence) 2012-03-14 16:50:35 -07:00
Terrence Cole
2ef0d95427 Bug 531396 - Expose detailed GC timing information API; r=smaug,billm
Extensions such as MemChaser would really like an easier to parse and more
complete record of GC events than what can be gleaned from the message console.
This patch adds GC and CC observer messages formatted as JSON containing
detailed statistics.
2012-03-05 15:33:24 -08:00
Bill McCloskey
21ecc76fde Bug 735014 - Wait longer for PAGE_HIDE GCs (r=smaug) 2012-03-12 16:25:03 -07:00
David Anderson
eb3f356a23 Remove JS_GetScriptedCaller (bug 732652, r=luke,mrbkap,bholley,smaug,bent). 2012-03-06 15:33:12 -08:00
Ms2ger
05d54939d3 Bug 734481 - Make nsIJSArgArray inherit from nsIArray; r=jst 2012-03-11 09:53:05 +01:00
Ms2ger
7f50c01648 Bug 734473 - Remove nsIScriptContext::FinalizeContext; r=jst 2012-03-11 09:51:22 +01:00
Ms2ger
a4ed3412d5 Bug 734472 - Pass JSObject to nsIScriptContext::SetProperty; r=jst 2012-03-11 09:50:22 +01:00
Ms2ger
ca534ac4e2 Bug 734468 - Make SetTerminationFunction return void; r=jst 2012-03-11 09:49:15 +01:00
Igor Bukanov
4797d46af3 bug 728250 - remove JSPrincipals::codebase. r=:luke,:bz
In just 2 cases where JSPrincipals::codebase is used it can be reconstructed from the values stored in the associated nsJSPrincipal. In addition the patch makes nsJSprincipals to inherit both from nsIPrincipal and JSPrincipals allowing to use static_cast to convert between nsIPrincipal and JSPrincipals pointers and to drop many cases of manual JSPrincipal reference counting.
2012-03-09 10:48:50 +01:00
Jacob Holzinger
bfaddb970e Bug 696242 - Convert NS_RegisterStaticAtoms and nsCSSScanner::ReportUnexpectedParams to take an array-reference rather than a pointer and length, making it impossible to pass a pointer/length that are inconsistent. r=jwalden 2012-03-08 18:22:57 -08:00
Bill McCloskey
76431dbbcd Bug 730853 - Make sure we occasionally CC with lots of incremental GCs (r=smaug,mccr8) 2012-03-08 15:37:13 -08:00
Bobby Holley
45d8f06150 Bug 733606 - Only call FinishInitForWrappedGlobal when we just created a global. r=mrbkap
Without this patch, we call the above when restoring things out of the bfcache, which is bad. It must be called exactly once.
2012-03-08 09:33:30 -08:00
Bobby Holley
80183a5fe8 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
9462576942 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
3ce325ec9b Bug 720580 - Remove unnecessary aIID parameter from nsIXPConnect::InitClassesWithNewWrappedGlobal. r=mrbkap 2012-03-05 15:22:44 -08:00
Andrew McCreight
5af4c80989 Bug 728460, part 2: remove childless nodes in slice before CC. r=smaug 2012-03-05 13:48:33 -08:00
David Mandelin
f0690b22d1 Bug 730511: remove obsolete typedefs intN, uintN, r=luke 2012-02-28 15:11:11 -08:00
Peter Van der Beken
e1f6ecb101 Fix for bug 637099 (Remove JS_ClearScope calls on windows). r=mrbkap. 2011-03-15 12:06:39 +01:00
Olli Pettay
0f8b1d252d Bug 730753, call CC after full GC, r=mccr8 2012-02-27 16:49:59 +02:00
Andrew McCreight
8457a74978 Bug 697115 - return detailed CC results. r=smaug 2012-02-23 20:16:37 -08:00
Luke Wagner
fe8ad8fe79 Bug 720289 - Back out most of bug 699974 (r=jst) 2012-02-22 19:39:29 -08:00
Olli Pettay
ada7131936 Bug 728547 - Increase the forgetSkippable timer value, r=mccr8 2012-02-19 20:36:06 +02:00
Bill McCloskey
ca293fdba6 Bug 641025 - Incremental GC (r=igor,smaug,roc,cdleary,gregor) 2012-02-17 14:35:20 -08:00
Chris Leary
cd8032094d Bug 700822: Randomize JIT VirtualAlloc location on win32, sans XP. (r=dmandelin) 2012-02-13 21:36:11 -08:00
Olli Pettay
820f90dade Bug 726007 - Add telemetry probes for forgetSkippable, r=mccr8 2012-02-11 01:30:20 +02:00
Igor Bukanov
6fefb1df81 bug 724310 - drop cx argument from JSObject field and fixed slots infallible API. r=:Waldo 2012-02-05 21:07:23 +01:00
Igor Bukanov
ae7ab9b03a backout merge for bug 724310. r=irc 2012-02-09 21:28:22 +01:00
Igor Bukanov
12633fbfdd bug 723517 - drop cx argument from JSObject field and fixed slots infallible API. r=:Waldo 2012-02-05 21:07:23 +01:00
Saint Wesonga
eccbb75824 Bug 394769. Remove the additional lateness argument for timeouts and intervals. r=jst 2012-02-07 15:28:08 -05:00
Igor Bukanov
889c9d4073 bug 723517 - Drop cx argumrent from JS_GetClass(cx, obj). r=luke 2012-02-04 01:54:57 +01:00
Jonathan Kew
9e798742a1 backout c18523b51058 (bug 716014) on suspicion of causing Win Debug reftest timeouts. 2012-02-03 14:01:35 +00:00
Olli Pettay
c2bc621d8f Bug 716014 - Use CompartmentGC more often, r=billm,mccr8 2012-02-02 22:34:53 +02:00
Olli Pettay
0799ed0cd9 Bug 723157 - Call forgetSkippable more often, r=mccr8 2012-02-01 19:44:03 +02:00
Olli Pettay
78732fc803 Bug 723064 - Many debug xpcshell-tests show leaks of 1 each of Mutex, ReentrantMonitor, nsTArray_base, nsThread, nsTimerImpl, r=mccr8 2012-02-01 19:41:17 +02:00
Olli Pettay
67b82b8d3e Bug 721543 - Call forgetSkippable before CC, r=mccr8 2012-01-30 22:06:18 +02:00
Bill McCloskey
6cb04d72a6 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
Andrew McCreight
899e7bf560 bug 717711 - telemetry for time in between cycle collections. r=smaug 2012-01-20 12:02:18 -08:00
Ms2ger
e438a30564 Bug 677079 - Part k: Expose outstandingRequests in jsfriendapi.h; r=cdleary 2012-01-15 09:13:09 +01:00
Ms2ger
5fcd0ca0d9 Bug 677079 - Part h: Expose debuggerHandler in jsfriendapi.h; r=igor 2012-01-15 09:13:09 +01:00
Ms2ger
481d42e3d2 Bug 332648 - Part e: Move AutoArrayRooter to jsapi.h; r=evilpie 2012-01-11 09:23:09 +01:00
Ms2ger
5724ce0b4e Bug 332648 - Part c: Move AutoObjectRooter to jsapi.h; r=evilpie 2012-01-11 09:23:08 +01:00
Igor Bukanov
c5a3bd45a9 bug 713916 - DOMGCFinishedCallback should schedule just GC buffer shrinking, not a full shrinking GC. r=bent 2011-12-27 12:59:29 +01:00
aceman
8a85ef9b8e Bug 711721 - merge nsIScriptError and nsIScriptError2 interfaces; r=neil, sr=bzbarsky 2011-12-21 16:51:29 -05:00
Boris Zbarsky
08b580d119 Bug 624621 part 3. Use the pre-redirect filename as the script filename and the channel principal as the origin principal, and base our cross-origin check on the origin principal. r=mrbkap 2011-12-19 12:48:12 -05:00