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

584 Коммитов

Автор SHA1 Сообщение Дата
Peter Van der Beken e673e5f508 Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 5: Convert MessageManager globals to WebIDL. r=bz.
The change in browser_net_view-source-debugger.js is needed because we now use WebIDL callbacks for MessageListener, and they add async creation stack frames.

--HG--
extra : rebase_source : 0adb349b40a0c51bb3d8f4b9b7d98106a3929cbd
extra : source : a88d94ec010a12c1d829708aaf59a85609478477
2017-07-19 14:59:02 +02:00
Boris Zbarsky f406b29197 Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 1a: Make PinnedStringId constructor constexpr. r=Waldo/froydnj.
--HG--
extra : rebase_source : 0ed87197f6740b74648fc5107bd6fb4e7409cdfa
2018-03-07 21:50:24 +01:00
Peter Van der Beken ef631ce856 Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 1: Add infrastructure to expose 'system' names on a WebIDL global. r=bz.
--HG--
extra : rebase_source : 70d3a641c60968e013f048e6be91f07641e7b81b
2017-07-19 15:04:14 +02:00
Sebastian Hengst 3a10644021 Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout
Backed out changeset 83c87140dc3d (bug 888600)
Backed out changeset 2efb9b1753f6 (bug 888600)
Backed out changeset af5303781961 (bug 888600)
Backed out changeset 79ef59047e63 (bug 888600)
Backed out changeset 30d568d628dd (bug 888600)
Backed out changeset c7bd4c6c9741 (bug 888600)

--HG--
extra : histedit_source : 791b22f6770f4fead2f909478a93d65d85829fe0%2Cbb387309e90f53e1dde45dcf8cf4ebedcc6e5c5e
2018-03-01 11:51:09 +02:00
Peter Van der Beken fc804325a9 Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 5: Convert MessageManager globals to WebIDL. r=bz.
The change in browser_net_view-source-debugger.js is needed because we now use WebIDL callbacks for MessageListener, and they add async creation stack frames.

--HG--
extra : rebase_source : d7c026d8a77634ef2566feba78168beb8a66a552
2017-07-19 14:59:02 +02:00
Peter Van der Beken 615d394604 Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 1: Add infrastructure to expose 'system' names on a WebIDL global. r=bz.
--HG--
extra : rebase_source : 6473c862fe98793438c02fa075f3378f8307b45b
2017-07-19 15:04:14 +02:00
Jason Orendorff e7c94fff59 Bug 1439063 - Part 1: Move several public headers from js/src to js/public. r=jandem.
js/src/jsalloc.h -> js/public/AllocPolicy.h
jsalloc.cpp -> js/src/util/AllocPolicy.cpp
jsbytecode.h -> merge into js/public/TypeDecls.h
jsprf.h -> js/public/Printf.h
jsprf.cpp -> js/src/util/Printf.cpp
jsprototypes.h -> public/ProtoKey.h
jswrapper.h -> js/Wrapper.h

--HG--
rename : js/src/jsalloc.h => js/public/AllocPolicy.h
rename : js/src/jsprf.h => js/public/Printf.h
rename : js/src/jsprototypes.h => js/public/ProtoKey.h
rename : js/src/jswrapper.h => js/public/Wrapper.h
rename : js/src/jsalloc.cpp => js/src/util/AllocPolicy.cpp
rename : js/src/jsprf.cpp => js/src/util/Printf.cpp
extra : rebase_source : 98b16d94c469202eab0303a8da844f1d0b6aa809
extra : amend_source : e0b16c1077226d6fe240f4d7096537f93b43f2b8
extra : histedit_source : d94e0ba7904a7d66742c7fac43f638aaec4fa4e5
2018-02-21 10:30:19 -06:00
Dorel Luca 9b2f91981c Backed out 6 changesets (bug 888600) for Valgrind and build bustge on a CLOSED TREE
Backed out changeset 7c8317f4ad48 (bug 888600)
Backed out changeset 5b990735f1ad (bug 888600)
Backed out changeset 9eafe225b804 (bug 888600)
Backed out changeset 16af80d6cd93 (bug 888600)
Backed out changeset a109987af625 (bug 888600)
Backed out changeset 0949dba396ad (bug 888600)
2018-02-22 13:56:43 +02:00
Peter Van der Beken 40a044892a Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 5: Convert MessageManager globals to WebIDL. r=bz.
The change in browser_net_view-source-debugger.js is needed because we now use WebIDL callbacks for MessageListener, and they add async creation stack frames.

--HG--
extra : rebase_source : 77672a73a6e1447c763930143116a261f2369e67
2017-07-19 14:59:02 +02:00
Peter Van der Beken 8ec89589cb Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 1: Add infrastructure to expose 'system' names on a WebIDL global. r=bz.
--HG--
extra : rebase_source : 3724f7d03d9c76067827ffce1e7b64a61389d469
2017-07-19 15:04:14 +02:00
Boris Zbarsky a6fdc48869 Bug 1436276. Bindings should create their return promises in the current compartment even when called over Xrays. r=bholley
These are cases that are implementing the "convert an exception to a Promise"
steps of the Web IDL spec.  Typically the exception is thrown in the current
compartment; the Promise returned should simply match that.  Otherwise we can
end up with a situation in which the promise doesn't actaully have access to
its rejection value, which will cause problems if someone uses then() on the
promise: the return value of the then() call will get a sanitized exception
instead of the real one.

We _could_ try to match the actual compartment of the exception, in theory.
But it's not clear why this would be preferable to using the current
compartment, even if there were cases in which the exception _doesn't_ match
the current compartment.  Which there likely are not.

MozReview-Commit-ID: Ac2BHIHxfvY

--HG--
rename : dom/promise/tests/test_promise_argument.html => dom/promise/tests/test_promise_retval.html
rename : dom/promise/tests/test_promise_argument_xrays.html => dom/promise/tests/test_promise_retval_xrays.html
2018-02-10 01:34:10 -05:00
Nika Layzell a0d1f16079 Bug 1383876 - Part 1: Remove GroupedSHistory and Prerendering logic from C++ code, r=freesamael, r=smaug
MozReview-Commit-ID: 2aHA6NcQPGk
2018-01-12 17:52:52 -05:00
Boris Zbarsky 4b3ce3fd3c Bug 1430164. Stop doing weird sandbox-callable-wrapping for DOM constructors. r=bholley
This fixes DOM constructor identity in web extension content scripts to work as expected.

MozReview-Commit-ID: Ab4sFWiMU6c
2018-01-12 14:28:28 -05:00
Cameron McCormack 55679ff0a6 Bug 1428531 - Add chrome-only Foo.isInstance static methods to interface objects. r=bz
MozReview-Commit-ID: Kq0xONMnbEO
2018-01-11 13:00:25 +08:00
Edgar Chen 5fedbb92b8 Bug 1422197 - Add fast path to get DocGroup in binding code for [CEReactions]; r=smaug
MozReview-Commit-ID: HgbFo9ddr0o

--HG--
extra : rebase_source : 04989782fc7c7ce79e0e65b3dc907c9e174a0809
2017-11-27 16:10:27 +08:00
Dave Townsend 27380b996e Bug 1404420: Add custom element support to XUL. r=edgar, r=smaug
MozReview-Commit-ID: BietEX2gOoG

--HG--
extra : rebase_source : 6fd9a732a21f2c048d37c3f7139cd18503148767
2017-10-10 15:25:10 -07:00
Nika Layzell dfe521f9b8 Bug 1416384 - Part 2c: Get nsGlobalWindowInner.cpp building, r=smaug
MozReview-Commit-ID: CmKx5jtvtrT

--HG--
extra : rebase_source : b1c5fe7c140a743d55c462b6d2bcbf8a97950d9c
2017-11-15 11:33:39 -05:00
Nika Layzell c223b9ff2d Bug 1414974 - Part 6: Change WebIDL bindings to refer to nsGlobalWindowInner rather than nsGlobalWindow, r=bz
MozReview-Commit-ID: KbCpDFoWyTe
2017-11-09 10:44:49 -05:00
Andi-Bogdan Postelnicu a1d1eceab5 Bug 1411030 - memset only the underlying vector from the Array container. r=froydnj
MozReview-Commit-ID: 5R7ZxMEZdRY

--HG--
extra : rebase_source : 4503bffdc0191f8d3279acc0802bbf2e160cab17
2017-10-24 16:52:20 +03:00
Kris Maglione f37317cad0 Bug 1369533: Return dead wrappers rather than null for dead CallbackObject values. r=bz
We don't have access to an appropriate context to create the dead wrapper in
when the callback is nuked, so instead, this patch creates a new dead wrapper
in the caller compartment each time the property is accessed. This is the same
behavior we'd get when trying to re-wrap a cross-compartment dead wrapper, so
it's consistent with the way we handle these situations elsewhere.

MozReview-Commit-ID: 3cMeR4z8EOe

--HG--
extra : rebase_source : 7e8cf4a195ef64deb7677ce4ac9818d342815667
2017-09-04 17:21:06 -07:00
Boris Zbarsky 4d16655b25 Bug 1393806 part 3. Change dom::ReparentWrapper to take an ErrorResult. r=peterv
This makes it easier for its consumers to avoid leaving a dangling exception on
the JSContext.

MozReview-Commit-ID: Xep7IkYxSx
2017-09-13 13:34:55 -04:00
Jon Coppeard a3c0357907 Bug 1399141 - Attribute malloc memory when creating reflector object r=baku 2017-09-13 11:21:12 +01:00
Jon Coppeard a4fe4cbe3c Bug 1301863 - Tell the JS engine how much memory blob reflectors hold alive r=baku 2017-09-12 10:46:51 +01:00
Nicolas Silva 8c73d0d120 Bug 1398134 - Fix warning in BindingUtils.h. r=bkelly 2017-09-11 14:50:15 +02:00
Benjamin Bouvier b5407c81cc Bug 1391633: Remove the unused JSContext parameter in SetDocumentAndPageUseCounter; r=froydnj
MozReview-Commit-ID: KtVP5JgLIFC

--HG--
extra : rebase_source : 210f0a479cf0919e1d6e589a5857f43fb50fa8c5
extra : histedit_source : 2f08891b3dba80e117e3f5e4a0e0367b51e42606
2017-08-18 16:02:15 +02:00
Edgar Chen 12bce104dc Bug 1299363 - Part 2: Allow prototype swizzling in html constructor. r=bz
MozReview-Commit-ID: KGVfbAxpbfq

--HG--
extra : rebase_source : f9b5150eb2c988b0d18b44cdcce820bc8d3f4bf3
extra : histedit_source : a6f4f69740f3622959557e1fc0ae44bb05151c37
2017-02-17 18:33:44 +08:00
Boris Zbarsky d226db3321 Bug 1371259 followup. Fix rooting analysis hazards in UnwrapObjectInternal. r=peterv pending 2017-07-10 18:04:49 -04:00
Boris Zbarsky cdd8fe10d4 Bug 1371259 part 4. Stop using UnwrapArg to unwrap this values. r=peterv 2017-07-10 16:05:25 -04:00
Boris Zbarsky 5c76874a46 Bug 1371259 part 3. Change UnwrapObject<> and the UNWRAP_OBJECT macro to allow passing in mutable object or value handles for the thing being unwrapped, and do so at various callsites. r=peterv
I did audit all UNWRAP_OBJECT callers to make sure that the lifetimes of all the
temporary Rooted or the RefPtrs they unwrap into are long enough.
2017-07-10 16:05:24 -04:00
Ting-Yu Chou 2a8c9b7ffd Bug 1348099 part 1 - Binary search property id when resolve DOM Xrays own property. r=bz
Currently we resolve a property by iterating every prefable and check whether it
is enabled.  If it is, we linear search the ids that it manages.  This patch
changes that to binary searching to find whether the id being resolved is
present first, and checking whether its prefable is enabled only when we find
it.  This improves the performance of property resolution, especially when the
property is not present.

The patch stores all the property ids a NativePropertiesN owns in a single array
of PropertyInfo structs.  Each struct contains an id and the information needed
to find the corresponding Prefable for the enabled check, as well as the
information needed to find the correct property descriptor in the Prefable.  We
also store an array of indices into the PropertyInfo array, sorted by bits of
the corresponding jsid.  Given a jsid, this allows us to binary search for the
index of the corresponding PropertyInfo, if any.  The index array requires 2
bytes for each property, which is ~20k across all our bindings.  The extra
information stored in each PropertyInfo requires 4 bytes for each property,
which is about 40k across all our bindings in 32-bit builds, or 80k in 64-bit
builds due to alignment requirements on PropertyInfo.  However we save a bit of
memory from changing NativePropertiesN's trios to duos.

The array of unsorted ids is kept because XrayOwnPropertyKeys() includes only
properties that are enabled.  Without it, we will need to check every single
property to know whether its prefable is enabled or not, which is inefficient.

With this patch, initializing property ids takes longer because of the sorting.
I measured also insertion sort because I thought the ids should be nearly sorted
as they are generated sequentially at run time, but that's not the case and
NS_QuickSort() runs faster.

MozReview-Commit-ID: Lc4Z1ui3t0o

--HG--
extra : rebase_source : 314efe467a14428c57f90af2ecc0ec5c47a31993
2017-06-12 12:13:38 +08:00
Jan de Mooij bf6aed7a06 Bug 1370608 part 3 - Use JS_NewEnumerateStandardClasses outside js/src. r=bz 2017-06-14 10:39:11 +02:00
Boris Zbarsky 2f1f31e6d0 Bug 1370640. Get rid of ProtoAndIfaceCache::EntrySlotIfExists. r=peterv 2017-06-07 12:56:27 -04:00
Boris Zbarsky 40b47041ab Bug 1370614. Replace some uses of ProtoAndIfaceCache::EntrySlotIfExists with a faster boolean-returning test function. r=froydnj 2017-06-07 12:56:27 -04:00
Jan de Mooij f480e9ecdf Bug 1237504 - Refactor proxy slot layout to allow proxies to have more than 2 slots. r=bz,jonco
The patch makes the following proxy changes:

* The number of slots in ProxyValueArray is now dynamic and depends on the number of reserved slots we get from the Class.
* "Extra slots" was renamed to "Reserved slots" to make this clearer.
* All proxy Classes now have 2 reserved slots, but it should be easy to change that for proxy Classes that need more than 2 slots.
* Proxies now store a pointer to these slots and this means GetReservedSlot and SetReservedSlot can be used on proxies as well. We no longer need GetReservedOrProxyPrivateSlot and SetReservedOrProxyPrivateSlot.

And some changes to make DOM Proxies work with this:

* We now store the C++ object in the first reserved slot (DOM_OBJECT_SLOT) instead of in the proxy's private slot. This is pretty nice because it matches what we do for non-proxy DOM objects.
* We now store the expando in the proxy's private slot so I removed GetDOMProxyExpandoSlot and changed the IC code to get the expando from the private slot instead.
2017-04-28 14:12:28 +02:00
Jon Coppeard eb3c9870bf Bug 1352430 - Add barrier to wrapper cache to clear dying objects that have not yet been finalized r=bz r=sfink
* * *
Code review followup

--HG--
extra : rebase_source : 10c1fd603c2dd1ac2ff5770ae9aec2e9131681ce
2017-04-26 11:18:39 +01:00
Jon Coppeard d7e0c83dcc Bug 1359001 - Make AutoAssertGCCallback a no-op in opt builds r=sfink 2017-04-25 10:56:34 +01:00
John Dai b32e4c240b Bug 1309147 - Part 3: Implement the support for CEReactions in Codegen. r=bz
MozReview-Commit-ID: F1mxKzlru9s

--HG--
extra : rebase_source : a5e52ef2f3168028dec2c3186e857941953ad517
extra : histedit_source : 2336479daf177cb7ca55ee517c8317852bed09ef
2017-03-08 17:11:48 +08:00
Ben Kelly 4ffa062ade Bug 1350398 Remove Workers.h include from BindingUtils.h now that ThrowDOMExceptionForNSResult no longer exists. rs=bz 2017-03-24 15:27:11 -04:00
Jon Coppeard 82cbd987a2 Bug 1338623 - Add a slower but more exact gray marking check for checking correctness r=sfink r=mccr8 2017-03-02 10:22:47 +00:00
Boris Zbarsky a449ccb8fa Bug 1333045. Update Location object properties to current spec. r=qdot
Specifically, three changes:

1) valueOf should be non-enumerable.
2) valueOf should be === to Object.prototype.valueOf.
3) There should be no toJSON.

The tests come directly from https://github.com/w3c/web-platform-tests/pull/4623
so not much need to review them.
2017-02-15 00:01:48 -05:00
Boris Zbarsky 90896220ac Bug 1330699 part 11. Add ConvertJSValueTo*String functions that just take a value and hand out a string, without extra complications. r=qdot 2017-02-15 00:01:37 -05:00
Boris Zbarsky 1471a0e8e3 Bug 1330699 part 10. Rename the MozMap C++ type to "record" and give it a template parameter for the key type. r=qdot
Also renames all the test functions to mention "Record" instead of "MozMap".

--HG--
rename : dom/bindings/MozMap.h => dom/bindings/Record.h
2017-02-15 00:01:35 -05:00
Boris Zbarsky 538d57c3f6 Bug 1330699 part 2. Change the MozMap API and data storage to more what we want record<> to look like. r=qdot,smaug 2017-02-15 00:00:00 -05:00
Andrea Marchesini 16bc4a8d06 Bug 1334564 - Deprecate URL.createObjectURL(mediastream), r=smaug, r=rjesup 2017-02-07 08:58:35 +01:00
Boris Zbarsky da79ef55fe Bug 1335368 part 8. Stop using IsCallerChrome in UnwrapArgImpl. r=bholley 2017-02-01 15:43:37 -05:00
Brian Hackett 8033ed29a8 Bug 1324002 - Mark atoms separately in each zone, r=jonco,mccr8,peterv.
--HG--
extra : rebase_source : 53cf4fa94f122a991c2adbd7bae3714de4391bb4
2017-01-30 06:31:47 -07:00
Boris Zbarsky 39d50c2647 Bug 1332713 part 4. Make Promise-returning getters return a rejected Promise on exception instead of throwing. r=qdot 2017-01-27 18:53:37 -05: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 fbf9e7a22b Bug 1330536 part 3. Add a subclass of FastErrorResult that can be used only to throw OOM. r=smaug 2017-01-17 23:52:13 -05:00
Edgar Chen 881cbd80bd Bug 1274159 - Part 2-2: Support HTMLConstructor WebIDL extended attribute for custom elements; r=bz,wchen
MozReview-Commit-ID: 6egmavfTmFT
2016-11-17 23:31:50 +08:00