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

4106 Коммитов

Автор SHA1 Сообщение Дата
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
Xidorn Quan 6f168c437d Bug 1328319 part 1 - Move nsCSSCounterStyleRule into a separate header file. r=heycam
MozReview-Commit-ID: Lm1GiKNsgI0

--HG--
extra : rebase_source : 8b792236cf6c89a7469df26cfc57dd66f35f9eef
2017-05-09 21:52:06 +10:00
Boris Zbarsky 742751837a Bug 1363874. Disallow [Cached] and [StoreInSlot] on static attributes for now. r=qdot 2017-05-12 11:15:12 -04:00
Fernando Jimenez Moreno 74d09d6ab3 Bug 1361994 - Part 1: Add separate CSSDocumentRule class. r=xidorn
MozReview-Commit-ID: DMDOHvBWLHX

--HG--
extra : rebase_source : 5602924c03eb0821d304bae264f73f1db7ea8591
2017-05-11 14:11:15 +02:00
Edgar Chen be79c5bdce Bug 1359346 - Implement custom element state; r=wchen
https://dom.spec.whatwg.org/#concept-element-custom-element-state

MozReview-Commit-ID: TpGVfTEXPj

--HG--
extra : rebase_source : 26c65a4c83eb4f3c0ccb60a3598336c4afcb0247
2016-12-28 11:43:29 +08:00
btian 145c7af3f9 Bug 1338059 - Part 1: Generate cycle collection related code for WebIDL type Promise, r=bz
MozReview-Commit-ID: 1wQFBCur0Uy

--HG--
extra : rebase_source : 055cbc34525cbf8d67f143f56528ff6165a61786
2017-05-05 10:12:40 +08:00
Boris Zbarsky 45a20c4074 Bug 1358596. Restore check for sanity of slot indices on DOM objects that got lost. r=qdot 2017-05-02 01:55:47 -04:00
Boris Zbarsky 12bc4392d8 Bug 1360557. Fix the Web IDL parser to report more useful errors when extended attributes are used on constructs that don't allow them. r=qdot 2017-05-01 13:25:47 -04:00
Jan de Mooij 8ddc231e13 Bug 1360523 - Define number of reserved slots explicitly for each proxy js::Class. r=bz 2017-04-29 14:41:49 +02:00
Wes Kocher 63e9b2a680 Merge m-c to inbound, a=merge
MozReview-Commit-ID: DEm2JLplowg
2017-04-28 16:46:56 -07:00
Xidorn Quan 1489bc2c0e Bug 1355394 part 1 - Add separate CSSSupportsRule base class. r=heycam
MozReview-Commit-ID: 3rCRn6YQ8Gx

--HG--
extra : rebase_source : 657d41029e65c647f7ea92c2cb34126496015e88
2017-04-26 16:55:36 +08: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
Wes Kocher c90904f9bf Merge inbound to central, a=merge CLOSED TREE
MozReview-Commit-ID: 9HQViJrDT6S
2017-04-26 17:30:31 -07: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
Tom Tromey bcbdcb14bb Bug 1334278 - change JS_smprintf to return UniqueChars; r=froydnj
This changes JS_smprintf to return UniqueChars, rather than relying on
manual memory management.

MozReview-Commit-ID: ENjQJODYdD1

--HG--
extra : rebase_source : 4c8ad4719dce205a7ef25e41eca25c5af793bb47
2017-03-03 15:10:11 -07:00
Carsten "Tomcat" Book 7bcdfe36bc Merge mozilla-central to autoland 2017-04-19 10:57:24 +02:00
Chih-Yi Leu c9af51ae1e Bug 1355430 - Part1: s/MOZ_debug_get/MOZ_debug; r=baku,jgilbert
MozReview-Commit-ID: 7RUzGo3QJV5

--HG--
extra : rebase_source : a16494b7671feafabd24f2e0ea909d38a0b5910e
2017-04-11 16:50:59 +08:00
Mike Hommey e4927e7310 Bug 1357649 - Remove remnants of AudioChannelManager. r=bz
--HG--
extra : rebase_source : 21fba2905cf9171f34c0e155a4ff5a1162829789
2017-04-19 15:55:28 +09:00
Mike Hommey 34e619d1c1 Bug 1357323 - Remove support for gonk in the build system. r=gps
Everything depending on the widget being gonk can go away, as well as
everything depending on MOZ_AUDIO_CHANNEL_MANAGER, which was only
defined on gonk builds under b2g/ (which goes away in bug 1357326).

--HG--
extra : rebase_source : 9f0aeeb7eea8417fa4e06d662d566d67ecaf2a24
2017-04-18 16:56:09 +09:00
Sebastian Hengst 1dd0176f22 Backed out changeset 773f5b2cb868 (bug 1355430) for unexpectedly passing own test dom/canvas/test/webgl-mochitest/test_video_fastpath_mp4.html on Windows. r=backout 2017-04-18 21:09:25 +02:00
Chih-Yi Leu 5974ad86a4 Bug 1355430 - Part1: s/MOZ_debug_get/MOZ_debug; r=baku,jgilbert
MozReview-Commit-ID: 7RUzGo3QJV5

--HG--
extra : rebase_source : 3b2ee0101f9687d2c8d49083138d6afb31c75534
2017-04-11 16:50:59 +08: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
John Dai a9bed711dc Bug 1309147 - Part 2: Add the name of 'this' value's JSObject* for codegen to generate CEReaction code. r=bz
MozReview-Commit-ID: BZwO7I4uh2

--HG--
extra : rebase_source : 1258bad2a723bdd1a0b3c52342ada3faa9b7a7a5
extra : histedit_source : d87a1c3876c37d61bd93690c85a86bd5333aa5e3
2017-03-08 17:09:59 +08:00
John Dai 3fbf49822e Bug 1309147 - Part 1: Implement the support for CEReactions in WebIDL parser. r=bz
MozReview-Commit-ID: Dw0CMgzXKKy

--HG--
extra : rebase_source : 2254eae5076d4d51eff61d8ee1363075c3aeb13b
extra : histedit_source : 618b4e46eb6b5ac1791bd4f762a97373c6b8e2b3
2017-02-03 11:44:09 +08:00
Andrew McCreight fe0bcc3a40 Bug 1338272 - Require that the return value of MaybeSetPendingException is used. r=bz
Most of the time, the return value of this method should be checked,
because behavior should depend on whether or not an exception is
thrown. However, if it is called immediately after a throw it doesn't
need to be checked because it will always return true. bz said there
is no public API that lets you assume there is an exception because it
would be "too easy to misuse".

MozReview-Commit-ID: CqyicBbcNjW

--HG--
extra : rebase_source : a5b74ba88a927a90d491ceb8f0b750a67f62b0f4
2017-02-14 16:17:02 -08:00
Olli Pettay d7c9e40c86 Bug 1352746 - Rename ProbablyShortLivingObject to ProbablyShortLivingWrapper in webidl, r=qDot
--HG--
extra : rebase_source : 41c2aae34d1140881078aeb336e974394425b9c3
2017-04-11 00:01:29 +03:00
J. Ryan Stinnett 0ccdacdf3a Bug 1345206 - Extract CSSPageRule base class. r=xidorn
Extract a `CSSPageRule` base class from the existing Gecko `nsCSSPageRule`
class.  This will be used in the next commit as the parent of a new
`ServoPageRule` for the Servo variant.

MozReview-Commit-ID: 1F3FWfVKH29

--HG--
extra : rebase_source : 5186cf2e233f3a757676a0127752faa8cc748cd4
2017-03-31 19:14:49 -05:00
Boris Zbarsky a66c62ea91 Bug 1352996. Remove vestige of AvailableIn/CheckAnyPermissions/CheckAllPermissions from WebIDL.py. r=qdot
MozReview-Commit-ID: HsvhRefytXQ
2017-04-05 23:04:26 -04:00
Boris Zbarsky af7a6137cc Bug 1291397. Work around clang bug that they didn't actually manage to ship a fix for which causes it to give spurious warnings it shouldn't be giving, which are then fatal due to -Werror. r=dholbert
MozReview-Commit-ID: GbMEvoxGpH1
2017-03-31 17:09:48 -04:00
Xidorn Quan c84000415d Bug 1345696 part 2 - Move nsCSSFontFaceRule to a separate header. r=heycam
MozReview-Commit-ID: 5UsODlVQV7a

--HG--
extra : rebase_source : 48ed07a86666fd313786ca03818947b10ca7a2ce
2017-03-29 10:20:40 +11: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
Andrea Marchesini 1fd1bc3935 Bug 1343933 - Renaming Principal classes - part 2 - NullPrincipal, r=qdot
--HG--
rename : caps/nsNullPrincipal.cpp => caps/NullPrincipal.cpp
rename : caps/nsNullPrincipal.h => caps/NullPrincipal.h
rename : caps/nsNullPrincipalURI.cpp => caps/NullPrincipalURI.cpp
rename : caps/nsNullPrincipalURI.h => caps/NullPrincipalURI.h
2017-03-22 11:38:40 +01:00