Closed
Bug 854761
Opened 12 years ago
Closed 12 years ago
Remove previous bookmark calls from PlacesUtils
Categories
(Toolkit :: Places, defect)
Toolkit
Places
Tracking
()
RESOLVED
FIXED
mozilla24
People
(Reporter: andreshm, Assigned: andreshm)
References
Details
Attachments
(2 files, 4 obsolete files)
7.37 KB,
patch
|
Details | Diff | Splinter Review | |
2.18 KB,
patch
|
Details | Diff | Splinter Review |
After all BookmarkJSONUtils.jsm calls are updated, remove all previous code left in Places.
Assignee | ||
Updated•12 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•12 years ago
|
||
Bug 854288 handles all import calls, this bug handles export calls.
Comment 2•12 years ago
|
||
(In reply to Andres Hernandez [:andreshm] from comment #1)
> Bug 854288 handles all import calls, this bug handles export calls.
PlacesUtils.backups.saveBookmarksToJSONFile is replaced by BookmarkJSONUtils.exportToFile in bug 852041. Then, PlacesUtils.backups would be handled by bug 857429, therefore, no work is required in this bug.
Comment 3•12 years ago
|
||
(In reply to Raymond Lee [:raymondlee] from comment #2)
> (In reply to Andres Hernandez [:andreshm] from comment #1)
> > Bug 854288 handles all import calls, this bug handles export calls.
>
> PlacesUtils.backups.saveBookmarksToJSONFile is replaced by
> BookmarkJSONUtils.exportToFile in bug 852041. Then, PlacesUtils.backups
> would be handled by bug 857429, therefore, no work is required in this bug.
After checking the code, PlacesUtils.serializeNodeAsJSONToOutputStream does the same thing as BookmarkNode.serializeAsJSONToOutputStream so I guess we should depreciate PlacesUtils.serializeNodeAsJSONToOutputStream and wrap it with the BookmarkNode.serializeAsJSONToOutputStream.
Andres: can you confirm that please?
Flags: needinfo?(andres)
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Raymond Lee [:raymondlee] from comment #3)
> (In reply to Raymond Lee [:raymondlee] from comment #2)
> > (In reply to Andres Hernandez [:andreshm] from comment #1)
> > > Bug 854288 handles all import calls, this bug handles export calls.
> >
> > PlacesUtils.backups.saveBookmarksToJSONFile is replaced by
> > BookmarkJSONUtils.exportToFile in bug 852041. Then, PlacesUtils.backups
> > would be handled by bug 857429, therefore, no work is required in this bug.
>
>
> After checking the code, PlacesUtils.serializeNodeAsJSONToOutputStream does
> the same thing as BookmarkNode.serializeAsJSONToOutputStream so I guess we
> should depreciate PlacesUtils.serializeNodeAsJSONToOutputStream and wrap it
> with the BookmarkNode.serializeAsJSONToOutputStream.
>
> Andres: can you confirm that please?
That's right, but this bug depends on changes apply on bug 855842 in order to avoid conflicts.
I'll work on those changes.
Depends on: 855842
Flags: needinfo?(andres)
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #738900 -
Flags: review?(mak77)
Comment 6•12 years ago
|
||
Comment on attachment 738900 [details] [diff] [review]
Patch v1
Review of attachment 738900 [details] [diff] [review]:
-----------------------------------------------------------------
there is a call in /services/sync/tps/extensions/tps/modules/bookmarks.jsm that is unhandled here
::: toolkit/components/places/BookmarkJSONUtils.jsm
@@ +118,5 @@
> + let deferred = Promise.defer();
> + Services.tm.mainThread.dispatch(function() {
> + BookmarkNode.serializeAsJSONToOutputStream(
> + aNode, aStream, aIsUICommand, aResolveShortcuts, aExcludeItems);
> + deferred.resolve();
please try/catch and handle exceptions with a reject
::: toolkit/components/places/PlacesUtils.jsm
@@ +562,5 @@
> + if (shouldClose)
> + node.containerOpen = false;
> +
> + return writer.value;
> + });
unfortunately we cannot do this... and I'm not sure we have a solution off-hand since wrapNode is totally synchronous... this should probably keep using the synchronous version for now, you should move the body of serializeNodeAsJSONToOutputStream to a "private" method ( _ prefix) and invoke the private method from the deprecated serializeNodeAsJSONToOutputStream and from here (so that wrapNode won't cause the deprecation).
We'll re-evaluate this once we are done with moving APIs.
Attachment #738900 -
Flags: review?(mak77)
Assignee | ||
Comment 7•12 years ago
|
||
Attachment #738900 -
Attachment is obsolete: true
Attachment #740673 -
Flags: review?(mak77)
Comment 8•12 years ago
|
||
(In reply to Andres Hernandez [:andreshm] from comment #7)
> Created attachment 740673 [details] [diff] [review]
> Patch v2
The patch in bug 860625 touches BookmarkNode.serializeAsJSONToOutputStream so it's best to wait for it to land first.
Depends on: 860625
Comment 9•12 years ago
|
||
Comment on attachment 740673 [details] [diff] [review]
Patch v2
please, re-flag once bug 860625 lands and this has been unbitrotted against that.
Attachment #740673 -
Flags: review?(mak77)
Comment 10•12 years ago
|
||
bug 860625 is in mozilla-inbound so I just updated this patch. Splitting the previous patch into two as one part is for services/sync/
Attachment #740673 -
Attachment is obsolete: true
Updated•12 years ago
|
Attachment #755787 -
Flags: review?(mak77)
Comment 11•12 years ago
|
||
Patch for services/sync. I have run the tps tests and the following test failed before and after applying the patch so I guess it's ok.
TEST-UNEXPECTED-FAIL | test_tabs.js | [phase3] Exception caught: ASSERTION FAILED! error locating tab No traceback available
Attachment #755828 -
Flags: review?(rnewman)
Updated•12 years ago
|
Attachment #755828 -
Flags: review?(rnewman) → review+
Updated•12 years ago
|
Attachment #755787 -
Flags: review?(mak77) → review+
Comment 12•12 years ago
|
||
Attachment #755787 -
Attachment is obsolete: true
Comment 13•12 years ago
|
||
Attachment #755828 -
Attachment is obsolete: true
Comment 14•12 years ago
|
||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 15•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/3203f0d0d225
https://hg.mozilla.org/integration/mozilla-inbound/rev/2412bacd1fe2
Keywords: checkin-needed
Comment 16•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/3203f0d0d225
https://hg.mozilla.org/mozilla-central/rev/2412bacd1fe2
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•