Jon Coppeard
d12ca3002f
Bug 1632439 - Make CallbackObject methods return JSObject pointers rather than handles r=peterv
...
This turned out to be simpler than expected. Apart from generated bindings, a lot of the callers didn't make use of the fact that the return value was a handle.
Differential Revision: https://phabricator.services.mozilla.com/D72120
2020-05-21 14:09:02 +00:00
Boris Zbarsky
3910c9fe0a
Bug 1561887 part 2. Fix cycle-collection skipping of JSEventHandler to work correctly. r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D36870
--HG--
extra : moz-landing-system : lando
2019-07-09 17:04:59 +00:00
Sylvestre Ledru
265e672179
Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
...
# ignore-this-changeset
--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Boris Zbarsky
f771d7e529
Bug 1477923. Make WebIDL callbacks store a global in addition to the object that's used as a callback. r=mccr8
...
We want to be able to enter the Realm we were in when the callback was created
before calling it, but if the callback stores a cross-compartment wrapper we
don't really have a good way to find that Realm. So we store it explicitly by
storing a global when the callback is created.
The changes to the constructor signatures to use JSObject* instead of
JS::Handle<JSObject*> are so we can avoid having to root the global for these
calls. These changes make two of the constructors ambiguous when nullptr is
being passed for the first arg; this patch adds casts to disambiguate.
2018-08-03 17:11:39 -04:00
Kris Maglione
729b7a2019
Bug 1273251: Part 3 - Allow CallbackObject to contain a null callable. r=peterv
...
MozReview-Commit-ID: FCXVHouhG3I
--HG--
extra : rebase_source : f3e9325559d40bcb4017ec2505f435275d4fea7f
2016-11-14 21:25:37 -08:00
Boris Zbarsky
3f8b6befb3
Bug 1326105 part 5. Move the getting of the incumbent global to the finish-slow-js codepath too, since it's not needed if no one will ever call our callback. r=smaug
2016-12-29 13:19:26 -08:00
Boris Zbarsky
249298d20c
Bug 1326105 part 4. Remove the now-unused JSContext argument of the protected CallbackObject constructor. r=smaug
2016-12-29 13:19:26 -08:00
Terrence Cole
0edc10380c
Bug 1297558 - Use a read barrier on Heap to ExposeToActiveJS r=sfink r=mccr8
2016-02-07 09:08:55 -08: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
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
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
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
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
Terrence Cole
20e03ef2a5
Bug 1105069 - Part 17: Convert xpc_IsGrayGCThing to GCCellPtr; r=mccr8, j=jonco
...
--HG--
extra : rebase_source : 9fdc5ac9ca8de9c12a399532db7e77bc34abb7da
2014-12-05 09:38:34 -08:00
Boris Zbarsky
0bc28e81b8
Bug 952365. Add a TreatNonObjectAsNull annotation for WebIDL callback functions and use it for event handlers, since web sites depend on assigning non-callable objects to them in some cases. r=peterv
2014-01-13 15:08:56 -05:00
Steve Fink
80aa980365
Bug 937317 - Root around GC call GetIncumbentGlobal. 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
Phil Ringnalda
cacf62c269
Back out 35371620801a:bf2019278b77 (bug 937317) for gaia-ui-test bustage and frequent timeouts in its own test
2013-12-07 11:08:56 -08:00
Bobby Holley
78f90c96fa
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-06 12:01:42 -08:00
Carsten "Tomcat" Book
928b1a0621
Backed out changeset 767065f0560b (bug 937317) WinXP Build Bustage on a CLOSED TREE
2013-12-06 08:41:59 +01:00
Bobby Holley
cff106e954
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-05 21:34:17 -08:00
Boris Zbarsky
43f774459d
Bug 868312 finale: finish rooting dom/ code. r=smaug
2013-05-17 21:48:25 -04:00
Ehsan Akhgari
cc7519e043
Bug 871315 - Fix some rooting hazards in content/; r=till,bzbarsky
2013-05-13 13:43:53 -04:00
Ehsan Akhgari
04e1c87b5e
Backed out 2 changesets (bug 871315) because different compilers have different standards on what is and is not C++
...
Backed out changeset d0d2e13e8b83 (bug 871315)
Backed out changeset be3976bd2d57 (bug 871315)
Landed on a CLOSED TREE
2013-05-13 14:42:03 -04:00
Ehsan Akhgari
9dda412b4e
Bug 871315 - Fix some rooting hazards in content/; r=till,bzbarsky
2013-05-13 13:43:53 -04:00
Boris Zbarsky
f3f44cfa74
Bug 862629 part 1. Stop playing compartment games with WebIDL callbacks and just use the given object as-is. r=peterv
2013-04-24 14:59:15 -04:00
Boris Zbarsky
4d02c18a08
Bug 822470 part 1. Factor out the code that callback functions and callback interfaces will be able to share into a CallbackObject class. r=peterv
...
--HG--
rename : dom/bindings/CallbackFunction.cpp => dom/bindings/CallbackObject.cpp
rename : dom/bindings/CallbackFunction.h => dom/bindings/CallbackObject.h
2013-01-28 08:34:29 -05:00
Peter Van der Beken
e484d3351f
Fix for bug 818219 (Replace HTMLElement quickstubs with new binding methods) - Add a constructor to callbacks to allow conversion between callback types. r=bz.
...
--HG--
extra : rebase_source : 6c55316f374ef1654f0b77b782500fc52a78881a
2012-12-06 11:41:14 +01:00
Olli Pettay
c806b877ae
Bug 811206, Fix JSHolder drop handling, part 3 (fixes), r=mccr8,khuey
...
--HG--
extra : rebase_source : 7b2726d2aa7f5764a3c4cb750e5a735728069687
2012-11-28 03:37:57 +02:00
Boris Zbarsky
45edccd252
Bug 810618. Make sure we don't allow layout statics to go away while we're still trying to use them. r=khuey
2012-11-13 00:26:55 -08:00
Boris Zbarsky
beb6a36d0f
Bug 807226 part 2. Change event handlers to store WebIDL callback functions. r=smaug
2012-11-09 08:00:25 -08:00
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