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 208350 54949d681a14
parent 208349 342c0c26e18d
child 208351 50590d1557c4
push id3835
push userryanvm@gmail.com
push date2014-08-20 22:04 +0000
treeherdermozilla-beta@54949d681a14 [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);