[Pkg-mozext-commits] [SCM] torbutton Debian packaging branch, master, updated. debian/1.4.1-1

Mike Perry mikeperry-git at fscked.org
Wed Aug 31 07:26:49 UTC 2011


The following commit has been merged in the master branch:
commit cc51fe06551be998f70d1653433f8332b2895f98
Author: Mike Perry <mikeperry-git at fscked.org>
Date:   Mon Aug 8 17:00:01 2011 -0700

    Bug #3665: Use loadGroup to get window if callbacks are absent
    
    Thanks to Georg Koppen for catching this oversight.

diff --git a/src/chrome/content/stanford-safecache.js b/src/chrome/content/stanford-safecache.js
index 3daed58..31cdf45 100644
--- a/src/chrome/content/stanford-safecache.js
+++ b/src/chrome/content/stanford-safecache.js
@@ -97,19 +97,29 @@ SSC_RequestListener.prototype =
 
   onModifyRequest: function(channel) {
     var parent = null;
-    if (channel.notificationCallbacks) {
-        try {
-            var wind = channel.notificationCallbacks.QueryInterface(
-                    Components.interfaces.nsIInterfaceRequestor).getInterface(
-                        Components.interfaces.nsIDOMWindow);
-            parent = wind.window.top.location;
-        } catch(e) {
-        }
-        SSC_dump("Parent "+parent+" for "+ channel.URI.spec);
+    if (channel.notificationCallbacks ||
+           channel.loadGroup && channel.loadGroup.notificationCallbacks) {
+      var callbacks = null;
+      if (channel.notificationCallbacks) {
+        callbacks = channel.notificationCallbacks;
+      } else {
+        callbacks = channel.loadGroup.notificationCallbacks;
+      }
+      try {
+          var wind = callbacks.QueryInterface(
+                  Components.interfaces.nsIInterfaceRequestor).getInterface(
+                      Components.interfaces.nsIDOMWindow);
+          parent = wind.window.top.location;
+      } catch(e) {
+      }
+      SSC_dump("Parent "+parent+" for "+ channel.URI.spec);
     }
 
     if (channel.documentURI && channel.documentURI == channel.URI) {
       parent = null;  // first party interaction
+    } else if(!parent) {
+      // Questionable first party interaction..
+      SSC_dump("No parent parent for "+ channel.URI.spec);
     }
 
     // Same-origin policy

-- 
torbutton Debian packaging



More information about the Pkg-mozext-commits mailing list