Closed
Bug 1476760
Opened 7 years ago
Closed 7 years ago
Port bug 1476030 / bug 1476678 - replace use of document.persist
Categories
(Thunderbird :: General, enhancement)
Thunderbird
General
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 63.0
People
(Reporter: jorgk-bmo, Assigned: darktrojan)
Details
Attachments
(5 files, 2 obsolete files)
|
5.91 KB,
patch
|
jorgk-bmo
:
review+
|
Details | Diff | Splinter Review |
|
3.91 KB,
patch
|
Fallen
:
review+
|
Details | Diff | Splinter Review |
|
8.25 KB,
patch
|
jorgk-bmo
:
review+
|
Details | Diff | Splinter Review |
|
2.71 KB,
patch
|
Fallen
:
review+
|
Details | Diff | Splinter Review |
|
6.53 KB,
patch
|
jorgk-bmo
:
review+
darktrojan
:
feedback+
|
Details | Diff | Splinter Review |
From bug 1476030 comment #18:
1) We're porting `Cc["@mozilla.org/xul/xulstore;1"].getService(Ci.nsIXULStore);` to `Services.xulStore` (see part 1)
2) We're porting all callers from `document.persist(node.id, attr)` to `Services.xulStore.persist(node, attr)` (see part 3)
Geoff, do you have a few cycles to do this, otherwise I will.
Flags: needinfo?(geoff)
| Assignee | ||
Comment 2•7 years ago
|
||
The change in question hasn't yet landed on central yet, so this is untested.
| Assignee | ||
Comment 3•7 years ago
|
||
Attachment #8993270 -
Flags: review?(jorgk)
| Reporter | ||
Comment 4•7 years ago
|
||
Comment on attachment 8993269 [details] [diff] [review]
1476760-xulstore-1.diff
Thanks, but I can't review Calendar. Can you please split the patch accordingly.
Also, when you now use Services.xulStore, did you check that Services is in fact available?
Attachment #8993269 -
Flags: review?(jorgk)
| Reporter | ||
Comment 5•7 years ago
|
||
Comment on attachment 8993270 [details] [diff] [review]
1476760-persist-1.diff
See previous comment.
Attachment #8993270 -
Flags: review?(jorgk)
| Reporter | ||
Comment 6•7 years ago
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #2)
> The change in question hasn't yet landed on central yet, so this is untested.
Now it has ;-)
| Assignee | ||
Comment 7•7 years ago
|
||
Attachment #8993269 -
Attachment is obsolete: true
Attachment #8993296 -
Flags: review?(jorgk)
| Assignee | ||
Comment 8•7 years ago
|
||
Attachment #8993297 -
Flags: review?(philipp)
| Assignee | ||
Comment 9•7 years ago
|
||
Attachment #8993270 -
Attachment is obsolete: true
Attachment #8993298 -
Flags: review?(jorgk)
| Assignee | ||
Comment 10•7 years ago
|
||
Attachment #8993300 -
Flags: review?(philipp)
| Assignee | ||
Comment 11•7 years ago
|
||
(In reply to Jorg K (GMT+2) from comment #4)
> Also, when you now use Services.xulStore, did you check that Services is in
> fact available?
It's available in all those places, I've added it explicitly in the binding I'm not sure about.
Updated•7 years ago
|
Attachment #8993300 -
Flags: review?(philipp) → review+
Updated•7 years ago
|
Attachment #8993297 -
Flags: review?(philipp) → review+
| Reporter | ||
Comment 12•7 years ago
|
||
Comment on attachment 8993298 [details] [diff] [review]
1476760-persist-2.diff
Thanks, looks OK by visual inspection.
Attachment #8993298 -
Flags: review?(jorgk) → review+
| Reporter | ||
Comment 13•7 years ago
|
||
Comment on attachment 8993296 [details] [diff] [review]
1476760-xulstore-2.diff
Review of attachment 8993296 [details] [diff] [review]:
-----------------------------------------------------------------
::: common/src/Overlays.jsm
@@ +164,5 @@
> this.loadCSS(sheet);
> }
>
> for (let bar of this._toolbarsToResolve) {
> + let currentset = Services.xulStore.getValue(this.location, bar.id, "currentset");
calling this repeatedly is not going to make it faster, if you care about speed. I can't see the context, but this.xulStore could be used and initialised somewhere?
@@ +196,3 @@
> while (attrNames.hasMore()) {
> let attrName = attrNames.getNext();
> + let attrValue = Services.xulStore.getValue(this.location, id, attrName);
Here we're in a nested while loop.
::: mail/test/mozmill/migration-to-rdf-ui-2/test-migrate-to-rdf-ui-2.js
@@ +33,1 @@
> if (xulStore.hasValue(MESSENGER_DOCURL, "folderPaneBox", "collapsed"))
Please remove that variable.
| Reporter | ||
Comment 14•7 years ago
|
||
Comment on attachment 8993296 [details] [diff] [review]
1476760-xulstore-2.diff
(In reply to Jorg K (GMT+2) from comment #13)
> calling this repeatedly is not going to make it faster, if you care about
> speed. I can't see the context, but this.xulStore could be used and
> initialised somewhere?
That's wrong, isn't it? Services.xulStore and this.xulStore are about the same thing: object.attribute.
You can still remove the variable in test-migrate-to-rdf-ui-2.js (although there is bug 1371898 to remove that).
Attachment #8993296 -
Flags: review?(jorgk) → review+
| Reporter | ||
Comment 15•7 years ago
|
||
You're OK with those tweaks?
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=2acfc7e3c2d7114e9893b515531ee9e506ba9b53
Attachment #8993523 -
Flags: review+
Attachment #8993523 -
Flags: feedback?(geoff)
| Assignee | ||
Comment 16•7 years ago
|
||
Comment on attachment 8993523 [details] [diff] [review]
1476760-xulstore-2.diff - with small tweaks
Not opposed. I can't really see the point in doing that to Overlays.jsm, but whatever.
Attachment #8993523 -
Flags: feedback?(geoff) → feedback+
| Reporter | ||
Comment 17•7 years ago
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #16)
> Not opposed. I can't really see the point in doing that to Overlays.jsm, but
> whatever.
Thanks. Well, it was inspired by
- let xulStore = Cc["@mozilla.org/xul/xulstore;1"].getService(Ci.nsIXULStore);
+ let xulStore = Services.xulStore;
in mailMigrator.js. And getting a local variable has got to be quicker than getting Services.xulStore, no?
Comment 18•7 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/a7406b1e7296
Port bug 1476030: replace use of document.persist with Services.xulStore.persist. r=jorgk
https://hg.mozilla.org/comm-central/rev/a157a1b0d6e6
Port bug 1476030: use Services.xulStore. r=jorgk
https://hg.mozilla.org/comm-central/rev/ed5da3a2f84a
Port bug 1476030: replace use of document.persist with Services.xulStore.persist in calendar/. r=philipp
https://hg.mozilla.org/comm-central/rev/6037573afc86
Port bug 1476030: use Services.xulStore in calendar/. r=philipp DONTBUILD
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
| Reporter | ||
Updated•7 years ago
|
Target Milestone: --- → Thunderbird 63.0
You need to log in
before you can comment on or make changes to this bug.
Description
•