Bug 794386 - do not store blob: URIs in global history, r=gavin.sharp
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 08 Oct 2012 12:59:22 -0700
changeset 109691 8db47189455919c3e0499dba4100f1a9369a4222
parent 109690 b815cdf08cadf5b94eb0fb35d9e797d4ecbc3c8d
child 109692 b177c32d57d653bae1764cfb508a4d1c9b3b936e
push id16136
push userdholbert@mozilla.com
push dateMon, 08 Oct 2012 20:00:38 +0000
treeherdermozilla-inbound@8db471894559 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin.sharp
bugs794386
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 794386 - do not store blob: URIs in global history, r=gavin.sharp
toolkit/components/places/nsNavHistory.cpp
toolkit/components/places/tests/unit/test_async_history_api.js
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -1252,17 +1252,18 @@ nsNavHistory::CanAddURI(nsIURI* aURI, bo
       scheme.EqualsLiteral("news") ||
       scheme.EqualsLiteral("mailbox") ||
       scheme.EqualsLiteral("moz-anno") ||
       scheme.EqualsLiteral("view-source") ||
       scheme.EqualsLiteral("chrome") ||
       scheme.EqualsLiteral("resource") ||
       scheme.EqualsLiteral("data") ||
       scheme.EqualsLiteral("wyciwyg") ||
-      scheme.EqualsLiteral("javascript")) {
+      scheme.EqualsLiteral("javascript") ||
+      scheme.EqualsLiteral("blob")) {
     *canAdd = false;
     return NS_OK;
   }
   *canAdd = true;
   return NS_OK;
 }
 
 // nsNavHistory::AddVisit
--- a/toolkit/components/places/tests/unit/test_async_history_api.js
+++ b/toolkit/components/places/tests/unit/test_async_history_api.js
@@ -403,16 +403,17 @@ function test_non_addable_uri_errors()
     "mailbox:Inbox",
     "moz-anno:favicon:http://mozilla.org/made-up-favicon",
     "view-source:http://mozilla.org",
     "chrome://browser/content/browser.xul",
     "resource://gre-resources/hiddenWindow.html",
     "data:,Hello%2C%20World!",
     "wyciwyg:/0/http://mozilla.org",
     "javascript:alert('hello wolrd!');",
+    "blob:foo",
   ];
   let places = [];
   URLS.forEach(function(url) {
     try {
       let place = {
         uri: NetUtil.newURI(url),
         title: "test for " + url,
         visits: [