Commit Graph

53 Commits

Author SHA1 Message Date
Sebastian Hengst
8642712c2a 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
c140bd9d12 Bug 1369577 Part 1 Rename SingletonEventManager to EventManager r=kmag
MozReview-Commit-ID: 7nsYWdSTJCG
2017-06-09 13:49:07 -07:00
Bob Silverberg
4b8df9ba3a 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
2017-06-21 14:29:37 -04:00
Mark Striemer
a281affe2d Bug 1369782 - Require user interaction for downloads.open() r=aswan
MozReview-Commit-ID: 9RkIOfZEfnf
2017-06-02 18:34:08 -05:00
Mark Banner
9916415caf Bug 1371292 - Clean up more ESLint global definitions in configuration files in toolkit/ and browser/. r=mossop
MozReview-Commit-ID: 5KC23kzaCFN
2017-06-08 10:59:12 +01:00
Tomislav Jovanovic
83e9e8377e Bug 1367572 - Remove uniquified file when used in combination with saveAs option r=aswan
MozReview-Commit-ID: 4atukwcsZgA
2017-06-06 00:37:41 +02:00
Kris Maglione
db3ec327d2 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
2017-05-26 15:44:41 -07:00
Andrew Swan
b37f8b08cf 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
2017-05-08 11:13:15 -07:00
Alexandre Poirot
208511b0d3 Bug 1356231 - Use toolkit EventEmitter.jsm instead of devtools module. r=mossop
MozReview-Commit-ID: 49JI7NtLwKK
2017-04-27 17:58:09 +02:00
Kris Maglione
da08b6926c Bug 1317697: Remove things from ExtensionUtils that don't belong there. r=mixedpuppy
MozReview-Commit-ID: CTX0TckLqoV
2017-04-07 13:39:06 -07:00
Kris Maglione
884009911d Bug 1350522: Part 2 - Convert toolkit APIs to lazy loading. r=aswan
MozReview-Commit-ID: 8TbTIM4WX2d
2017-03-31 19:36:00 -07:00
Andrew Swan
1ac8741081 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
2017-01-26 20:00:33 -08:00
Phil Ringnalda
5781d2a09e 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
8e5ca9edb5 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
2017-01-26 13:43:12 -08:00
Jared Wein
21fc75d491 Bug 1326479 - Fix 'indent' eslint errors now that eslint scans multiline array and object definitions. r=Gijs
MozReview-Commit-ID: 99mWjxu8PPn
2017-01-03 10:07:50 -05:00
Tomislav Jovanovic
ba969996c8 bug 1247793 - Implement download() options: method, headers and body, r=aswan
MozReview-Commit-ID: 2muhcweY8Fo
2016-10-22 12:06:22 +02:00
Tomislav Jovanovic
4d2be23e86 Bug 1247791 - Implement options.saveAs for downloads.download, r=kmag
MozReview-Commit-ID: 5MrObsL7eTw
2016-09-19 22:39:22 +02:00
Tomislav Jovanovic
dee0f400d7 Bug 1280044 - handle subdirs in browser.downloads filenames, r=aswan
MozReview-Commit-ID: B4WoMbdxYjV
2016-09-09 19:38:01 +02:00
Rob Wu
812e170fe8 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
2016-08-16 15:51:50 -07:00
Rob Wu
6efdd88867 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
2016-08-15 01:04:58 -07:00
Sebastian Hengst
c7a498ffbd 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
6189daa99f 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
2016-08-15 01:04:58 -07:00
Jared Wein
ebf1ccbe46 Bug 1291855 - Enable the no-else-return rule for eslint. r=Felipe,kmag,mossop
MozReview-Commit-ID: DYOmE6xwMJh
2016-08-03 18:54:59 -04:00
Kris Maglione
843973aa31 Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
MozReview-Commit-ID: 8m7wJrAbFwS
2016-06-09 17:44:47 -07:00
Sebastian Hengst
d97f588f03 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
b2a33e3bf1 Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
MozReview-Commit-ID: 8m7wJrAbFwS
2016-06-09 17:44:47 -07:00
Bob Silverberg
1a7d79421b 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
2016-05-24 09:00:17 -04:00
Andrew Swan
536028776a 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
2016-05-31 11:42:41 -07:00
Sebastian Hengst
b169ca896f Backed out changeset 800df6b80dc0 (bug 1265836) 2016-05-26 10:32:41 +02:00
Bob Silverberg
e903af75a7 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
2016-05-24 09:00:17 -04:00
Bob Silverberg
52bfc3f194 Bug 1265834 - Part 1: Move normalizeTime from downloads into a shared util. r=aswan
MozReview-Commit-ID: GKWBbvTPbGy
2016-05-13 10:18:04 -04:00
Mark Striemer
6f2b028bb4 bug 1245606 - Implement chrome.downloads.getFileInfo r=kmag
MozReview-Commit-ID: 6dfpctduYtp
2016-04-15 16:08:16 -05:00
Andrew Swan
385d4a12a2 Bug 1257137 - Handle bad args in downloads.{pause,resume,cancel}. r=kmag
MozReview-Commit-ID: HKYqlKUMp91
2016-03-26 14:49:51 -07:00
Andrew Swan
e93ecceed5 Bug 1245651 - Implement chrome.downloads.onErased. r=kmag
MozReview-Commit-ID: AIskV6fBOiS
2016-03-22 18:20:11 -07:00
Stuart Colville
ca5de3119d Bug 1245644 - Add chrome.downloads.removeFile. r=kmag
MozReview-Commit-ID: 4picapXsv2x
2016-03-14 16:22:24 +01:00
Mark Striemer
c0aa1b074e Bug 1245636 - Implement chrome.downloads.open. r=kmag
MozReview-Commit-ID: KYBgXTaUSkc
2016-03-14 11:46:43 +01:00
Andreas Wagner
63a26215d0 Bug 1245639 - Implement chrome.downloads.show. r=kmag 2016-03-14 15:55:00 +01:00
Carsten "Tomcat" Book
a52b4a9892 Backed out changeset 74176e6545b1 (bug 1245644) for m-oth test failures 2016-03-18 08:08:01 +01:00
Stuart Colville
6888dbe819 Bug 1245644 - Add chrome.downloads.removeFile. r=kmag
MozReview-Commit-ID: 4picapXsv2x
2016-03-14 16:22:24 +01:00
Andrew Swan
abc202a4a8 Bug 1245641 - Implement chrome.downloads.erase() r=kmag
MozReview-Commit-ID: GtjVAklh4vL
2016-03-15 04:19:28 -07:00
Andrew Swan
7ffc6e0b52 Bug 1245602 - Implement chrome.downloads.pause(), .resume(), .cancel() r=kmag
MozReview-Commit-ID: Cu2TNJRTZ07
2016-03-15 05:51:27 -07:00
Andrew Swan
626b88475b Bug 1245640 - Implement chrome.downloads.showDefaultDirectory() r=kmag
MozReview-Commit-ID: JE3RWRHkKTW
2016-03-10 17:02:27 -08:00
Andrew Swan
a2b7a30348 Bug 1245599 - Implement chrome.downloads.onCreated r=kmag
MozReview-Commit-ID: 53yhKZYHDrD
2016-03-07 16:54:08 -08:00
Carsten "Tomcat" Book
55f43d5519 Backed out changeset 6d5004acc11c (bug 1245599) for ES failures 2016-03-09 11:24:06 +01:00
Andrew Swan
5c09bcd6ab Bug 1245599 - Implement chrome.downloads.onCreated r=kmag
MozReview-Commit-ID: Bimv9lY651A
2016-03-07 16:54:08 -08:00
Andrew Swan
f61974a16b Bug 1251766 - Accept more date formats for downloads.search(). r=kmag
MozReview-Commit-ID: K0r1wiY2lqf
2016-03-04 10:44:09 -08:00
Andrew Swan
d43d7f92a6 Bug 1245600 - Implement chrome.downloads.onChanged for state. r=kmag
MozReview-Commit-ID: BaAyU1dgMB7
2016-03-04 12:18:11 -08:00
Andrew Swan
3843e1a60c Bug 1245603 - Implement browser.downloads.search(). r=kmag
MozReview-Commit-ID: 9XqkfZyeS8X
2016-03-02 10:23:55 -08:00
Andrew Swan
94c87b2f77 Bug 1245597 - implement the basics of chrome.downloads.download(). r=kmag 2016-02-24 11:16:32 -08:00
Sebastian Hengst
415698796a Backed out changeset 418bf315261c (bug 1245597) for failing M(c) tests on Android. r=backout on CLOSED TREE 2016-02-24 18:54:15 +01:00