Jon Coppeard
556585c65f
Bug 1297558 - Remove explicit calls to Expose*ToActiveJS r=mccr8
2016-10-18 17:58:19 +01:00
Jon Coppeard
38b109439a
Bug 1307372 - Avoid triggering mCallback read barrier in CallbackObject::CallbackKnownNotGray r=mccr8
2016-10-05 10:09:24 +02:00
Xidorn Quan
31f5ebf083
Bug 1287706 part 1 - Make CallbackObjectHolder movable (and actually move-only). r=smaug
...
So that we can avoid unnecessary refcount changes.
MozReview-Commit-ID: 4Mk9SJTj6AS
--HG--
extra : source : c35643f76ef33b6cdce115c8de0dfae8abccd644
2016-07-28 12:00:06 +10:00
Andrew McCreight
1d1ce1020c
Bug 1283636 - Use CallbackPreserveColor() less. r=bz
...
Some places call CallbackPreserveColor() because they know the object
must have already been marked black. This patch replaces those calls
with a new function CallbackKnownNotGray() which documents and
dynamically checks this assumption.
2016-07-13 13:28:00 +02:00
Jan de Mooij
a53a99aab6
Bug 1284808 - Rename RuntimeOptions to ContextOptions and move it to the context. r=luke,baku
...
--HG--
extra : rebase_source : acd82642a27b36b98bf1bf34c29d33c7e0b57dea
2016-07-07 08:15:15 +02:00
Boris Zbarsky
bfc23d53a8
Bug 1273661 part 3. Add the codegen bits and Trace implementation to allow Web IDL callbacks to not have to HoldJSObjects until the bindings have determined that someone is actually holding on to the callback object. r=smaug,terrence
2016-05-18 12:23:35 -04:00
Boris Zbarsky
24fa4ec444
Bug 1273661 part 1. Add a way to construct a callback object without calling HoldJSObjects. r=smaug
2016-05-18 12:23:35 -04:00
Boris Zbarsky
61b3aedfa3
Backed out changesets bdb5b50fd858, 74dbcb56456d, 8f319062be85, 9806d7a88802, c08f417d85fd (bug 1273661) for build bustage and CLOSED TREE.
2016-05-19 00:26:24 -04:00
Boris Zbarsky
5938137a2b
Bug 1273661 another followup. Guess that msvc is not being happy with OwningNonNull not being pulled in here. r=STILL CLOSED TREE
2016-05-19 00:01:43 -04:00
Boris Zbarsky
1a82ba56e3
Bug 1273661 followup. We need different RootedCallback destructors for the OwningNonNull and RefPtr cases, unfortuntately. r=CLOSED TREE
2016-05-18 23:38:23 -04:00
Boris Zbarsky
893059f88a
Bug 1273661 part 3. Add the codegen bits and Trace implementation to allow Web IDL callbacks to not have to HoldJSObjects until the bindings have determined that someone is actually holding on to the callback object. r=smaug,terrence
2016-05-18 12:23:35 -04:00
Boris Zbarsky
384428f2af
Bug 1273661 part 1. Add a way to construct a callback object without calling HoldJSObjects. r=smaug
2016-05-18 12:23:35 -04:00
Ms2ger
dd6ade76ab
Bug 1260417 - Part c: Stop mentioning requests around CallSetup::mRootedCallable; r=bz
...
Rooted used to only work when the JSContext was in a request. This has long
been rectified, so the comments referring to that constraint are confusing at
best.
2016-04-07 09:11:52 +02:00
Ms2ger
c005f7ce82
Bug 1260417 - Part a: Add a comment about the compartment of CallbackObject::mCallback; r=bz
2016-04-07 09:11:52 +02:00
Nathan Froyd
cccdd9fbca
Bug 1177488 - use |const char*| for representing async call reasons; r=bz,fitzgen
...
Using a simple |const char*| is more memory-efficient than allocating a
JS string. We still have to allocate the JS string for passing things
into JS, but ideally we will be able to move the point of allocation
much closer to where it's actually needed, rather than indiscriminantly
doing it all the time.
2016-03-23 10:40:53 -04:00
Wes Kocher
ea76ed99d7
Backed out changeset 95494e68c722 (bug 1177488) for crashes in test_bug732665.xul CLOSED TREE
...
MozReview-Commit-ID: IFUHUBUCnCD
2016-03-25 12:11:48 -07:00
Nathan Froyd
418aa2af4f
Bug 1177488 - use |const char*| for representing async call reasons; r=bz,fitzgen
...
Using a simple |const char*| is more memory-efficient than allocating a
JS string. We still have to allocate the JS string for passing things
into JS, but ideally we will be able to move the point of allocation
much closer to where it's actually needed, rather than indiscriminantly
doing it all the time.
2016-03-23 10:40:53 -04:00
Till Schneidereit
6602beaac6
Bug 1257030 - Add support for supplying preexisting stack instead of capturing one for use as the async parent stack of CallbackObject. r=bz,tromey
2016-03-17 18:07:43 +01:00
Wes Kocher
168746512d
Backed out changeset ee3c99e6f676 (bug 1177488) for LeakSanitizer failures
...
MozReview-Commit-ID: FFfF4u2vOrS
--HG--
extra : rebase_source : 0c7f5e290b388b2f35837a5f757f2d962b973da3
2016-03-14 13:15:21 -07:00
Nathan Froyd
6b6c2a1fcd
Bug 1177488 - use |const char*| for representing async call reasons; r=bz,fitzgen
...
Using a simple |const char*| is more memory-efficient than allocating a
JS string. We still have to allocate the JS string for passing things
into JS, but ideally we will be able to move the point of allocation
much closer to where it's actually needed, rather than indiscriminantly
doing it all the time.
2016-03-08 16:29:25 -05:00
Nathan Froyd
c381a6b86c
Bug 1218454 - part 2 - don't #include nsContentUtils.h from CallbackObject.h; r=bz
...
We used to need nsContentUtils.h here for nsCxPusher, but since that got
moved to ScriptSettings.h, we no longer need nsContentUtils.h for
anything.
2015-10-26 12:14:47 -04:00
Boris Zbarsky
89a6485e7f
Bug 1172246. Make sure CallSetup's handling of exceptions it wants to deal with itself works even when the callable is a JSNative that uses the JS_Report*Error APIs instead of throwing exceptions in the usual way. r=bholley
2015-06-08 16:16:27 -04:00
Boris Zbarsky
888bc2d651
Back out bug 1172246 because of mochitest-JP bustage. Who needs tests that we care about running on try anyway?
2015-11-20 18:00:27 -05:00
Boris Zbarsky
bc25c907d6
Bug 1172246. Make sure CallSetup's handling of exceptions it wants to deal with itself works even when the callable is a JSNative that uses the JS_Report*Error APIs instead of throwing exceptions in the usual way. r=bholley
2015-06-08 16:16:27 -04:00
Nathan Froyd
01583602a9
Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
...
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout. The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.
CLOSED TREE makes big refactorings like this a piece of cake.
# The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
xargs perl -p -i -e '
s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
s/nsRefPtr ?</RefPtr</g; # handle declarations and variables
'
# Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h
# Handle nsRefPtr.h itself, a couple places that define constructors
# from nsRefPtr, and code generators specially. We do this here, rather
# than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
# things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
mfbt/nsRefPtr.h \
xpcom/glue/nsCOMPtr.h \
xpcom/base/OwningNonNull.h \
ipc/ipdl/ipdl/lower.py \
ipc/ipdl/ipdl/builtin.py \
dom/bindings/Codegen.py \
python/lldbutils/lldbutils/utils.py
# In our indiscriminate substitution above, we renamed
# nsRefPtrGetterAddRefs, the class behind getter_AddRefs. Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'
if [ -d .git ]; then
git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Olli Pettay
efbb629c53
Bug 1196317 - Optimize CallbackObject::mCreationStack out from cycle collection graph when possible, r=mccr8
...
--HG--
extra : rebase_source : af43dc4dfaf68ee979b3111134dc7ea006e1226d
2015-08-20 18:36:06 +03:00
Tom Tromey
9f3b16bf4c
Bug 1148593 - Create async stack in callback objects. r=bz, r=fitzgen
...
--HG--
extra : rebase_source : f9b507d8f005dbca6f40f510ca41a0cbb03aebf9
2015-07-24 07:01:00 -04:00
Tom Tromey
a37b7fa928
Bug 1148593 - Pass JSContext to CallbackObject constructor. r=bz
...
--HG--
extra : rebase_source : 5c4c1b8dc646fc76bda37a8c6e35a6494d0800b8
2015-07-24 07:00:00 -04:00
Ryan VanderMeulen
b171b787bd
Backed out changesets fa9fe193778f and 3eaf867930dd (bug 1148593) for test_async_setTimeout_stack.html and test_async_setTimeout_stack_across_globals.html failures.
2015-07-17 12:37:24 -04:00
Tom Tromey
843465db8e
Bug 1148593 - Create async stack in callback objects. r=bz, r=fitzgen
2015-07-17 07:48:00 -04:00
Tom Tromey
2bbc02624b
Bug 1148593 - Pass JSContext to CallbackObject constructor. r=bz
2015-07-17 07:47:00 -04:00
Andrew McCreight
9e8f4b219e
Bug 1152551, part 2 - Fix mode lines in dom/. r=jst
2015-05-03 15:32:37 -04:00
Ehsan Akhgari
399276d5fc
Bug 1153348 - Add an analysis to prohibit operator bools which aren't marked as either explicit or MOZ_IMPLICIT; r=jrmuizel
...
This is the counterpart to the existing analysis to catch
constructors which aren't marked as either explicit or
MOZ_IMPLICIT.
2015-04-21 21:40:49 -04:00
Wes Kocher
638b28b8e0
Backed out changeset 02e6a50741a9 (bug 1153348) to hopefully fix the static bustage CLOSED TREE
2015-04-21 15:47:40 -07:00
Ehsan Akhgari
3d21a05904
Bug 1153348 - Add an analysis to prohibit operator bools which aren't marked as either explicit or MOZ_IMPLICIT; r=jrmuizel
...
This is the counterpart to the existing analysis to catch
constructors which aren't marked as either explicit or
MOZ_IMPLICIT.
2015-04-21 16:31:58 -04:00
Jim Blandy
ebd83c9a61
Bug 1152577: Add 'aReason' argument to AutoEntryScript constructor, and provide plausible names for its instantiations. r=bholley
...
--HG--
extra : rebase_source : 8ab7a3628a5b4d94b957f24e23e4c5c7871db97c
2015-04-08 21:23:48 -04:00
Boris Zbarsky
8615709f13
Bug 1107953 part 1. Change the invariants around aCompartment in CallSetup to allow passing it even when the exception handling mode is eRethrowExceptions. r=bholley
2015-01-15 17:39:01 -05:00
Ehsan Akhgari
4354953b4f
Bug 1118486 - Part 1: Use `= delete` instead of MOZ_DELETE directly; r=Waldo
...
Most of this patch (with the exception of dom/bindings/Codegen.py) was
generated by the following bash script:
#!/bin/bash
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*/.hg*" \
! -wholename "*/.git*" \
! -wholename "obj-*" \
-type f \
\( -iname "*.cpp" \
-o -iname "*.h" \
-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 MOZ_DELETE '= delete'
2015-01-08 23:19:05 -05:00
Boris Zbarsky
8fd98d4057
Bug 1107592 part 2. Allow chrome JS to directly throw content DOMExceptions that will propagate out to the web script. r=peterv
2015-01-02 17:08:33 -05:00
Benoit Jacob
7c35ffa41a
Bug 1028588 - Fix dangerous public destructors in dom/bindings - r=bz
2014-06-23 14:49:08 -04:00
Bobby Holley
c8041c17a7
Bug 975419 - Trace the Incumbent Global from a CallbackObject (but check it too, just to be safe). r=bz,mccr8
2014-03-03 08:53:42 -08:00
Bobby Holley
e5ad98ec72
Bug 968335 - Implement GetCallerPrincipalOverride. r=bz
2014-02-14 22:36:44 -08:00
Phil Ringnalda
4d898ac6fc
Back out 4fc776ee6852:6a0ebe4ddd01 (bug 968335) and e7d697004921 (bug 923904) for b2g emulator build bustage
...
CLOSED TREE
2014-02-14 18:35:30 -08:00
Bobby Holley
c0fe9cb542
Bug 968335 - Implement GetCallerPrincipalOverride. r=bz
2014-02-14 16:13:38 -08:00
Ehsan Akhgari
60eb19e15a
Bug 884368 - Part 1: Add a memory reporter for AudioContexts; r=roc,njn
2014-01-04 13:15:41 -05:00
Boris Zbarsky
957cfde95a
Bug 950657. Give WebIDL callbacks an operator== that does the right thing. r=smaug
2013-12-16 13:06:35 -05:00
Steve Fink
80aa980365
Bug 937317 - Root around GC call GetIncumbentGlobal. r=bz
2013-12-11 17:51:58 -08:00
Bobby Holley
1e509be87c
Bug 937317 - Return null from ToWebIDLCallback if one doesn't already exist. r=bz
2013-12-11 17:51:58 -08:00
Bobby Holley
5bd2767e3a
Bug 937317 - When invoking a callback object, restore the incumbent script settings object from when the callback was created. r=bz
...
See the 'incumbent script' stuff in the WebIDL spec.
2013-12-11 17:51:58 -08:00
Bobby Holley
3b27d85d5f
Bug 937317 - Pass the entire CallbackObject to CallSetup. r=bz
...
We need this so that we can grab the incumbent global that we stashed on the
CallbackObject.
2013-12-11 17:51:57 -08:00