gecko-dev/toolkit/components/extensions
Nicholas Nethercote 4a623e6df4 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.

--HG--
rename : xpcom/tests/gtest/TestEscapeURL.cpp => xpcom/tests/gtest/TestEscape.cpp
extra : rebase_source : 51145ae2c9b0b4573c7ea0c342dcb246f9f14fb9
2017-08-18 12:00:59 +10:00
..
schemas Bug 1388902 remove socialapi share, r=florian 2017-08-16 08:54:21 -07:00
test Bug 1392003 - Support estimatedEndTime in DownloadItem; r=aswan 2017-08-19 15:06:46 -04:00
webrequest Bug 1380426 - Make nsWebRequestListener use NS_DECL_THREADSAFE_ISUPPORTS. r=kmag 2017-07-19 19:25:43 -04:00
.eslintrc.js Bug 1385820 - Enable the ESLint no-new-wrappers rule across mozilla-central; r=markh,standard8 2017-08-07 23:57:51 +05:30
dummy.xul Bug 1377523 - Part 1: add dummy.xul. r=smaug 2017-07-13 12:27:30 +08:00
ext-alarms.js Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag 2017-06-09 13:49:07 -07:00
ext-backgroundPage.js Bug 1391720 remove _blank support for background pages, r=kmag 2017-08-18 11:30:01 -07:00
ext-browser-content.js Remove unused lazy imports. r=trivial (no bug) 2017-08-02 21:09:38 -07:00
ext-browserSettings.js Bug 1339550 - Implement browser.settings.allowPopupsForUserEvents, r=aswan 2017-07-31 16:46:36 -04:00
ext-c-backgroundPage.js
ext-c-extension.js Remove unused lazy imports. r=trivial (no bug) 2017-08-02 21:09:38 -07:00
ext-c-identity.js Bug 1374237 - Part 2: Declare all top-level functions in toolkit API files files via const., r=mixedpuppy 2017-06-21 14:29:37 -04:00
ext-c-runtime.js
ext-c-storage.js Bug 1391153: Get rid of Sandbox clone for cross-process API calls. r=mixedpuppy 2017-08-16 22:16:31 -07:00
ext-c-test.js Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag 2017-06-09 13:49:07 -07:00
ext-c-toolkit.js Bug 1374735 - use DevToolsShim to open browser console from extensions;r=bgrins,kmag 2017-07-24 12:12:47 +02:00
ext-contextualIdentities.js Bug 1389265 - Change contextual identity web extension APIs to reject instead of returning null. r=aswan 2017-08-16 03:09:48 +01:00
ext-cookies.js Remove unused lazy imports. r=trivial (no bug) 2017-08-02 21:09:38 -07:00
ext-downloads.js Bug 1392003 - Support estimatedEndTime in DownloadItem; r=aswan 2017-08-19 15:06:46 -04:00
ext-extension.js
ext-i18n.js
ext-idle.js Bug 1387898: Remove unnecessary uses of EventEmitter.decorate. r=mixedpuppy 2017-08-07 14:42:57 -07:00
ext-management.js Bug 1387898: Remove unnecessary uses of EventEmitter.decorate. r=mixedpuppy 2017-08-07 14:42:57 -07:00
ext-notifications.js Bug 1387898: Remove unnecessary uses of EventEmitter.decorate. r=mixedpuppy 2017-08-07 14:42:57 -07:00
ext-permissions.js Remove unused lazy imports. r=trivial (no bug) 2017-08-02 21:09:38 -07:00
ext-privacy.js Bug 1345158 - Implement privacy.websites.trackingProtectionMode r=aswan,bsilverberg 2017-08-09 15:47:02 -05:00
ext-protocolHandlers.js Bug 1374237 - Part 2: Declare all top-level functions in toolkit API files files via const., r=mixedpuppy 2017-06-21 14:29:37 -04:00
ext-proxy.js Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag 2017-06-09 13:49:07 -07:00
ext-runtime.js Remove unused lazy imports. r=trivial (no bug) 2017-08-02 21:09:38 -07:00
ext-storage.js Bug 1370752: Part 3 - Use structured clone rather than JSON to sanitize storage values. r=aswan 2017-07-10 18:24:11 -07:00
ext-tabs-base.js Bug 1238314: Part 2 - Implement browser.tabs openerTabId functionality. r=aswan 2017-08-04 16:13:59 -07:00
ext-theme.js Bug 1342712 - Allow scoping a theme per-window. r=jaws 2017-08-04 20:08:57 +00:00
ext-toolkit.js Bug 1387907: Follow-up: Move identity module init data to ext-browser.json. 2017-08-12 17:41:34 -07:00
ext-toolkit.json Bug 1354602 - Enabling containers for container addons on startup. r=aswan,mconley,zombie 2017-08-13 16:17:41 +01:00
ext-topSites.js
ext-webNavigation.js Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag 2017-06-09 13:49:07 -07:00
ext-webRequest.js Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag 2017-06-09 13:49:07 -07:00
extension-process-script.js Backed out 8 changesets (bug 1356334) for frequent test_ext_contentscript_async_loading.html failures on Android debug on a CLOSED TREE. 2017-08-18 11:32:18 -04:00
Extension.jsm Backed out 8 changesets (bug 1356334) for frequent test_ext_contentscript_async_loading.html failures on Android debug on a CLOSED TREE. 2017-08-18 11:32:18 -04:00
ExtensionChild.jsm Bug 1391353: Try to avoid keeping message data alive while waiting for responses. r=zombie 2017-08-17 11:41:55 -07:00
ExtensionChildDevToolsUtils.jsm
ExtensionCommon.jsm Merge m-c to inbound, a=merge 2017-08-18 16:29:11 -07:00
ExtensionContent.jsm Backed out 8 changesets (bug 1356334) for frequent test_ext_contentscript_async_loading.html failures on Android debug on a CLOSED TREE. 2017-08-18 11:32:18 -04:00
ExtensionPageChild.jsm
ExtensionParent.jsm Bug 1391472: Part 2 - Cache normalized icon data for non-string values. r=mixedpuppy 2017-08-18 11:54:18 -07:00
ExtensionPermissions.jsm Bug 1388215: Part 3 - Use JIT-friendly defineLazy*Getters methods when defining many lazy imports. r=florian 2017-08-09 13:03:36 -07:00
ExtensionPolicyService.cpp Backed out 8 changesets (bug 1356334) for frequent test_ext_contentscript_async_loading.html failures on Android debug on a CLOSED TREE. 2017-08-18 11:32:18 -04:00
ExtensionPolicyService.h
ExtensionPreferencesManager.jsm Bug 1381605 - Do not load ExtensionSettingsStore's JSON file synchronously, r=aswan 2017-07-24 15:49:30 -04:00
extensions-toolkit.manifest Bug 1387907: Part 3 - Merge ext-browser.js and ext-utils.js. r=mixedpuppy 2017-08-06 18:20:25 -07:00
ExtensionSettingsStore.jsm Bug 1381605 - Do not load ExtensionSettingsStore's JSON file synchronously, r=aswan 2017-07-24 15:49:30 -04:00
ExtensionStorage.jsm Bug 1370752: Part 3 - Use structured clone rather than JSON to sanitize storage values. r=aswan 2017-07-10 18:24:11 -07:00
ExtensionStorageSync.jsm Bug 1388215: Part 3 - Use JIT-friendly defineLazy*Getters methods when defining many lazy imports. r=florian 2017-08-09 13:03:36 -07:00
ExtensionTestCommon.jsm Bug 1372750 - allow generated embedded extensions to work in xpcshell tests r=kmag 2017-06-21 12:46:57 -07:00
ExtensionUtils.jsm Bug 1391158: Optimize checkLoadURL for the common case of extension URLs. r=mixedpuppy 2017-08-16 23:03:15 -07:00
ExtensionXPCShellUtils.jsm Bug 1380186 test http redirects to moz-ext protocol, r=kmag 2017-07-27 13:34:54 -07:00
jar.mn Bug 1389849: Remove ext-geolocation.js. r=mixedpuppy 2017-08-12 15:48:02 -07:00
LegacyExtensionsUtils.jsm Bug 1379721: Add separate AsyncShutdown blocker for embedded extension shutdown. r=rhelmer 2017-07-10 12:29:27 -07:00
MatchGlob.h
MatchPattern.cpp Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu 2017-07-29 20:50:21 +09:00
MatchPattern.h
MessageChannel.jsm Bug 1391353: Try to avoid keeping message data alive while waiting for responses. r=zombie 2017-08-17 11:41:55 -07:00
moz.build Bug 1388211: Fold ExtensionAPI.jsm into ExtensionCommon.jsm. r=mixedpuppy 2017-08-07 17:58:14 -07:00
mozIExtensionProcessScript.idl
NativeMessaging.jsm Bug 1388215: Part 3 - Use JIT-friendly defineLazy*Getters methods when defining many lazy imports. r=florian 2017-08-09 13:03:36 -07:00
ProxyScriptContext.jsm Bug 1355198 - Fix DIRECT return type to take no arguments and update error handling r=mixedpuppy 2017-06-06 12:34:12 -04:00
Schemas.jsm Bug 1391099: Avoid using checkLoadURIStrWithPrincipal. r=mixedpuppy 2017-08-16 16:29:06 -07:00
WebExtensionContentScript.h Bug 1370263: Don't try to match content scripts for non-codebase principals. r=mixedpuppy 2017-06-06 14:18:49 -07:00
WebExtensionPolicy.cpp Bug 1385172 - Replace nsEscapeHTML{,2}() with new nsAppendEscapedHTML() function. r=erahm. 2017-08-18 12:00:59 +10:00
WebExtensionPolicy.h Backed out 8 changesets (bug 1356334) for frequent test_ext_contentscript_async_loading.html failures on Android debug on a CLOSED TREE. 2017-08-18 11:32:18 -04:00