Commit Graph

26 Commits

Author SHA1 Message Date
Kris Maglione
8766ceb571 Bug 1472523: Part 4 - Avoid unnecessary domain string duplication in preference observers. r=njn
MozReview-Commit-ID: EMCgMRTDqDn
2018-07-04 14:52:48 -07:00
Jeff Gilbert
70a22b2878 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Emilio Cobos Álvarez
4b8b5e1717 Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Kris Maglione
93c85d42c4 Bug 1456485: Part 2 - Allow extensions with the mozillaAddons permission to match restricted schemes. r=zombie
The schema handling for this is currently a bit ugly, for the sake of
simplifying uplift. In the figure, we should find a way to change the schema
pattern matching based on whether or not the extension is privileged.

MozReview-Commit-ID: CU9WR2Ika6k
2018-05-09 18:55:59 -07:00
Kris Maglione
03374a9669 Bug 1436482: Always use the principal URI as the principal URI. r=mixedpuppy
MozReview-Commit-ID: 7oePANQBCxK
2018-04-04 17:01:59 -07:00
Bharat Raghunathan
91498586ef Bug 1441010 - Closed body tag r=zombie
MozReview-Commit-ID: KtMrFlubfz
2018-03-28 09:38:57 +05:30
Kris Maglione
0e4b3bef11 Bug 1415644: Follow-up: Fix assertion in debug builds. r=bustage CLOSED TREE
MozReview-Commit-ID: 1AzZ7X31jAs
2018-03-09 16:09:03 -08:00
Kris Maglione
6958202bbb Bug 1415644: Follow-up: Fix static analysis build bustage. r=bustage
MozReview-Commit-ID: IwFUIFOJbdX
2018-03-09 15:13:52 -08:00
Kris Maglione
fd8a0b2ac6 Bug 1415644: Create a list of restricted domains. r=aswan,mixedpuppy
MozReview-Commit-ID: A0AkaBG33In
2018-03-03 16:28:18 -08:00
Andrew Swan
b80ff2efef Bug 1431371 Only grant activeTab to urls that match <all_urls> r=kmag
MozReview-Commit-ID: ApnAwGsIOaG
2018-01-26 19:54:34 -08:00
Andrew Swan
8cef91f7e3 Bug 1396399 - Clarify rules for applying activeTab permission to content scripts. r=kmag, r=bz
MozReview-Commit-ID: 9xPDX8Qk2iR
2017-11-04 21:06:20 -07:00
Luca Greco
8184c37696 Bug 1332273 - Support programmatically registered content scripts. r=baku,kmag
MozReview-Commit-ID: BiWlyYV7ZvB
2017-11-03 17:01:58 +01:00
Shane Caraveo
5592e73c3a Bug 1393150 prevent remote extensions when e10s is off, r=bz,kmag
MozReview-Commit-ID: HjLLa9vx2UW
2017-09-14 15:12:45 -07:00
Kris Maglione
a723c8955d Bug 1366511: Part 3 - Add mozilla::ToResult() to convert other result types to equivalent Result. r=nbp,ehsan
Also adds a mozilla/ResultExtensions.h header to define the appropriate
conversion functions for nsresult and PRResult. This is in a separate header
since those types are not available in Spidermonkey, and this is the pattern
other *Extensions.h headers follow.

Also removes equivalent NS_TRY macros and WrapNSResult inlines that served the
same purpose in existing code, and are no longer necessary.

MozReview-Commit-ID: A85PCAeyWhx
2017-08-29 21:28:31 -07:00
Kris Maglione
b3bfcf48cf Bug 1366511: Part 2 - Allow autoconverting Err(nsresult) to nsresult. r=ehsan,nbp
This allows MOZ_TRY and MOZ_TRY_VAR to be transparently used in XPCOM methods
when compatible Result types are used.

Also removes a compatibility macro in SimpleChannel.cpp, and an identical
specialization in AddonManagerStartup, which are no longer necessary after
this change.

MozReview-Commit-ID: 94iNrPDJEnN
2017-08-29 21:28:22 -07:00
Nicholas Nethercote
c13290f0ae Bug 1385172 - Replace nsEscapeHTML{,2}() with new nsAppendEscapedHTML() function. r=erahm.
The existing functions work with C strings but almost all the call sites use
Mozilla strings.

The replacement function has the following properties.

- It works with Mozilla strings, which makes it much simpler and also improves
  the call sites.

- It appends to the destination string because that's what a lot of the call
  sites need. For those that don't, we can just append to an empty string.

- It is declared outside the |extern "C"| section because there is no need for
  it to be in that section.

Note: there is no 16-bit variant of nsAppendEscapedHTML(). This is because
there are only two places that need 16-bit variants, both rarely executed,
and so converting to and from 8-bit is good enough.

The patch also adds some testing of the new function, renaming
TestEscapeURL.cpp as TestEscape.cpp in the process, because that file is now
testing other kinds of escaping.
2017-08-18 12:00:59 +10:00
Kris Maglione
5c09fbeae1 Bug 1356334: Part 4 - Add a helper to synchronously get an extension's name from its ID. r=billm
MozReview-Commit-ID: 8nuvM4PR7XR
2017-08-11 21:22:18 -07:00
Ryan VanderMeulen
0980b8abd2 Backed out 8 changesets (bug 1356334) for frequent test_ext_contentscript_async_loading.html failures on Android debug on a CLOSED TREE.
Backed out changeset 9c677ebfdda0 (bug 1356334)
Backed out changeset 16b49fd1c38a (bug 1356334)
Backed out changeset 4f5bcd2b2dc6 (bug 1356334)
Backed out changeset d832803270ac (bug 1356334)
Backed out changeset b83aea215a82 (bug 1356334)
Backed out changeset b2a663ffd144 (bug 1356334)
Backed out changeset 805c56806930 (bug 1356334)
Backed out changeset 7c880eca810a (bug 1356334)
2017-08-18 11:32:18 -04:00
Kris Maglione
353590b9a8 Bug 1356334: Part 4 - Add a helper to synchronously get an extension's name from its ID. r=billm
MozReview-Commit-ID: 8nuvM4PR7XR
2017-08-11 21:22:18 -07:00
Nicholas Nethercote
01d077755d Bug 1384834 (part 2) - Remove remaining uses of nsAdoptingCString. r=erahm. 2017-07-28 11:21:47 +10:00
Kris Maglione
d1258fddc3 Bug 1370263: Don't try to match content scripts for non-codebase principals. r=mixedpuppy
MozReview-Commit-ID: 96lQfKC9PGx
2017-06-06 14:18:49 -07:00
Kris Maglione
a518bc4925 Bug 1368102: Part 8 - Move extension page matching into C++. r=billm,mixedpuppy
Bill, can you please review the WebIDL change, and Shane the rest?

MozReview-Commit-ID: 6N3sGrAsHzs
2017-05-26 12:07:06 -07:00
Kris Maglione
861919618a Bug 1368102: Part 4 - Use WebExtensionContentScript to match content scripts. r=mixedpuppy,zombie
MozReview-Commit-ID: 1Ga0259WjC
2017-06-03 17:11:08 -07:00
Kris Maglione
eb1e83769a 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
2017-06-03 22:03:19 -07:00
Kris Maglione
88b0e33086 Bug 1322235: Part 5 - Add an ExtensionPolicyService singleton class to track active extension policies. r=billm,mixedpuppy
Bill, can you please review the binding changes? Shane, can you please review
the policy service?

This is the first step to making extension policy data directly available to
C++ code without any COM overhead. It tracks the set of currently active
extensions, and how they map to add-on IDs and URIs.

MozReview-Commit-ID: 9Z61AXFll3P
2017-05-23 19:15:10 -07:00
Kris Maglione
776b2725aa 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
2017-05-24 15:58:19 -07:00