Commit graph

54 commits

Author SHA1 Message Date
Andrew Swan
c29de224fb Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag
MozReview-Commit-ID: 7nsYWdSTJCG

--HG--
extra : rebase_source : 7afd89a9a1853d51bd31196bb2faa7e0d786043c
2017-06-09 13:49:07 -07:00
Sebastian Hengst
6d1aee1b24 Backed out changeset 26fd6d0a1254 (bug 1369577) for failing xpcshell's test_ext_simple.js and test_ext_startup_cache.js on Android. r=backout 2017-06-30 01:01:13 +02:00
Andrew Swan
c60b71854e Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag
MozReview-Commit-ID: 7nsYWdSTJCG

--HG--
extra : rebase_source : 22cf5ee36dfa27e121a5c577bce2fd0189ccb164
2017-06-09 13:49:07 -07:00
Bob Silverberg
29414a264f Bug 1374237 - Part 2: Declare all top-level functions in toolkit API files files via const., r=mixedpuppy
Also changed some function names to attempt to guarantee uniqueness across API files.

MozReview-Commit-ID: GnwWwTADF3a

--HG--
extra : rebase_source : 2d51f3de2958089de97ce98ed1f01c68ec0ed74a
2017-06-21 14:29:37 -04:00
Mark Striemer
f785de42e9 Bug 1369782 - Require user interaction for downloads.open() r=aswan
MozReview-Commit-ID: 9RkIOfZEfnf

--HG--
extra : rebase_source : 0fa336cb476cb560fc2bb0117be32d463d11b414
2017-06-02 18:34:08 -05:00
Mark Banner
403075400a Bug 1371292 - Clean up more ESLint global definitions in configuration files in toolkit/ and browser/. r=mossop
MozReview-Commit-ID: 5KC23kzaCFN

--HG--
extra : rebase_source : 6a7541b5ffe85d275bc16194c155ad43f93d52ae
2017-06-08 10:59:12 +01:00
Tomislav Jovanovic
cac5c016d9 Bug 1367572 - Remove uniquified file when used in combination with saveAs option r=aswan
MozReview-Commit-ID: 4atukwcsZgA

--HG--
extra : rebase_source : da1fc8a15d199b8dff580e1804147a4ed9034f0a
2017-06-06 00:37:41 +02:00
Kris Maglione
0cd3e0a862 Bug 1368189: Move more code out of ExtensionUtils.jsm. r=mixedpuppy
Also removes some dead code.

A lot of the code in ExtensionUtils.jsm is not needed in all processes, and a
lot of the rest isn't needed until extension code runs. Most of it winds up
being loaded into all processes way earlier than necessary.

MozReview-Commit-ID: CMRjCPOjRF2

--HG--
extra : rebase_source : 37718eaf05a22b8ccb95f633cf7454bd7975cdce
2017-05-26 15:44:41 -07:00
Andrew Swan
54b858b874 Bug 1344822 Remove downloads.onChanged hack r=mixedpuppy
This bug highlights a difference between "legacy" downloads and those
created directly from Downloads.jsm, that the onDownloadCreated event for
legacy downloads comes when the download is already in progress while the
same event for non-legacy downloads comes before the actual transfer starts.
A clumsy workaround was originally used to avoid generating nonsense
onChanged events for non-legacy downloads but if we are just careful to
handle downloads that have not yet started, we don't need the workaround.


MozReview-Commit-ID: 7QyKvnR5ZMN

--HG--
extra : rebase_source : 9288f117bb0e4cd42ea3d7622e1779156db53d17
2017-05-08 11:13:15 -07:00
Alexandre Poirot
c90bccb53a Bug 1356231 - Use toolkit EventEmitter.jsm instead of devtools module. r=mossop
MozReview-Commit-ID: 49JI7NtLwKK

--HG--
extra : rebase_source : 7fb015f56be94c4bbe2d56506653f069c9ad8dd3
2017-04-27 17:58:09 +02:00
Kris Maglione
b13ea15e1c Bug 1317697: Remove things from ExtensionUtils that don't belong there. r=mixedpuppy
MozReview-Commit-ID: CTX0TckLqoV

--HG--
extra : rebase_source : ebea9b6f0f17a29d331851a08e025cbd04f4d02b
extra : absorb_source : 70b120f39e9307c4b2ef66d8e776e8b832b4aab8
2017-04-07 13:39:06 -07:00
Kris Maglione
bb351ebfca Bug 1350522: Part 2 - Convert toolkit APIs to lazy loading. r=aswan
MozReview-Commit-ID: 8TbTIM4WX2d

--HG--
extra : source : a3ed5ad1bc338e7fd8055c2efcf73695c25e09e5
2017-03-31 19:36:00 -07:00
Andrew Swan
30deceecf8 Bug 1203330 Part 1 Fix SingletonEventManager r=kmag
This patch adds the ability to run SingletonEventManager handlers in
different modes: sync, async, raw (no exception handling, arg cloning,
or asynchrony), or asyncWithoutClone. When you call the handler,
you're required to specify which variant you want.

Existing uses of SingletonEventManager are all converted to async calls.
Note that some of them were previously synchronous, but it didn't appear
to be necessary.

Also added a callOnClose for SingletonEventManager when the last listener
is removed.

MozReview-Commit-ID: ATHO97dWf3X

--HG--
extra : rebase_source : bf02d79e3fbab84892be8a7e52ea7a1caf2e003d
2017-01-26 20:00:33 -08:00
Phil Ringnalda
9447dfdbd4 Backed out 3 changesets (bug 1203330) for failures in test_delay_update_webextension.js
CLOSED TREE

Backed out changeset 2d42350d209a (bug 1203330)
Backed out changeset 3a12c51c3eca (bug 1203330)
Backed out changeset 31fac390e15d (bug 1203330)
2017-01-26 19:13:11 -08:00
Andrew Swan
f04f785725 Bug 1203330 Part 1 Fix SingletonEventManager r=kmag
This patch adds the ability to run SingletonEventManager handlers in
different modes: sync, async, raw (no exception handling, arg cloning,
or asynchrony), or asyncWithoutClone. When you call the handler,
you're required to specify which variant you want.

Existing uses of SingletonEventManager are all converted to async calls.
Note that some of them were previously synchronous, but it didn't appear
to be necessary.

Also added a callOnClose for SingletonEventManager when the last listener
is removed.

MozReview-Commit-ID: ATHO97dWf3X

--HG--
extra : rebase_source : 43988ee453e965e1c591b1c64603c22f5a103cff
2017-01-26 13:43:12 -08:00
Jared Wein
560afd3f8e Bug 1326479 - Fix 'indent' eslint errors now that eslint scans multiline array and object definitions. r=Gijs
MozReview-Commit-ID: 99mWjxu8PPn

--HG--
extra : rebase_source : f78d800263b8544ce0accbdb2dc57b303969543f
2017-01-03 10:07:50 -05:00
Tomislav Jovanovic
204e680596 bug 1247793 - Implement download() options: method, headers and body, r=aswan
MozReview-Commit-ID: 2muhcweY8Fo

--HG--
extra : rebase_source : 30f0aabce48717caa963610c2fcf831a0b890702
2016-10-22 12:06:22 +02:00
Tomislav Jovanovic
bf1d33700d Bug 1247791 - Implement options.saveAs for downloads.download, r=kmag
MozReview-Commit-ID: 5MrObsL7eTw

--HG--
extra : rebase_source : 5c4328c3e945b606a95807a2b1b20cea8eb5a230
2016-09-19 22:39:22 +02:00
Tomislav Jovanovic
1b1ca8dd89 Bug 1280044 - handle subdirs in browser.downloads filenames, r=aswan
MozReview-Commit-ID: B4WoMbdxYjV

--HG--
extra : transplant_source : %1C%AA%1D%8C%1B%29%23%EB9%AF%DF%C6%91%F1%7E%EBw%21X%9B
2016-09-09 19:38:01 +02:00
Rob Wu
be3652cd57 Bug 1287010 - Make environment of Context explicit. r=billm
- Add `envType` to BaseContext.
 - Pass an explicit envType to all `registerSchemaAPI` invocations.
 - The factories passed to `registerSchemaAPI` will be split up later, so
   that content scripts (`content_child`) and addon pages can share
   common implementations.
 - The factories that implement the addon API will also be split up,
   to separate code running in the main process (`addon_parent`) from
   code running in a child process (`addon_child`).
 - Remove the use of a hardcoded list of `namespaces` from ProxyContext.
   Now `envType` is used to specify whether an API should be activated.

MozReview-Commit-ID: Jiff8HIwG92

--HG--
extra : rebase_source : 946a3c0009a4e3223c2d10044b3099a94c845394
2016-08-16 15:51:50 -07:00
Rob Wu
bacc209644 Bug 1295082 - Put Extension in BaseContext r=kmag
ExtensionContext in Extension.jsm has |extension| as an instance member,
so use it instead of passing |extension| to registerSchemaAPI's
callback.

And to make sure that this pattern also works in content processes, move
the |extension| member to BaseContext.

MozReview-Commit-ID: BgsGGCPQxJR

--HG--
extra : rebase_source : 7aa9fb7a53e057e8d3d8c477bd6821f8344c571a
2016-08-15 01:04:58 -07:00
Sebastian Hengst
2164cd95c8 Backed out changeset 0ce1cc39aa3d (bug 1295082) for timing out in test_ext_schemas_api_injection.js. r=backout 2016-08-18 16:47:09 +02:00
Rob Wu
dfc11d6f00 Bug 1295082 - Put Extension in BaseContext r=kmag
ExtensionContext in Extension.jsm has |extension| as an instance member,
so use it instead of passing |extension| to registerSchemaAPI's
callback.

And to make sure that this pattern also works in content processes, move
the |extension| member to BaseContext.

MozReview-Commit-ID: BgsGGCPQxJR

--HG--
extra : rebase_source : 9a85d95f0c147198938b86c57127f6e7403fd53c
2016-08-15 01:04:58 -07:00
Jared Wein
871ed4e3ba Bug 1291855 - Enable the no-else-return rule for eslint. r=Felipe,kmag,mossop
MozReview-Commit-ID: DYOmE6xwMJh

--HG--
extra : rebase_source : bc81b68ea5599fd1815dc34dac7106eef7044483
2016-08-03 18:54:59 -04:00
Kris Maglione
a1dac7caad Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
MozReview-Commit-ID: 8m7wJrAbFwS

--HG--
extra : source : a00cf073f5c00380d4e42b13bc0cd3146b708845
extra : amend_source : d74ef90e88acbe62e33af3b5b9cf870d5c0a9d3e
2016-06-09 17:44:47 -07:00
Sebastian Hengst
f8035f62a8 Backed out changeset a00cf073f5c0 (bug 1279392) for failing mochitest test_ext_contentscript_create_iframe.html at least on Linux x64 opt. r=backout 2016-06-14 13:37:52 +02:00
Kris Maglione
b465305345 Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
MozReview-Commit-ID: 8m7wJrAbFwS

--HG--
extra : rebase_source : cba877c0ef400917b0b7e5913895e64ebefb34b9
extra : amend_source : 6e943015e3e00854c431cbd653994a6734e66ce4
2016-06-09 17:44:47 -07:00
Bob Silverberg
b610707ecb Bug 1265836 - Part 2: Change normalizeTime to return a date rather than a number. r=aswan
Also update browser.history.deleteRange to use normalizeTime

MozReview-Commit-ID: EQ3NLSIRTe8

--HG--
extra : transplant_source : %0F3%7F%89Y%C3m%86%EB%91%0A%1B%FFMwh%19%AF%E2%23
2016-05-24 09:00:17 -04:00
Andrew Swan
2187d37278 Bug 1271345 Fix brower.download.download() on blob: urls r=kmag
Calling download() on a blob URL was failing in schema validation
since we weren't propagating the extension principal all the way
to the call to scriptSecurityManager.checkLoadURI...

MozReview-Commit-ID: JgEnQ6yxO4P

--HG--
extra : rebase_source : d84933237e301c13ba34221c092b1e895acc20db
2016-05-31 11:42:41 -07:00
Sebastian Hengst
2575bac27a Backed out changeset 800df6b80dc0 (bug 1265836) 2016-05-26 10:32:41 +02:00
Bob Silverberg
751592d0c5 Bug 1265836 - Part 2: Change normalizeTime to return a date rather than a number. r=aswan
Also update browser.history.deleteRange to use normalizeTime

MozReview-Commit-ID: EQ3NLSIRTe8

--HG--
extra : transplant_source : %8B%0D%9ERe%2A%FA%1F%01%B4%A2%BBcCb%EB%8F%8A%A4%09
2016-05-24 09:00:17 -04:00
Bob Silverberg
264a472a5e Bug 1265834 - Part 1: Move normalizeTime from downloads into a shared util. r=aswan
MozReview-Commit-ID: GKWBbvTPbGy

--HG--
extra : transplant_source : %B2B%98%83%DE%8En%03%84%C3%07%B4%AF%060%FF%40%F8%99%C2
2016-05-13 10:18:04 -04:00
Mark Striemer
e34df7b9a1 bug 1245606 - Implement chrome.downloads.getFileInfo r=kmag
MozReview-Commit-ID: 6dfpctduYtp

--HG--
extra : transplant_source : %F4%B1%1AD%92%A7%B0.%26%83%AB%D8%D5%11%A0%A4%24%A7%82T
2016-04-15 16:08:16 -05:00
Andrew Swan
3dea37e5f0 Bug 1257137 - Handle bad args in downloads.{pause,resume,cancel}. r=kmag
MozReview-Commit-ID: HKYqlKUMp91

--HG--
extra : rebase_source : 9d996bd4eeaedf4062e215702729b2a75d7c45da
2016-03-26 14:49:51 -07:00
Andrew Swan
13d8705247 Bug 1245651 - Implement chrome.downloads.onErased. r=kmag
MozReview-Commit-ID: AIskV6fBOiS

--HG--
extra : transplant_source : /Se%FF%A6%E7c%FA%9Do%BE%21%C6%A6%C6%B2%D10%F1%7F
2016-03-22 18:20:11 -07:00
Stuart Colville
8e668102a1 Bug 1245644 - Add chrome.downloads.removeFile. r=kmag
MozReview-Commit-ID: 4picapXsv2x

--HG--
extra : rebase_source : 3cedf458793ae2b682260e556224a2c88d700052
2016-03-14 16:22:24 +01:00
Mark Striemer
ced19f8207 Bug 1245636 - Implement chrome.downloads.open. r=kmag
MozReview-Commit-ID: KYBgXTaUSkc

--HG--
extra : amend_source : a887c9e5c90c29d2b26eb9427c33bfd5a946ef20
extra : transplant_source : %AB%06%82%9F%09%D4%A3%D8%5B%E3%E2D%07%17A%FFu%9CJ%5D
2016-03-14 11:46:43 +01:00
Andreas Wagner
7ffe213fdc Bug 1245639 - Implement chrome.downloads.show. r=kmag
--HG--
extra : rebase_source : 1afc2d4bd38afc58d0c675662b08dd6bfc63e04b
2016-03-14 15:55:00 +01:00
Carsten "Tomcat" Book
1077d1202b Backed out changeset 74176e6545b1 (bug 1245644) for m-oth test failures 2016-03-18 08:08:01 +01:00
Stuart Colville
bcf6886f7c Bug 1245644 - Add chrome.downloads.removeFile. r=kmag
MozReview-Commit-ID: 4picapXsv2x

--HG--
extra : transplant_source : %F7%B9S%A4%0E%EFn%FA%0630MR%04n4L%24%D7%13
2016-03-14 16:22:24 +01:00
Andrew Swan
55a6830e86 Bug 1245641 - Implement chrome.downloads.erase() r=kmag
MozReview-Commit-ID: GtjVAklh4vL

--HG--
extra : rebase_source : b37e17978506f6f48c453dcabf964f045bdfcc4c
2016-03-15 04:19:28 -07:00
Andrew Swan
be7e1c3832 Bug 1245602 - Implement chrome.downloads.pause(), .resume(), .cancel() r=kmag
MozReview-Commit-ID: Cu2TNJRTZ07

--HG--
extra : rebase_source : b5a5ce3f454fec7bfb30c2e807553cca0eb6594f
extra : amend_source : 42bd9671c2970c79d8604d535ede5475b3507828
2016-03-15 05:51:27 -07:00
Andrew Swan
bb3c1b10a6 Bug 1245640 - Implement chrome.downloads.showDefaultDirectory() r=kmag
MozReview-Commit-ID: JE3RWRHkKTW

--HG--
extra : rebase_source : 7f35764e40f72a907fea25113db56d864bc536f4
2016-03-10 17:02:27 -08:00
Andrew Swan
1860156d34 Bug 1245599 - Implement chrome.downloads.onCreated r=kmag
MozReview-Commit-ID: 53yhKZYHDrD
2016-03-07 16:54:08 -08:00
Carsten "Tomcat" Book
3f5b3372e9 Backed out changeset 6d5004acc11c (bug 1245599) for ES failures 2016-03-09 11:24:06 +01:00
Andrew Swan
bb8e622bc8 Bug 1245599 - Implement chrome.downloads.onCreated r=kmag
MozReview-Commit-ID: Bimv9lY651A

--HG--
extra : transplant_source : %8Bz%D5%CE%BB_%3Ds%D0K%17%DF%28%B5Mz_%F4%5B%D8
2016-03-07 16:54:08 -08:00
Andrew Swan
053f654c7e Bug 1251766 - Accept more date formats for downloads.search(). r=kmag
MozReview-Commit-ID: K0r1wiY2lqf

--HG--
extra : rebase_source : 77390ec193bf021cb293fa0e564d2d0a101dce3e
2016-03-04 10:44:09 -08:00
Andrew Swan
a9ee3a7852 Bug 1245600 - Implement chrome.downloads.onChanged for state. r=kmag
MozReview-Commit-ID: BaAyU1dgMB7

--HG--
extra : rebase_source : e0652f3bb9afc13b7276eb92f220542cd61a66be
2016-03-04 12:18:11 -08:00
Andrew Swan
c01dd7fea8 Bug 1245603 - Implement browser.downloads.search(). r=kmag
MozReview-Commit-ID: 9XqkfZyeS8X

--HG--
extra : transplant_source : %12%5D%EF%3B%3F%CE%C7%28v%29%15%16%5E%88%A9n%86%0DPH
2016-03-02 10:23:55 -08:00
Andrew Swan
c5a9db2a6b Bug 1245597 - implement the basics of chrome.downloads.download(). r=kmag 2016-02-24 11:16:32 -08:00