Commit 3047f3fc authored by Igor Oliveira's avatar Igor Oliveira Committed by Arthur Edelstein
Browse files

Bug 26100: Update deprecated JS and CSS code

- catch statement can not have if statements.
  https://bugzilla.mozilla.org/show_bug.cgi?id=1228841
- Use 0o to represent octal numbers.
  https://bugzilla.mozilla.org/show_bug.cgi?id=1263074
- remove -moz- prefix in css
  https://bugzilla.mozilla.org/show_bug.cgi?id=1270406
parent 399d2ba8
......@@ -1140,9 +1140,12 @@ function torbutton_do_new_identity() {
// #5715 also makes this synchronous. So we pass a null callback.
try {
appCacheStorage.asyncEvictStorage(null);
} catch (err if err.name == 'NS_ERROR_NOT_AVAILABLE') {
// We ignore "not available" errors because they occur if a cache
// has not been used, e.g., if no browsing has been done.
} catch (err) {
// We ignore "not available" errors because they occur if a cache
// has not been used, e.g., if no browsing has been done.
if (err.name !== 'NS_ERROR_NOT_AVAILABLE') {
throw err;
}
}
}
} catch(e) {
......
......@@ -25,11 +25,11 @@ body {
}
body {
background-image: -moz-linear-gradient(top, #ffffff, #ffffff 10%, #dddddd 50%, #dddddd);
background-image: linear-gradient(to bottom, #ffffff, #ffffff 10%, #dddddd 50%, #dddddd);
}
body[toron] {
background-image: -moz-linear-gradient(top, #ffffff, #ffffff 10%, #d5ffd5 50%, #d5ffd5);
background-image: linear-gradient(to bottom, #ffffff, #ffffff 10%, #d5ffd5 50%, #d5ffd5);
}
/* Hide the entire document by default to avoid showing the incorrect
......@@ -221,7 +221,7 @@ body .top div.hideIfTorIsUpToDate h1 {
padding: 5px 0 0 22px;
}
#middle ul:-moz-dir(rtl) {
#middle ul:dir(rtl) {
padding: 5px 22px 0 0;
}
......
......@@ -21,7 +21,7 @@ and lines drawn between them to represent Tor network inter-relay connections.
width: 100%;
}
#circuit-display-content:-moz-locale-dir(rtl) {
#circuit-display-content:dir(rtl) {
background-position: calc(100% - 1em) 1em;
}
......@@ -65,7 +65,7 @@ ul#circuit-display-nodes li {
white-space: nowrap;
}
ul#circuit-display-nodes li:-moz-locale-dir(rtl) {
ul#circuit-display-nodes li:dir(rtl) {
background-position: right center;
}
......
......@@ -143,7 +143,7 @@ function CookieJarSelector() {
var file = getProfileFile("cookies-" + name + ".json");
var foStream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
foStream.init(file, 0x02 | 0x08 | 0x20, 0666, 0);
foStream.init(file, 0x02 | 0x08 | 0x20, 0o666, 0);
var data = JSON.stringify(this["cookiesobj-" + name]);
foStream.write(data, data.length);
foStream.close();
......@@ -154,7 +154,7 @@ function CookieJarSelector() {
var file = getProfileFile("protected-" + name + ".json");
var foStream = Cc["@mozilla.org/network/file-output-stream;1"]
.createInstance(Ci.nsIFileOutputStream);
foStream.init(file, 0x02 | 0x08 | 0x20, 0666, 0);
foStream.init(file, 0x02 | 0x08 | 0x20, 0o666, 0);
var data = JSON.stringify(this["protected-" + name]);
foStream.write(data, data.length);
foStream.close();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment