Commit Graph

4138 Commits

Author SHA1 Message Date
L. David Baron
c59666d841 Bug 1343715 - Split nsTSubstring::mFlags into separate variables for class and data flags. r=dmajor
MozReview-Commit-ID: JW1p5BxpHKA

--HG--
extra : transplant_source : %20e%CF%FA%60%A2%1Bn%1A%C6%A2%DBAy%3C%E0b%0C%077
2017-07-10 12:23:10 -07:00
Sylvestre Ledru
4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Ehsan Akhgari
f2eb6c6f8d Bug 1378042 - Part 2: Make WebIDLNameTableKey::mHash PLDHashNumber; r=baku 2017-07-04 11:06:52 -04:00
Boris Zbarsky
d471a06f87 Bug 1376954 part 2. Support nursery allocation of DOM proxy objects. r=smaug,jonco 2017-06-30 10:15:52 -07:00
Boris Zbarsky
239e1057ca Bug 1376954 part 1. Ensure that we don't try to nursery-allocate non-wrappercached DOM objects. r=smaug 2017-06-30 10:15:51 -07:00
Ting-Yu Chou
8f144f6221 Bug 1348099 part 3 - Fix the codegen so the methods for clearing cached attribute values are not unforgeable. r=bz
Current codegen list the methods for clearing cached attribute values in both
chrome only unforgeable methods and chrome only normal methods, but they should
exist only in the normal ones.

MozReview-Commit-ID: Il2JvCLZ2v3

--HG--
extra : rebase_source : 21b9c715c921c4ac7f6ed4c235ee79a3628162bd
2017-06-29 17:54:20 +08:00
Ting-Yu Chou
a1814c7263 Bug 1348099 part 2 - Add tests for DOM Xrays that properties are exposed to only proper object types. r=bz
MozReview-Commit-ID: Iu86lAviFJK

--HG--
extra : rebase_source : ac0df64b504212a090934427e2c091eb40641877
2017-06-22 14:43:11 +08: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
Boris Zbarsky
165cfab86b Bug 1371424 - Trace the right thing in TypedArray's TraceSelf implementation. r=mccr8 2017-06-08 16:56:43 -04:00
Boris Zbarsky
b87612bde1 Bug 1374119. Use a bool pref cache for interface object enablement conditions instead of calling GetBool. r=qdot 2017-06-19 23:52:04 -04:00
Thomas Wisniewski
3646a5cbe9 Bug 1036659 - Don't call mozilla::DropJSObjects() in CallbackObject::DropJSObjects(). r=mccr8
MozReview-Commit-ID: AbD1NUqCvFD
2017-06-16 17:15:32 -04:00
Mats Palmgren
ea75194536 Bug 1372031 - Use EnsureInserted instead of Contains+PutEntry to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 2ZG2qX3dyGa
2017-06-17 00:06:04 +02:00
Boris Chiou
f8dbd6bb32 Bug 1339690 - Part 3: Drop spacing mode. r=birtles,smaug
MozReview-Commit-ID: 1c7jpzWQjVP

--HG--
extra : rebase_source : 7850e290abb5fd87684c99710666c881eb777eb4
2017-06-13 15:09:19 +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
Jan de Mooij
83f290de99 Bug 1370608 part 1 - Move newEnumerate hook from ObjectOps to ClassOps. r=evilpie,bz 2017-06-14 10:37:44 +02:00
Peter Van der Beken
3455c5b415 Bug 1252211 - Convert TreeContentView to WebIDL. r=bz.
--HG--
extra : rebase_source : 78b770df8863b8165639c4a7a0eaabd5463c1090
2017-06-08 21:04:02 +02:00
Peter Van der Beken
ae390ac4ca Bug 1252211 - Convert XUL template builders to WebIDL. r=bz.
--HG--
rename : layout/xul/tree/nsITreeView.idl => dom/webidl/TreeView.webidl
rename : dom/xul/templates/nsIXULTemplateBuilder.idl => dom/webidl/XULTemplateBuilder.webidl
extra : rebase_source : ccfc87c460e20027a4ea6b3cc04efe14802dc41e
2017-05-24 11:51:10 +02:00
Peter Van der Beken
9b9495bf79 Bug 1252211 - Remove DOMCI for TreeSelection, XULCommandDispatcher and XULControllers. r=bz.
--HG--
extra : rebase_source : 5a24af4928dbd7754850c6e3ceff6646bfe58c93
2017-05-18 09:07:25 +02:00
Carsten "Tomcat" Book
4a5a3d9f30 Backed out changeset 2c51cdd42834 (bug 1252211) for bustage 2017-06-13 12:20:33 +02:00
Carsten "Tomcat" Book
3ef39f1665 Backed out changeset 82c5f20d6ee2 (bug 1252211) 2017-06-13 12:20:16 +02:00
Carsten "Tomcat" Book
dc97c12485 Backed out changeset 629ace67da3b (bug 1252211) 2017-06-13 12:20:14 +02:00
Peter Van der Beken
d34f37d164 Bug 1252211 - Convert TreeContentView to WebIDL. r=bz.
--HG--
extra : rebase_source : 246c1dda3db15ed0332af895485853e6e5d1ffa4
extra : intermediate-source : 0312d6ff0792f8d9cb20f2e06cbae59d5bbf690a
extra : source : 7b808c16e93cbd395a9f57bda4a9206e11a6df69
2017-06-08 21:04:02 +02:00
Peter Van der Beken
7c1c7552a6 Bug 1252211 - Convert XUL template builders to WebIDL. r=bz.
--HG--
rename : layout/xul/tree/nsITreeView.idl => dom/webidl/TreeView.webidl
rename : dom/xul/templates/nsIXULTemplateBuilder.idl => dom/webidl/XULTemplateBuilder.webidl
extra : rebase_source : 6788542d65fe446e851eebd4804d7dba428c8c84
extra : source : 599f27e86cb7ba543b4014c91be89c67225064ec
2017-05-24 11:51:10 +02:00
Peter Van der Beken
9d549d2f23 Bug 1252211 - Remove DOMCI for TreeSelection, XULCommandDispatcher and XULControllers. r=bz.
--HG--
extra : rebase_source : db24985f7e8f6d4ca4df13015d565ec0063ba355
extra : source : f361697cb50b47dc4db94a6730b6604ab69217f5
2017-05-18 09:07:25 +02:00
Boris Zbarsky
d7ec8ed805 Bug 1372371. Fix enumerability handling in the window resolve hook. r=qdot 2017-06-12 22:17:03 -04:00
Samuel Vargas
901459a071 Bug 1325113 - Implement support for WEBGL_compressed_texture_s3tc_srgb - r=jgilbert,qdot
MozReview-Commit-ID: mI4dlB2lK
2017-06-08 14:54:37 -07: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
Boris Zbarsky
febf0f30d6 Bug 1364816 part 5. Make getting window names a bit faster by avoiding various intermediate strings. r=qdot,jandem 2017-06-06 21:21:45 -04:00
Boris Zbarsky
60d80c3c4e Bug 1364816 part 3. Switch NeedResolve bindings to using a newResolve hook instead of a resolve hook. r=qdot,jandem 2017-06-06 21:21:44 -04:00
Boris Zbarsky
2a310b9f3b Bug 1364816 part 2. Add a way to ask the WebIDLGlobalNameHash for only the names that have not yet been resolved on the given window. r=qdot 2017-06-06 21:21:44 -04:00
Boris Zbarsky
1002ea42f3 Bug 1364816 part 1. Store the relevant constructor id in the entries in the WebIDLGlobalNameHash. r=qdot 2017-06-06 21:21:43 -04:00
Kris Maglione
761a458cda Bug 1356546: Part 1 - Add a StructuredCloneHolder JS helper to hold opaque structured clone blobs. r=billm
There are several places in the WebExtensions framework where we currently
need to repeatedly serialize and deserialize structured clone data as it
passes through message managers, which can lead to significant performance
issues.

This helper class lets us serialize a value directly from the source extension
context into an opaque blob, and then directly deserialize it into the target
context on the other end, with no X-ray overhead or clones into privileged
scopes in-between.

MozReview-Commit-ID: 4QzHi89onxc

--HG--
extra : rebase_source : 2ec196ca9ce9be90b7eadf136c938373ac7d3fdd
2017-05-20 15:09:24 -07:00
Kris Maglione
02c1b0890c Bug 1368102: Part 2 - Add WebExtensionContentScript bindings. r=billm,mixedpuppy
Bill, can you please review the binding code? Shane and zombie, can you please
review the content script matching?

MozReview-Commit-ID: IJB5s0a7r7S

--HG--
extra : rebase_source : 4026105b8c04e6b88c9be8cf76898fca26f1c3e0
2017-06-03 22:03:19 -07:00
Kris Maglione
d9d83b9f73 Bug 1322235: Part 4 - Add initial native WebExtensionPolicy bindings. r=billm,aswan
Bill, can you please review the binding code and the general sanity of the
platform code? Andrew and zombie, can you please review the policy logic and
tests?

As in part 1, this aims to reduce the overhead of our extension policy logic
by making it directly available to native code with as little JS and XPConnect
overhead as possible.

MozReview-Commit-ID: 40m1wSEYtBo

--HG--
extra : rebase_source : c03834791707f78431440af9b88035ab03dc9564
2017-05-24 15:58:19 -07:00
Kris Maglione
186924219b Bug 1322235: Part 1 - Add native MatchPattern and MatchGlob bindings. r=billm,aswan
Bill, can you please review the binding code, and the general sanity of the
platform code. Andrew and zombie, can you please matching algorithms and
tests.

Change summary:

The existing JavaScript matching code works well overall, but it needs to be
called a lot, particularly from hot code paths. In most cases, the overhead of
the matching code on its own adds up enough to cause a problem. When we have
to call out to JavaScript via XPConnect to make a policy decision, it adds up
even more.

These classes solve both of these problems by a) being very fast, and b) being
accessible directly from C++. They are particularly optimized for the common
cases where only literal or prefix matches are required, and they take special
steps to avoid virtual calls wherever possible, and caching computed URL
values so that they can be reused across many match operations without
additional overhead.

MozReview-Commit-ID: BZzPZDQRnl

--HG--
rename : toolkit/modules/tests/xpcshell/test_MatchPattern.js => toolkit/components/extensions/test/xpcshell/test_MatchPattern.js
extra : rebase_source : c93c4c6c36460eb5ad0fc3aa86ad42a72e76bb6c
2017-05-24 14:57:29 -07:00
Boris Zbarsky
0396c9b2f2 Bug 1369367. DOM callbacks can now store a null object; teach codegen to handle that. r=qdot 2017-06-02 16:37:02 -04:00
Andrea Marchesini
31b48170ed Bug 1368296 - Renaming WorkerProxyToMainThreadRunnable::RunBackOnWorkerThread to RunBackOnWorkerThreadForCleanup and improving the description for this method, r=asuth 2017-06-02 11:05:27 +02:00
Xidorn Quan
ae513f0ff4 Bug 1352968 part 1 - Add separate CSSImportRule base class. r=heycam
MozReview-Commit-ID: 5h6dmij1elX

--HG--
extra : source : 5205d8d42a0f9e8f0c013c13a23cf5d85cc37f2f
2017-05-30 11:10:25 +10:00
Eden Chuang
68cf4559f8 Bug 1345361 - PaymentRequest constructor implementation. r=baku 2017-05-26 01:50:32 +08:00
Ryan VanderMeulen
df9dd3967c Backed out changeset 437d6df1859c (bug 1345361) for ESLint failures. 2017-05-25 18:05:15 -04:00
Eden Chuang
80717194b1 Bug 1345361 - PaymentRequest constructor implementation. r=baku 2017-05-26 01:50:32 +08:00
Boris Zbarsky
7c6c40e506 Bug 1366032. Align IDL record to C++ conversion with the spec when Symbol-named properties are involved. r=qdot 2017-05-24 08:50:30 -04:00
Ryan VanderMeulen
9f0c23d7c6 Merge m-c to inbound. a=merge 2017-05-19 12:25:23 -04:00
Boris Zbarsky
682fe478ec Bug 1237503. Add support for [Cached] and [StoreInSlot] things on DOM proxies. r=qdot
The only difference between proxies and non-proxies is that proxies only support
up to MAX_FIXED_SLOTS slots all told (reserved plus private slot).  SpiderMonkey
already has static asserts to make sure we don't ask for too many reserved slots
on a proxy.
2017-05-19 09:24:30 -04:00
Xidorn Quan
f5f29c5f7b Bug 1345697 part 2 - Add CSSKeyframesRule and CSSKeyframeRule base class. r=heycam
MozReview-Commit-ID: GZzZIV3eYgo

--HG--
extra : source : a97464201a12620b28bea580ad7e911fd64f8599
2017-05-19 16:12:34 +10:00
Boris Zbarsky
bd29adfa95 Bug 1189822 part 5. Remove the now-unnecessary DOMProxyHandler::ClearExternalRefsForWrapperRelease function. r=peterv
All DOMProxyHandler::ClearExternalRefsForWrapperRelease now does is clear a backpointer to the expando, and that's handled during reflector finalization already.
2017-05-17 00:52:53 -04:00
Boris Zbarsky
0c1348b3ef Bug 1189822 part 4. Fix finalization for DOM overridebuildins proxies to not clear the expando if it's for a different reflector. r=peterv, sfink
This is something that should have happened in bug 1352430 but was missed there.
2017-05-17 00:52:53 -04:00
Boris Zbarsky
9f3244d605 Bug 1189822 part 3. Stop using EnsureExpandoObject in codegen code when we just want to preserver the wrapper for a DOM proxy. r=peterv 2017-05-17 00:52:53 -04:00
Boris Zbarsky
17e91105ca Bug 1189822 part 1. Switch DOMProxyHandler::EnsureExpandoObject to using normal wrapper preservation instead of RegisterDOMExpandoObject. r=peterv 2017-05-17 00:52:52 -04:00