Commit graph

52 commits

Author SHA1 Message Date
Mark Banner
0e947c9d32 Bug 1411891 - Improve the performance of deleting bookmarks with async transactions. r=mak
MozReview-Commit-ID: GL9nKfypie1

--HG--
extra : rebase_source : 5cd1c4d848dc32611349e25eb7297ba50890f0a9
2017-10-26 10:14:14 +01:00
Margareta Eliza Balazs
1d0ba383ae Backed out changeset e17a2bca5391 (bug 1411891) for failing xpcshell in toolkit/modules/tests/xpcshell/test_NewTabUtils.js r=backout on CLOSED TREE 2017-10-31 14:19:52 +02:00
Mark Banner
d059b763bb Bug 1411891 - Improve the performance of deleting bookmarks with async transactions. r=mak
MozReview-Commit-ID: GL9nKfypie1

--HG--
extra : rebase_source : ca8ec95e51899bc1fb18e7a39f42a96569a2d4d1
2017-10-26 10:14:14 +01:00
Bob Silverberg
ab10610842 Bug 1293853 - Part 3: Add support for separators to bookmarks API, r=mixedpuppy
This adds support for separators to the bookmarks API. Separators can now be created
and will be returned by any method that returns BookmarkTreeNodes. They will also be
included in data for the onCreated and onRemoved events.

BookmarkTreeNodes will now contain a `type` property which will be one of bookmark,
folder or separator. When creating a bookmark object, one can specify the type, or one
can rely on the Chrome-compatible behaviour which treats any bookmarks without a URL
as a folder. To create a separator one must specify a type as part of the CreateDetails
object.

MozReview-Commit-ID: BoyGgx8lMAZ

--HG--
extra : rebase_source : 95a06fe81d21d660aeecbd86b71ca6bbcd66eb10
2017-08-28 17:05:55 -04:00
Kris Maglione
0a92c7bb9b Bug 1387898: Remove unnecessary uses of EventEmitter.decorate. r=mixedpuppy
MozReview-Commit-ID: FRCdXHc3S4K

--HG--
extra : rebase_source : 4d7eb8614745fdbcac37b101a617d7aa3d43eea0
2017-08-07 14:42:57 -07:00
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
bb1231853d Bug 1374237 - Part 1: Uniquify the name of the convert functions in ext-cookies.js and ext-bookmarks.js, r=mixedpuppy
Also declare all top-level functions in those files via const.

MozReview-Commit-ID: FsIEHVeotX8

--HG--
extra : rebase_source : 8257fac9824fddb78bf79c6d45eb16f6c0797603
2017-06-21 14:19:39 -04: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
Bob Silverberg
61046f7759 Bug 1364546 - Set the children property for BookmarkTreeNodes without children, r=mixedpuppy
BookmarkTreeNodes without children do not contain a children property, but they should actually
contain a children property which is an empty array. This is what Chrome does as well.

This patch fixes that, and includes a test for a case of getChildren that was previously
untested, which I noticed when working on this code.

MozReview-Commit-ID: CjUwExma760

--HG--
extra : rebase_source : b3297eaf444ec987baeb97c8f0c7547450eb256d
2017-05-23 15:16:10 -04:00
Kris Maglione
e272c4c239 Bug 1365005: Cleanup async code after Task.jsm migration. r=aswan
MozReview-Commit-ID: FNKSsBqq6Kf

--HG--
extra : rebase_source : f6e5056fc2de0b13b4b77e27fe88c2d4063b1445
extra : amend_source : 42473dedc3280e225eb243ce5a87d552ba5f9ee2
2017-05-15 12:07:06 -07:00
Florian Quèze
5e3539e504 Bug 1353542 - massive script-generated patch converting Task.async and Task.spawn calls, and generators clearly identifiable as tasks, rs=Mossop. 2017-05-12 14:42:39 +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
Florian Queze
37ff4fc7cc Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst
a07223d699 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Florian Queze
95d4d20c17 Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Kris Maglione
e6d84db845 Bug 1350522: Part 4 - Convert browser APIs to lazy loading. r=aswan
MozReview-Commit-ID: BQoWF9nHOuF

--HG--
rename : browser/components/extensions/ext-desktop-runtime.js => browser/components/extensions/ext-browser.js
extra : source : 7fd4ade8811856e835506310a57725dbd355c786
extra : histedit_source : c1775902971f858bfaa386977ca8d579c0ce3c61%2C489e3ed33d4c1bb47c3afbe30849b42e83771f48
2017-04-02 11:59:55 -07:00
Jerry Krinock
7a8b5ea810 Bug 1343473 - Fixed parentId on the root node returned from bookmarks.getSubTree. r=bsilverberg, r=mixedpuppy
--HG--
extra : rebase_source : e53f37e5492035a3b62cd2caba6a5e6cdc436a91
2017-03-16 15:43:00 -04: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
Tom Schuster
cdf4b653b0 Bug 1221764 - Implement simple chrome.bookmarks events, r=aswan,mak
MozReview-Commit-ID: LWbhYf8CpZD

--HG--
extra : rebase_source : 74e11b9787ef151640aa5ff13024e62c40ddc476
2016-08-17 10:22:10 -04: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
Andrew Swan
0a3f040d19 Bug 1292605 Import PlacesUtils.jsm in ext-bookmarks r=kmag
MozReview-Commit-ID: 7h3SR5r9TWN

--HG--
extra : rebase_source : d922d3f6ccca83a3bef66aa5b139d01d3e1ed9c7
2016-08-04 13:47:36 -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
Matthew Wein
9db4b394c8 Bug 1285063 - Part 2: Switch to using the Category Manager to register scripts/schemas in order to load them in time for Fennec. r=kmag
MozReview-Commit-ID: 2U8cTYeH8kg

--HG--
extra : rebase_source : 32ffedca29caeb1154d9d1712795f18fc74dbe2a
2016-07-22 12:44:40 -07: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
Ryan VanderMeulen
da1885e860 Merge inbound to m-c. a=merge 2016-03-12 15:23:38 -05:00
Kris Maglione
fb14da16b7 Bug 1250784: Follow-up: Fix merge conflict in bookmarks API. r=me
MozReview-Commit-ID: 83I9WhoUZGj

--HG--
extra : rebase_source : ba869cf2940eb5c52697c4e1f145c3fadb909fd2
2016-03-11 11:07:22 -08:00
Carsten "Tomcat" Book
09388646a3 Merge mozilla-central to fx-team 2016-03-11 16:58:46 +01:00
Kris Maglione
7dfe8256b3 Bug 1250784: Part 2 - [webext] Fix some issues that cause noisy tests. r=Mossop
MozReview-Commit-ID: 93NMinJpWRo

--HG--
extra : rebase_source : 5d7571a2d75c7991cb7eb7f00de9800578e3791a
2016-03-09 17:26:27 -08:00
bsilverberg
679051b6d8 Bug 1236121 - Complete test coverage for the WebExtension bookmarks API. r=kmag
Add coverage for getChildren() when the promise is rejected
Add coverage for create() specifying index
Add coverage for update() specifying a URL
Add coverage for update() when the promise is rejected

MozReview-Commit-ID: 7ANRDWRublL

--HG--
extra : transplant_source : %C0vL%13%B2%BFo%07%0B%0B%CB%BD%BD4%15QA%FCY%7C
2016-03-09 10:02:40 -05:00
bsilverberg
e9211fc397 Bug 1252250 - Implement browser.bookmarks.removeTree(), r=kmag r=mak
MozReview-Commit-ID: HyjJrEjcsZu

--HG--
extra : source : 3646fe906d7ede02b09b2af815c2d96f0a9d6094
2016-03-03 08:00:42 -05:00
Kit Cambridge
5d8590bae1 Back out changeset a67f0b208af6 (bug 1252250) for merge conflicts.
MozReview-Commit-ID: IQzGkqThQzG

--HG--
extra : rebase_source : f59f5d9e9bef582881aefb54a5e8a1d6ec3ddb71
2016-03-04 14:46:15 -08:00
bsilverberg
d2ee0f20a2 Bug 1252250 - Implement browser.bookmarks.removeTree(), r=kmag r=mak
MozReview-Commit-ID: HyjJrEjcsZu

--HG--
extra : rebase_source : 0e4f44b20a1c4afe0222d2e456399ae3f8b93124
2016-03-04 11:02:28 -08:00
bsilverberg
ccaa30638a Bug 1251269 - Implement browser.bookmarks.getRecent(), r=kmag r=mak
MozReview-Commit-ID: 7nYCplcQZuk

--HG--
rename : toolkit/components/places/tests/bookmarks/test_bookmarks_search.js => toolkit/components/places/tests/bookmarks/test_bookmarks_getRecent.js
extra : rebase_source : a5ad83c83a6cb5c3c21d14f8faac5774a5d748e8
2016-03-03 08:07:16 -05:00
bsilverberg
2ba8c54467 Bug 1253652 - Fix browser.bookmarks.move() and add tests for it. r=kmag, r=mak
Update Bookmarks.update to not require a parentGuid when updating just the index.

MozReview-Commit-ID: JJO2IDyI5oN

--HG--
extra : rebase_source : 390d6c80f034f01cc419b1c2c3c9a93722fa1c59
2016-03-09 09:30:43 -05:00
Kris Maglione
ba2e5f60f4 Bug 1248855 - [webext] Add "object-curly-spacing" ESLint rule and auto-fix errors. r=billm
MozReview-Commit-ID: BAZ2rRl7eSM
2016-02-16 20:10:00 -08:00
Johann Hofmann
4d2291640d Bug 1225743 - Implement chrome.bookmarks.search. r=mak 2015-11-24 17:40:08 +01:00
Carsten "Tomcat" Book
40c8a880c4 Backed out changeset 9802a7367d48 (bug 1225743) for ES failures 2016-02-12 12:16:19 +01:00
Johann Hofmann
cb09799b68 Bug 1225743 - Implement chrome.bookmarks.search
--HG--
extra : commitid : FoEz268aSjP
2015-11-24 17:40:08 +01:00
Kris Maglione
2762bb5398 Bug 1234020: Part 2f - [webext] Return promises from the bookmarks API. r=evilpie
--HG--
extra : commitid : 8s79WWvVomB
extra : rebase_source : c3bb8465a7f8ccb5066ef3dbaeadb6e1647763bf
2016-02-01 18:12:45 -08:00
Bill McCloskey
75122447dd Bug 1208257 - [webext] bookmarks.json (r=kmag) 2015-12-23 08:57:13 -08:00
Kris Maglione
b729a30707 Bug 1229874: Part 3 - Enable ESLint in WebExtension code. r=billm
The base .eslintrc is essentially a merge of the root Toolkit .eslintrc and
the devtools .eslintrc, with some minor changes to match our prevalent style.

For the most enforces the coding styles that we've been using most
consistently. There are a couple of significant differences, though:

 * The rule for opening brace alignment can only be applied globally, and
   doesn't make exceptions for top-level functions. I chose to turn it on, and
   change the brace style of existing top-level functions that violated it,
   since the rule seemed worth using, and that's the direction most Toolkit JS
   code has been headed anyway.

 * The rule for switch/case statements requires an added indentation level for
   case statements. Most of our switch statements did not use an extra level
   of indentation, and I initially wrote the rule to enforce that style, until
   I came across case statements that used blocks, and required the extra
   indentation level for sanity.

--HG--
rename : devtools/.eslintrc => toolkit/components/extensions/.eslintrc
extra : commitid : 4aDZOi5MNPc
extra : rebase_source : f34ba43aeb8046a0c971cb76b76410497bd12b42
extra : source : 2a7eb4ef7b375e5fd52d843ca206a071367a6475
2015-12-02 16:58:53 -08:00