Bug 1295410 - ensure we don't pass string objects for GUIDs to PlacesSyncUtils. r=kitcambridge
authorMark Hammond <mhammond@skippinet.com.au>
Tue, 16 Aug 2016 13:05:50 +1000
changeset 352965 714f26001d3e3e47190f3c91f62dbe9137418811
parent 352964 9bf5770798c9fc30bc741437d9d94ab47afa54f1
child 352966 f77b7188d3b229e9bb68c28e3f429ec4276414d1
push id1324
push usermtabara@mozilla.com
push dateMon, 16 Jan 2017 13:07:44 +0000
treeherdermozilla-release@a01c49833940 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskitcambridge
bugs1295410
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1295410 - ensure we don't pass string objects for GUIDs to PlacesSyncUtils. r=kitcambridge MozReview-Commit-ID: 8muV3ltTfSx
services/sync/modules/engines/bookmarks.js
--- a/services/sync/modules/engines/bookmarks.js
+++ b/services/sync/modules/engines/bookmarks.js
@@ -410,17 +410,19 @@ BookmarksEngine.prototype = {
 
     // Don't bother finding a dupe if the incoming item has duplicates.
     if (item.hasDupe) {
       this._log.trace(item.id + " already a dupe: not finding one.");
       return;
     }
     let mapped = this._mapDupe(item);
     this._log.debug(item.id + " mapped to " + mapped);
-    return mapped;
+    // We must return a string, not an object, and the entries in the GUIDMap
+    // are created via "new String()" making them an object.
+    return mapped ? mapped.toString() : mapped;
   }
 };
 
 function BookmarksStore(name, engine) {
   Store.call(this, name, engine);
 
   // Explicitly nullify our references to our cached services so we don't leak
   Svc.Obs.add("places-shutdown", function() {