Bug 1047340 - Fix annotation of marks by using the browser url rather than cannonical url. r=jaws, a=sledru
authorShane Caraveo <scaraveo@mozilla.com>
Tue, 19 Aug 2014 09:01:52 -0700
changeset 216450 5a9669ba5940eb47b39316e0ec383dbbaf521a91
parent 216449 2e4f0cb37da14d73675a8d0d9a88c6498de77991
child 216451 a79033353ab9f521f1099ef6cc5f0ce80aad510b
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, sledru
bugs1047340
milestone33.0a2
Bug 1047340 - Fix annotation of marks by using the browser url rather than cannonical url. r=jaws, a=sledru
browser/base/content/socialmarks.xml
--- a/browser/base/content/socialmarks.xml
+++ b/browser/base/content/socialmarks.xml
@@ -187,21 +187,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);