[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torbrowser/maint-2.4] Damn, that nifty helper function wanted me to check its input for it.
commit 53b280467f4a6681974447ba1d3e58f8b799df80
Author: Mike Perry <mikeperry-git@xxxxxxxxxx>
Date: Tue Feb 19 19:43:21 2013 -0800
Damn, that nifty helper function wanted me to check its input for it.
Oh well, my fault for not reading the comment.
---
...d-mozIThirdPartyUtil.getFirstPartyURI-API.patch | 23 +++++++++++++-------
1 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/src/current-patches/firefox/0019-Add-mozIThirdPartyUtil.getFirstPartyURI-API.patch b/src/current-patches/firefox/0019-Add-mozIThirdPartyUtil.getFirstPartyURI-API.patch
index 80144f3..f23117e 100644
--- a/src/current-patches/firefox/0019-Add-mozIThirdPartyUtil.getFirstPartyURI-API.patch
+++ b/src/current-patches/firefox/0019-Add-mozIThirdPartyUtil.getFirstPartyURI-API.patch
@@ -1,17 +1,17 @@
-From eb5083671adc896d465caa40e188c3e16ddfeb6b Mon Sep 17 00:00:00 2001
+From 81c1a8a664d433686367e44ebd49320be337a2f3 Mon Sep 17 00:00:00 2001
From: Mike Perry <mikeperry-git@xxxxxxxxxxxxxx>
Date: Wed, 28 Nov 2012 17:08:29 -0500
Subject: [PATCH 19/26] Add mozIThirdPartyUtil.getFirstPartyURI API
API allows you to get the url bar URI for a channel or nsIDocument.
---
- content/base/src/ThirdPartyUtil.cpp | 61 ++++++++++++++++++++++++++++
+ content/base/src/ThirdPartyUtil.cpp | 68 ++++++++++++++++++++++++++++
content/base/src/ThirdPartyUtil.h | 2 +
- netwerk/base/public/mozIThirdPartyUtil.idl | 21 ++++++++++
- 3 files changed, 84 insertions(+), 0 deletions(-)
+ netwerk/base/public/mozIThirdPartyUtil.idl | 21 +++++++++
+ 3 files changed, 91 insertions(+), 0 deletions(-)
diff --git a/content/base/src/ThirdPartyUtil.cpp b/content/base/src/ThirdPartyUtil.cpp
-index 97a000e..61e9eae 100644
+index 97a000e..ad1b0fa 100644
--- a/content/base/src/ThirdPartyUtil.cpp
+++ b/content/base/src/ThirdPartyUtil.cpp
@@ -7,6 +7,9 @@
@@ -32,7 +32,7 @@ index 97a000e..61e9eae 100644
return rv;
}
-@@ -282,3 +286,60 @@ ThirdPartyUtil::GetBaseDomain(nsIURI* aHostURI,
+@@ -282,3 +286,67 @@ ThirdPartyUtil::GetBaseDomain(nsIURI* aHostURI,
return NS_OK;
}
@@ -44,6 +44,11 @@ index 97a000e..61e9eae 100644
+{
+ nsresult rv = NS_ERROR_NULL_POINTER;
+
++ if (!aOutput)
++ return rv;
++
++ *aOutput = nullptr;
++
+ if (!aChannel && aDoc) {
+ aChannel = aDoc->GetChannel();
+ }
@@ -70,8 +75,10 @@ index 97a000e..61e9eae 100644
+
+ nsCOMPtr<nsIDocument> topDoc(do_QueryInterface(topDDoc));
+ docURI = topDoc->GetOriginalURI();
-+ // Give us a mutable URI and also addref
-+ rv = NS_EnsureSafeToReturn(docURI, aOutput);
++ if (docURI) {
++ // Give us a mutable URI and also addref
++ rv = NS_EnsureSafeToReturn(docURI, aOutput);
++ }
+ } else {
+ // XXX: Chrome callers (such as NoScript) can end up here
+ // through getImageData/canvas usage with no document state
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits