Граф коммитов

200 Коммитов

Автор SHA1 Сообщение Дата
Bobby Holley ad01da34e4 Bug 901162 - Inline CompileScript into the one caller. r=bz 2013-08-08 16:51:34 -07:00
Bobby Holley f2b057f9f0 Bug 901162 - Remove unused mExecuteDepth machinery. r=bz 2013-08-08 16:51:34 -07:00
Nicholas Nethercote d8f824e34e Bug 898914 (part 1) - Remove JSBool.
--HG--
extra : rebase_source : 2d202e0e5005a7f54724b1540481c15cde3ad52e
2013-08-08 15:53:04 -07:00
Arnaud Sourioux 8ebb1ca3e6 Bug 877746 - Annotate ~230 methods with MOZ_OVERRIDE in /dom. r=Ms2ger 2013-06-05 12:15:48 -04:00
Boris Zbarsky 3eabb6ea4b Bug 876805. Fix unsafe reference gc hazards in dom/ code. r=smaug 2013-05-29 16:16:04 -04:00
Bobby Holley 8f823bfe9a 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 c1533a7e3b Bug 841312 - Remove the termination function API. r=bz
\o/
2013-05-21 11:45:56 -06:00
Andrew McCreight 8765722e58 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
David Zbarsky bd907d5829 Bug 868312 - Rooting fixes for dom r=bz 2013-05-12 01:17:42 -04:00
David Zbarsky 480bf64980 Bug 868312 - Rooting fixes for dom r=bz 2013-05-10 14:22:21 -04:00
David Zbarsky b287cc2cb5 Bug 868312: Root dom/workers r=bz 2013-05-09 03:27:40 -04:00
Bobby Holley 31412343f1 Bug 868122 - Remove nsIScriptContextPrincipal. r=gabor
\o/
2013-05-06 16:53:10 -07:00
David Zbarsky 261b97262e Bug 866450 Part 2: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
Ed Morley cb8f2e846d Backed out changeset b514d768d793 (bug 866450) 2013-05-02 11:57:14 +01:00
David Zbarsky 4b33572311 Bug 866450 Part 2: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
Andrew McCreight 3c9c388be6 Bug 866151 - Clean up usage of nsCycleCollector.h and nsCycleCollectorUtils.h. r=smaug,bsmedberg
--HG--
rename : xpcom/base/nsCycleCollector.h => xpcom/glue/nsCycleCollectionJSRuntime.h
2013-04-30 10:41:22 -07:00
Jose Cortes 1068414e39 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 a2f56bac6b Bug 810644 part 2. Eliminate the now-unused CallEventHandler. r=smaug, sr=peterv 2013-01-03 14:02:42 -05:00
Terrence Cole da1156a8b0 Bug 851568 - Remove HoldScriptObject and DropScriptObject; r=smaug
--HG--
extra : rebase_source : d5bb9bff3dcdb8ceaf8ecb3ea60c96f75e0bc82a
2013-03-19 10:20:22 -07:00
Terrence Cole cd9b9a5a15 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
Olli Pettay c4afb9df69 Bug 844313 - Call GC more likely when there are lots of Events to collect, r=mccr8
--HG--
extra : rebase_source : 675ad0e5b5e22b3ccc1ec2bddac7048df57f522a
2013-03-07 20:53:19 +02:00
Bill McCloskey f192791e29 Bug 751618 - Add js/GCAPI.h (r=terrence) 2013-01-27 12:35:12 -08:00
Bobby Holley d0c7862f5e Bug 832041 - Remove nsJSContext::CompileEventHandler and move consumers to nsJSUtils::CompileFunction. r=bz 2013-01-23 07:12:50 +01:00
Bobby Holley 9fce3b092f Bug 824864 - Pass EvaluateString out-param as a pointer, not a reference. r=bz 2013-01-16 18:50:27 -08:00
Bobby Holley 5515799556 Bug 824864 - Rename EvaluateStringWithValue to EvaluateString. r=bz
Now that there's only one of them, we can get rid of the silly suffix. \o/
2013-01-16 18:50:26 -08:00
Bobby Holley 746d5bebee Bug 824864 - Remove unused optional arguments from nsIScriptContext::ExecuteScript. r=bz
This lets us get rid of a bunch of junk.
2013-01-16 18:50:26 -08:00
Bobby Holley d3d15aa3fe Bug 824864 - Remove nsIScriptContext::EvaluateString. r=bz 2013-01-16 18:50:26 -08:00
Bobby Holley a14609b21a Bug 824864 - Improve the API for EvaluateStringWithValue. r=bz
There are a few changes we make here:
1 - Having callers pass JS::CompileOptions directly.
2 - Removing aUndefined, which makes no sense and is unused by consumers.
3 - Making aScopeObject and aRetValue non-optional, via references.
3 - Adding an argument to optionally coerce the return value to a string.

Coercing jsvals to strings is the reason we currently have two nearly-identical
functions, EvaluateString and EvaluateStringWithValue, since the coercion can
trigger arbitrary script and thus needs to be bracketed by all the junk that
nsJSContext does. However, if callers can be guaranteed that the return value
will be a bonafide string, then they can easily extract the string themselves
if they so desire. This will allow us to combine the two functions.
2013-01-16 18:50:26 -08:00
Bobby Holley 5a19a07bef Bug 824864 - Move consumers of CompileFunction to the nsJSUtils version, and kill the nsJSContext version. r=bz
Note that the three consumers were all XBL, and were all passing aShared = true,
which had the effect of passing null for the target object. So we actually want
to pass JS::NullPtr() (the HandleObject version of nullptr) instead of
aClassObject in order to maintain the old behavior (whatever that is).
2013-01-16 18:50:25 -08:00
Olli Pettay 1defaa48e6 Bug 825544: backout Bug 825544, Bug 825544, Bug 765192 and Bug 808035 to bring back the old .location=val behavior, r=bz 2013-01-15 13:46:35 +02:00
Boris Zbarsky 29436c441d Back out bug 810644 for now to fix bug 827035, until we manage to fix bug 765780. r=stuff-is-broken 2013-01-07 10:29:00 -05:00
Boris Zbarsky ccbf48cfbb Bug 810644 part 2. Eliminate the now-unused CallEventHandler. r=smaug, sr=peterv 2013-01-03 14:02:42 -05:00
Bobby Holley be465ba470 Bug 820666 - Tag XBL script for <field> elements and child scripts. r=jorendorff 2012-12-12 17:09:37 -08:00
Saurabh Anand 6de7befa37 Bug 818817 - Fix some compiler warnings, r=Ms2ger 2012-12-09 22:53:19 +05:30
Boris Zbarsky 05e4e3b75a Bug 779048 part 1. Implement a parent class for C++ reflections of callback functions in WebIDL. r=bholley,smaug 2012-11-09 07:43:57 -08:00
Ms2ger b903541457 Bug 807410 - Part b: Pass the "GC on destruction" flag to the nsJSContext constructor; r=jst 2012-11-04 09:05:23 +01:00
Ms2ger af22942dae Bug 807410 - Part a: Pass the global object to the nsJSContext constructor; r=jst 2012-11-04 09:04:04 +01:00
Oonishi Atsushi fdba665101 Bug 801357 - Remove Get/SetProcessingScriptTag(). r=smaug 2012-10-19 21:44:13 -04:00
Bobby Holley 9b319107a7 Bug 795275 - Introduce an explicit mechanism for determining if a script is from XBL. r=mrbkap
We want this right now so that we can avoid the scary warning when content Components
access happens in XBL (which we're allowing going forward). This patch would be overkill
just for that, but I also have plans to introduce a SOW-like protection of the Components
wrapper filtering policy. I can't just do the filename hack for that though, because real-
world XBL filenames might be all over the place. So let's just be safe here.
2012-10-03 11:44:18 +02:00
Ehsan Akhgari e368dc9c85 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Benjamin Peterson f1b4836bc8 Bug 779724 - Use finer-grain source controls in the browser. r=jorendorff, sr=jst 2012-08-07 10:39:47 -07:00
Ms2ger 78e3c35a3c Bug 672814 - Part a: Move nsJSRuntime::ParseVersion to nsContentUtils; r=bz 2012-08-04 09:43:59 +02:00
Ed Morley f4181983a1 Revert inbound to 3d5d1daa2505 to stop OS X M5 failures (backout not clean/could have been a bad merge) on a CLOSED TREE 2012-08-04 18:05:15 +01:00
Ms2ger 2304ff656b Bug 672814 - Part a: Move nsJSRuntime::ParseVersion to nsContentUtils; r=bz 2012-08-04 09:43:59 +02:00
Bill McCloskey 0601c9b406 Bug 767209 - Consider changing GC slice time, or making it dynamic (r=terrence,smaug) 2012-07-31 18:39:39 -07:00
Aryeh Gregor d0ad5a7d0c Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Bill McCloskey 5ba066f3bb Bug 758034 - Clean up browser GC API (r=smaug) 2012-06-30 14:16:32 -07:00
Andrew McCreight fd586ea5d8 Bug 754495, part 7 - indicate if CycleCollectNow is forced. r=smaug 2012-06-27 08:10:20 -07:00
Ehsan Akhgari 4830dd98a3 Bug 758992 - Make the classes which use the XPCOM nsISupports implementation macros final, to avoid the warning about deleting using a pointer to a base class with virtual functions and no virtual dtor (dom parts); r=bzbarsky 2012-06-14 22:31:55 -04:00
Bill McCloskey 04230e70f9 Bug 758034 - Create separate inter-slice GC timer (r=smaug) 2012-06-10 21:27:59 -07:00
Ms2ger 8e88a95ce6 Bug 759082 - Remove nsIScriptContext::InitOuterWindow; r=mrbkap 2012-06-06 09:40:00 +02:00
Ms2ger 15eaf9e1a1 Bug 760049 - Move nsIScriptContext::CreateNativeGlobalForInner to nsGlobalWindow.cpp; r=jst 2012-06-06 09:38:51 +02:00
Nils Maier eb4ff8a701 Bug 754771 - Add identifying information to all system compartments. r=bz 2012-05-16 19:42:10 +02:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Olli Pettay add06019f5 Bug 716014 Investigate if we could use CompartmentGC more often, r=billm+terrence
--HG--
extra : rebase_source : f0cfb9cdd2e2823898f4c18402df53e7b6041bac
2012-05-09 21:53:23 +03:00
Olli Pettay 71fe5764b1 Backout Bug 716014, a=bustage 2012-05-05 18:20:09 +03:00
Olli Pettay 387930525f Bug 716014, use compartment gc more often, r=billm
--HG--
extra : rebase_source : cf20b7aca16349e4007da24cfb5b19ab7a16cad8
2012-05-05 11:55:30 +03:00
Olli Pettay f4603a370b Bug 751561 - Call forgetSkippable at least twice before CC, r=mccr8
--HG--
extra : rebase_source : 7434eb9be0bbdfd7fe44e1aeced9698d6c0627e1
2012-05-03 19:17:01 +03:00
Bobby Holley 48dcb4071b 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
Mark Capella 62db5d9389 Bug 738380 - Remove nsINode::{GetScriptTypeID, SetScriptTypeID}, nsIScriptContext::GetScriptTypeID, nsIScriptRuntime::GetScriptTypeID; r=jst 2012-04-01 14:47:48 +02:00
Ms2ger 339ed99017 Bug 738761 - Remove nsIScriptTimeoutHandler::GetScriptVersion and pass JSVersion to nsIScriptContext::EvaluateString; r=jst 2012-03-29 23:09:13 +02:00
Ms2ger 17b4bd6504 Bug 734724 - Inline nsIScriptContext::ConnectToInner into its only caller; r=jst 2012-03-24 09:18:22 +01:00
Ms2ger 87769c19ad Bug 734029 - Move nsJSContext::{Set,Create}OuterObject to nsGlobalWindow; r=bholley 2012-03-24 09:18:21 +01:00
Bill McCloskey 536021f834 Bug 735014 - Wait longer for PAGE_HIDE GCs (r=smaug) 2012-03-12 16:25:03 -07:00
Ms2ger 1442c59d93 Bug 734481 - Make nsIJSArgArray inherit from nsIArray; r=jst 2012-03-11 09:53:05 +01:00
Ms2ger 1c8f3fe8f8 Bug 734473 - Remove nsIScriptContext::FinalizeContext; r=jst 2012-03-11 09:51:22 +01:00
Ms2ger 41880c8da4 Bug 734472 - Pass JSObject to nsIScriptContext::SetProperty; r=jst 2012-03-11 09:50:22 +01:00
Ms2ger 37fbbb6164 Bug 734468 - Make SetTerminationFunction return void; r=jst 2012-03-11 09:49:15 +01:00
Peter Van der Beken 34f61797c8 Fix for bug 637099 (Remove JS_ClearScope calls on windows). r=mrbkap.
--HG--
extra : rebase_source : 8bdadc72a0b28c78e21758fab8f1035ee1dd9f3d
2011-03-15 12:06:39 +01:00
Bill McCloskey d15702e36f Bug 641025 - Incremental GC (r=igor,smaug,roc,cdleary,gregor) 2012-02-17 14:35:20 -08:00
Olli Pettay ef677e07dd Bug 721543 - Call forgetSkippable before CC, r=mccr8
--HG--
extra : rebase_source : 4be50f8bcab1418c563394379abb6b4f074697b3
2012-01-30 22:06:18 +02:00
Olli Pettay 0ee8497d4d Bug 720808 - Add nsJSEventListener and nsGlobalWndow to BBP, r=mccr8
--HG--
extra : rebase_source : e6512fe1b8b19b3ddd959b992ce0f2672b0b072f
2012-01-26 16:03:21 +01: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
Ms2ger 776fd33214 Bug 332648 - Part e: Move AutoArrayRooter to jsapi.h; r=evilpie 2012-01-11 09:23:09 +01:00
Igor Bukanov e832967458 bug 713916 - DOMGCFinishedCallback should schedule just GC buffer shrinking, not a full shrinking GC. r=bent 2011-12-27 12:59:29 +01:00
Boris Zbarsky 553111de9c Bug 624621 part 2. Add an origin principal argument on nsIScriptContext::EvaluateString and pass that through to the JS engine. r=mrbkap 2011-12-19 12:47:52 -05:00
Phil Ringnalda 6755b58eda Back out 316d6a49a603 and 98617f7b667b (bug 624621) for jsreftest failures 2011-12-19 18:40:16 -08:00
Boris Zbarsky afebd76ac7 Bug 624621 part 2. Add an origin principal argument on nsIScriptContext::EvaluateString and pass that through to the JS engine. r=mrbkap 2011-12-19 12:47:52 -05:00
Matt Brubeck 1a0a35d860 Back out c68ddc33f098 and 18332142caa5 (bug 624621) for jsreftest failures 2011-12-19 10:42:27 -08:00
Boris Zbarsky 1231fb53c7 Bug 624621 part 2. Add an origin principal argument on nsIScriptContext::EvaluateString and pass that through to the JS engine. r=mrbkap 2011-12-19 12:47:52 -05:00
Ms2ger 1f5b3d83bd Bug 709524 - Remove nsIScriptContext::SetDefaultLanguageVersion; r=jst 2011-12-18 11:13:39 +01:00
Ms2ger d717a67336 Bug 698420 - Make nsScriptObjectHolder typesafe; r=bz 2011-12-18 11:05:12 +01:00
Jeff Walden 735580ff0e Bug 708735 - Use <stdint.h> types in JSAPI and throughout SpiderMonkey. Continue to provide the {u,}int{8,16,32,64} and JS{Uint,Int}{8,16,32,64} integer types through a single header, however, for a simpler backout strategy -- and also to ease the transition for embedders. r=timeless on switching the jsd API to use the <stdint.h> types, r=luke, r=dmandelin 2011-12-08 22:54:10 -05:00
Terrence Cole b08432d55e Bug 699279 - Run GC_SHRINK collection cycle when under memory pressure; r=mrbkap
GC_SHRINK is a fairly new type of GC that does more aggressive cleanups than a
normal GC.  This patch makes the browser run the GC in this mode when under
memory pressure, or when the user pushes the Minimize Memory Usage button when
on the about:memory page.

--HG--
extra : rebase_source : abdd11ee5fa5eb0e3d58122d3d72e98328d47668
2011-11-09 18:14:11 -08:00
Ms2ger 1b4e5e652c Bug 698410 - Pass JSObject to nsIScriptContext::InitClasses; r=jmaher 2011-11-26 11:19:45 +01:00
Ms2ger 0f27987dfd Bug 698408 - Pass JSObject to nsIScriptContext::SetOuterObject; r=jst 2011-11-26 11:19:15 +01:00
Ms2ger a939d63cd6 Bug 698404 - Pass JSObject to nsIScriptContext::ConnectToInner; r=khuey 2011-11-26 11:18:28 +01:00
Ms2ger cacbdf70c6 Bug 698395 - Give nsIScriptContext::CreateNativeGlobalForInner a JSObject outparam; r=peterv 2011-11-26 11:12:16 +01:00
Ms2ger bb83fee064 Bug 698394 - Pass JSObject handler to nsIScriptContext::BindCompiledEventHandler; r=sicking 2011-11-26 11:11:35 +01:00
Ms2ger 7b498fc60c Bug 698390 - Make nsIScriptContext::CallEventHandler take a JSObject handler parameter; r=sicking 2011-11-26 11:09:20 +01:00
Ms2ger e0996917fc Bug 698389 - Give nsIScriptContext::CompileFunction a JSObject outparam; r=peterv 2011-11-26 11:08:42 +01:00
Ms2ger 60c3f2d161 Bug 698388 - Pass JSObject to nsIScriptContext::CompileFunction; r=sicking 2011-11-26 11:07:55 +01:00
Ms2ger ca1d96f999 Bug 698380 - Give nsIScriptContext::EvaluateStringWithValue a JS::Value retval parameter; r=peterv 2011-11-16 08:50:20 +01:00
Ms2ger d8a3105318 Bug 698378 - Give nsIScriptContext::EvaluateStringWithValue a JSObject* scope parameter; r=peterv 2011-11-16 08:50:19 +01:00
Ms2ger 1dacc7fc0b Bug 696604 - Remove nsIScriptContext::CompileScript's aScopeObject parameter; r=peterv 2011-11-16 08:50:19 +01:00
Ms2ger a4e37b2f13 Bug 696660 - Outparamdel nsIScriptRuntime::CreateContext; r=mrbkap 2011-11-16 08:50:19 +01:00
Ms2ger 7852c8dc13 Bug 696668 - Give nsIScriptContext::CallEventHandler a JSObject scope parameter; r=mrbkap 2011-10-29 22:19:03 +02:00
Ms2ger a4ff6e7232 Bug 696666 - Give nsIScriptContext::BindCompiledEventHandler a JSObject scope parameter; r=jst 2011-10-29 22:18:21 +02:00
Ms2ger b6e4d8c64c Bug 696665 - Give nsJSContext::JSObjectFromInterface a JSObject scope parameter; r=volkmar 2011-10-29 22:17:00 +02:00
Ms2ger 7834af665f Bug 694867 - Part f: Pass a JSScript to nsIScriptContext::ExecuteScript; r=volkmar 2011-10-29 22:15:43 +02:00