summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rw-r--r--extensions/auth/nsAuthSambaNTLM.cpp7
-rw-r--r--extensions/cookie/nsPermissionManager.cpp12
-rw-r--r--extensions/cookie/test/unit/test_bug526789.js12
-rw-r--r--extensions/permissions/nsContentBlocker.cpp8
4 files changed, 12 insertions, 27 deletions
diff --git a/extensions/auth/nsAuthSambaNTLM.cpp b/extensions/auth/nsAuthSambaNTLM.cpp
index 1406c15e0..69777dcca 100644
--- a/extensions/auth/nsAuthSambaNTLM.cpp
+++ b/extensions/auth/nsAuthSambaNTLM.cpp
@@ -5,6 +5,7 @@
#include "nsAuth.h"
#include "nsAuthSambaNTLM.h"
+#include "nspr.h"
#include "prenv.h"
#include "plbase64.h"
#include "prerror.h"
@@ -23,7 +24,7 @@ nsAuthSambaNTLM::~nsAuthSambaNTLM()
// ntlm_auth reads from stdin regularly so closing our file handles
// should cause it to exit.
Shutdown();
- free(mInitialMessage);
+ PR_Free(mInitialMessage);
}
void
@@ -248,7 +249,7 @@ nsAuthSambaNTLM::GetNextToken(const void *inToken,
nsCString request;
request.AssignLiteral("TT ");
request.Append(encoded);
- free(encoded);
+ PR_Free(encoded);
request.Append('\n');
if (!WriteString(mToChildFD, request))
@@ -265,7 +266,7 @@ nsAuthSambaNTLM::GetNextToken(const void *inToken,
if (!buf)
return NS_ERROR_FAILURE;
*outToken = nsMemory::Clone(buf, *outTokenLen);
- free(buf);
+ PR_Free(buf);
if (!*outToken) {
return NS_ERROR_OUT_OF_MEMORY;
}
diff --git a/extensions/cookie/nsPermissionManager.cpp b/extensions/cookie/nsPermissionManager.cpp
index d3696dd94..c44830812 100644
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -1666,18 +1666,6 @@ nsPermissionManager::AddInternal(nsIPrincipal* aPrincipal,
id = aID;
}
-#ifdef MOZ_B2G
- // When we do the initial addition of the permissions we don't want to
- // inherit session specific permissions from other tabs or apps
- // so we ignore them and set the permission to PROMPT_ACTION if it was
- // previously allowed or denied by the user.
- if (aIgnoreSessionPermissions &&
- aExpireType == nsIPermissionManager::EXPIRE_SESSION) {
- aPermission = nsIPermissionManager::PROMPT_ACTION;
- aExpireType = nsIPermissionManager::EXPIRE_NEVER;
- }
-#endif // MOZ_B2G
-
entry->GetPermissions().AppendElement(PermissionEntry(id, typeIndex, aPermission,
aExpireType, aExpireTime,
aModificationTime));
diff --git a/extensions/cookie/test/unit/test_bug526789.js b/extensions/cookie/test/unit/test_bug526789.js
index 0eac1d492..624044577 100644
--- a/extensions/cookie/test/unit/test_bug526789.js
+++ b/extensions/cookie/test/unit/test_bug526789.js
@@ -79,23 +79,11 @@ function run_test() {
cm.removeAll();
- // test that setting an empty or '.' http:// host results in a no-op
var uri = NetUtil.newURI("http://baz.com/");
- var emptyuri = NetUtil.newURI("http:///");
- var doturi = NetUtil.newURI("http://./");
do_check_eq(uri.asciiHost, "baz.com");
- do_check_eq(emptyuri.asciiHost, "");
- do_check_eq(doturi.asciiHost, ".");
- cs.setCookieString(emptyuri, null, "foo2=bar", null);
- do_check_eq(getCookieCount(), 0);
- cs.setCookieString(doturi, null, "foo3=bar", null);
- do_check_eq(getCookieCount(), 0);
cs.setCookieString(uri, null, "foo=bar", null);
- do_check_eq(getCookieCount(), 1);
do_check_eq(cs.getCookieString(uri, null), "foo=bar");
- do_check_eq(cs.getCookieString(emptyuri, null), null);
- do_check_eq(cs.getCookieString(doturi, null), null);
do_check_eq(cm.countCookiesFromHost(""), 0);
do_check_throws(function() {
diff --git a/extensions/permissions/nsContentBlocker.cpp b/extensions/permissions/nsContentBlocker.cpp
index cc2162b70..391785dc3 100644
--- a/extensions/permissions/nsContentBlocker.cpp
+++ b/extensions/permissions/nsContentBlocker.cpp
@@ -23,6 +23,7 @@
#define BEHAVIOR_NOFOREIGN 3
// From nsIContentPolicy
+// and nsIContentPolicyBase.idl: Their order must be retained!
static const char *kTypeString[] = {
"other",
"script",
@@ -59,6 +60,13 @@ static const char *kTypeString[] = {
"", // TYPE_INTERNAL_XMLHTTPREQUEST
"", // TYPE_INTERNAL_EVENTSOURCE
"", // TYPE_INTERNAL_SERVICE_WORKER
+ "", // TYPE_INTERNAL_SCRIPT_PRELOAD
+ "", // TYPE_INTERNAL_IMAGE
+ "", // TYPE_INTERNAL_IMAGE_PRELOAD
+ "", // TYPE_INTERNAL_STYLESHEET
+ "", // TYPE_INTERNAL_STYLESHEET_PRELOAD
+ "", // TYPE_INTERNAL_IMAGE_FAVICON
+ "saveas_download",
};
#define NUMBER_OF_TYPES MOZ_ARRAY_LENGTH(kTypeString)