Boris Zbarsky
126e2f75e3
Bug 834785. Make sure to not ask the JS engine for return values in toplevel scripts, so it'll be able to ion-compile them as needed. r=bholley
2013-01-29 08:44:00 -05:00
Bill McCloskey
0b41061a2c
Bug 751618 - Add js/GCAPI.h (r=terrence)
2013-01-27 12:35:12 -08:00
Bobby Holley
5de758ce91
Bug 832041 - Remove nsJSContext::CompileEventHandler and move consumers to nsJSUtils::CompileFunction. r=bz
2013-01-23 07:12:50 +01:00
Bobby Holley
cecccc3751
Bug 824864 - Pass EvaluateString out-param as a pointer, not a reference. r=bz
2013-01-16 18:50:27 -08:00
Bobby Holley
cbd37c2417
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
1c16565b99
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
be2e42c870
Bug 824864 - Remove nsIScriptContext::EvaluateString. r=bz
2013-01-16 18:50:26 -08:00
Bobby Holley
9ae831b5d4
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
a7a75b2cec
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
18534b4fb8
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
cae5a1d2b0
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
9e28004745
Bug 810644 part 2. Eliminate the now-unused CallEventHandler. r=smaug, sr=peterv
2013-01-03 14:02:42 -05:00
Bobby Holley
c05806cc51
Bug 820666 - Tag XBL script for <field> elements and child scripts. r=jorendorff
2012-12-12 17:09:37 -08:00
Ms2ger
318a2969cd
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
9443b096a0
Bug 807410 - Part a: Pass the global object to the nsJSContext constructor; r=jst
2012-11-04 09:04:04 +01:00
Oonishi Atsushi
7da1007b20
Bug 801357 - Remove Get/SetProcessingScriptTag(). r=smaug
2012-10-19 21:44:13 -04:00
Bobby Holley
94833f2614
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
8c296bbcd4
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
82fd98ee23
Bug 779724 - Use finer-grain source controls in the browser. r=jorendorff, sr=jst
2012-08-07 10:39:47 -07:00
Aryeh Gregor
57c0ad57fb
Bug 777292 part 2 - Change all nsnull to nullptr
2012-07-30 17:20:58 +03:00
Ms2ger
1adbd12571
Bug 759082 - Remove nsIScriptContext::InitOuterWindow; r=mrbkap
2012-06-06 09:40:00 +02:00
Ms2ger
c1ec45dc5c
Bug 760049 - Move nsIScriptContext::CreateNativeGlobalForInner to nsGlobalWindow.cpp; r=jst
2012-06-06 09:38:51 +02:00
Nils Maier
be802ad709
Bug 754771 - Add identifying information to all system compartments. r=bz
2012-05-16 19:42:10 +02:00
Gervase Markham
87620f5676
Bug 716478 - update licence to MPL 2.
2012-05-21 12:12:37 +01:00
Mark Capella
5b2f534388
Bug 738380 - Remove nsINode::{GetScriptTypeID, SetScriptTypeID}, nsIScriptContext::GetScriptTypeID, nsIScriptRuntime::GetScriptTypeID; r=jst
2012-04-01 14:47:48 +02:00
Ms2ger
09e5acca2c
Bug 738761 - Remove nsIScriptTimeoutHandler::GetScriptVersion and pass JSVersion to nsIScriptContext::EvaluateString; r=jst
2012-03-29 23:09:13 +02:00
Ms2ger
d1ba1fe158
Bug 734724 - Inline nsIScriptContext::ConnectToInner into its only caller; r=jst
2012-03-24 09:18:22 +01:00
Ms2ger
57b8d41a26
Bug 734029 - Move nsJSContext::{Set,Create}OuterObject to nsGlobalWindow; r=bholley
2012-03-24 09:18:21 +01:00
Ms2ger
fdc871b475
Bug 734473 - Remove nsIScriptContext::FinalizeContext; r=jst
2012-03-11 09:51:22 +01:00
Ms2ger
a6baed04c8
Bug 734472 - Pass JSObject to nsIScriptContext::SetProperty; r=jst
2012-03-11 09:50:22 +01:00
Ms2ger
041916ca61
Bug 734468 - Make SetTerminationFunction return void; r=jst
2012-03-11 09:49:15 +01:00
Peter Van der Beken
98a0ede326
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
502e67c72c
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
Boris Zbarsky
62700b4c98
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
a30061699c
Back out 316d6a49a603 and 98617f7b667b (bug 624621) for jsreftest failures
2011-12-19 18:40:16 -08:00
Boris Zbarsky
f78b6a85f7
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
f4c7d3ce39
Back out c68ddc33f098 and 18332142caa5 (bug 624621) for jsreftest failures
2011-12-19 10:42:27 -08:00
Boris Zbarsky
da3127836d
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
2de98c5a5a
Bug 709524 - Remove nsIScriptContext::SetDefaultLanguageVersion; r=jst
2011-12-18 11:13:39 +01:00
Ms2ger
e55f25e5ac
Bug 698420 - Make nsScriptObjectHolder typesafe; r=bz
2011-12-18 11:05:12 +01:00
Ms2ger
74b4dc066b
Bug 698410 - Pass JSObject to nsIScriptContext::InitClasses; r=jmaher
2011-11-26 11:19:45 +01:00
Ms2ger
95876b8ee6
Bug 698408 - Pass JSObject to nsIScriptContext::SetOuterObject; r=jst
2011-11-26 11:19:15 +01:00
Ms2ger
b718e6bd76
Bug 698404 - Pass JSObject to nsIScriptContext::ConnectToInner; r=khuey
2011-11-26 11:18:28 +01:00
Ms2ger
d7ea3f6644
Bug 698395 - Give nsIScriptContext::CreateNativeGlobalForInner a JSObject outparam; r=peterv
2011-11-26 11:12:16 +01:00
Ms2ger
b744235be1
Bug 698394 - Pass JSObject handler to nsIScriptContext::BindCompiledEventHandler; r=sicking
2011-11-26 11:11:35 +01:00
Ms2ger
1404baaf43
Bug 698390 - Make nsIScriptContext::CallEventHandler take a JSObject handler parameter; r=sicking
2011-11-26 11:09:20 +01:00
Ms2ger
b6ae58dbc7
Bug 698389 - Give nsIScriptContext::CompileFunction a JSObject outparam; r=peterv
2011-11-26 11:08:42 +01:00
Ms2ger
b5a37a8757
Bug 698388 - Pass JSObject to nsIScriptContext::CompileFunction; r=sicking
2011-11-26 11:07:55 +01:00
Ms2ger
5c10d97f4e
Bug 698380 - Give nsIScriptContext::EvaluateStringWithValue a JS::Value retval parameter; r=peterv
2011-11-16 08:50:20 +01:00
Ms2ger
34278535c8
Bug 698378 - Give nsIScriptContext::EvaluateStringWithValue a JSObject* scope parameter; r=peterv
2011-11-16 08:50:19 +01:00