Commit Graph

16 Commits

Author SHA1 Message Date
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