mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 673288 - constant cleanup; r=philikon
This commit is contained in:
parent
2e4e829b57
commit
f7df511432
@ -42,7 +42,6 @@ let EXPORTED_SYMBOLS = [((this[key] = val), key) for ([key, val] in Iterator({
|
||||
|
||||
WEAVE_CHANNEL: "@weave_channel@",
|
||||
WEAVE_VERSION: "@weave_version@",
|
||||
WEAVE_ID: "@weave_id@",
|
||||
|
||||
// Sync Server API version that the client supports.
|
||||
SYNC_API_VERSION: "1.1",
|
||||
@ -124,18 +123,6 @@ SCORE_INCREMENT_XLARGE: 300 + 1, //MULTI_DEVICE_THRESHOLD + 1
|
||||
// Delay before incrementing global score
|
||||
SCORE_UPDATE_DELAY: 100,
|
||||
|
||||
// File IO Flags
|
||||
MODE_RDONLY: 0x01,
|
||||
MODE_WRONLY: 0x02,
|
||||
MODE_CREATE: 0x08,
|
||||
MODE_APPEND: 0x10,
|
||||
MODE_TRUNCATE: 0x20,
|
||||
|
||||
// File Permission flags
|
||||
PERMS_FILE: 0644,
|
||||
PERMS_PASSFILE: 0600,
|
||||
PERMS_DIRECTORY: 0755,
|
||||
|
||||
// Number of records to upload in a single POST (multiple POSTS if exceeded)
|
||||
// FIXME: Record size limit is 256k (new cluster), so this can be quite large!
|
||||
// (Bug 569295)
|
||||
|
@ -44,15 +44,6 @@ const Ci = Components.interfaces;
|
||||
const Cr = Components.results;
|
||||
const Cu = Components.utils;
|
||||
|
||||
const MODE_RDONLY = 0x01;
|
||||
const MODE_WRONLY = 0x02;
|
||||
const MODE_CREATE = 0x08;
|
||||
const MODE_APPEND = 0x10;
|
||||
const MODE_TRUNCATE = 0x20;
|
||||
|
||||
const PERMS_FILE = 0644;
|
||||
const PERMS_DIRECTORY = 0755;
|
||||
|
||||
const ONE_BYTE = 1;
|
||||
const ONE_KILOBYTE = 1024 * ONE_BYTE;
|
||||
const ONE_MEGABYTE = 1024 * ONE_KILOBYTE;
|
||||
|
@ -1,6 +1,7 @@
|
||||
_("Make sure json saves and loads from disk");
|
||||
Cu.import("resource://services-sync/util.js");
|
||||
Cu.import("resource://services-sync/constants.js");
|
||||
Cu.import("resource://gre/modules/FileUtils.jsm");
|
||||
|
||||
function run_test() {
|
||||
run_next_test();
|
||||
@ -71,8 +72,9 @@ add_test(function test_load_logging() {
|
||||
let file = Utils.getProfileFile("weave/log.json");
|
||||
let fos = Cc["@mozilla.org/network/file-output-stream;1"]
|
||||
.createInstance(Ci.nsIFileOutputStream);
|
||||
fos.init(file, MODE_WRONLY | MODE_CREATE | MODE_TRUNCATE, PERMS_FILE,
|
||||
fos.DEFER_OPEN);
|
||||
let flags = FileUtils.MODE_WRONLY | FileUtils.MODE_CREATE
|
||||
| FileUtils.MODE_TRUNCATE;
|
||||
fos.init(file, flags, FileUtils.PERMS_FILE, fos.DEFER_OPEN);
|
||||
let stream = Cc["@mozilla.org/intl/converter-output-stream;1"]
|
||||
.createInstance(Ci.nsIConverterOutputStream);
|
||||
stream.init(fos, "UTF-8", 4096, 0x0000);
|
||||
|
Loading…
Reference in New Issue
Block a user