Bug 1047340 - Fix annotation of marks by using the browser url rather than cannonical url. r=jaws, a=lmandel
authorShane Caraveo <scaraveo@mozilla.com>
Tue, 19 Aug 2014 09:01:52 -0700
changeset 209434 54949d681a1421e5bc081357cc07dd66053d719c
parent 209433 342c0c26e18d011014c14519dd82cd4ef4da6938
child 209435 50590d1557c46d8ac2b68e99b18ef8c9b7fd315d
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, lmandel
bugs1047340
milestone32.0
Bug 1047340 - Fix annotation of marks by using the browser url rather than cannonical url. r=jaws, a=lmandel
browser/base/content/socialmarks.xml
--- a/browser/base/content/socialmarks.xml
+++ b/browser/base/content/socialmarks.xml
@@ -170,21 +170,20 @@
           evt.initCustomEvent("OpenGraphData", true, true, JSON.stringify(this.pageData));
           this.contentDocument.documentElement.dispatchEvent(evt);
 
           let contentWindow = this.contentWindow;
           let markUpdate = function(event) {
             // update the annotation based on this event, then update the
             // icon as well
             this.isMarked = JSON.parse(event.detail).marked;
-            let uri = Services.io.newURI(this.pageData.url, null, null);
             if (this.isMarked) {
-              Social.markURI(provider.origin, uri);
+              Social.markURI(provider.origin, gBrowser.currentURI);
             } else {
-              Social.unmarkURI(provider.origin, uri, () => {
+              Social.unmarkURI(provider.origin, gBrowser.currentURI, () => {
                 this.update();
               });
             }
           }.bind(this);
           contentWindow.addEventListener("socialMarkUpdate", markUpdate);
           contentWindow.addEventListener("unload", function unload() {
             contentWindow.removeEventListener("unload", unload);
             contentWindow.removeEventListener("socialMarkUpdate", markUpdate);