Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/compat.js

Issue 29433625: Issue 5220 - Update the IO API (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Fixes to the promise flow and review comments. Created May 23, 2017, 12:31 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dependencies ('k') | lib/io.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compat.js
===================================================================
--- a/lib/compat.js
+++ b/lib/compat.js
@@ -80,49 +80,16 @@
Cu.import.resources = new Map();
Cu.import.resources.set("XPCOMUtils", {
generateQI() {}
});
//
-// Fake nsIFile implementation for our I/O
-//
-
-function FakeFile(path)
-{
- this.path = path;
-}
-FakeFile.prototype =
-{
- get leafName()
- {
- return this.path;
- },
- set leafName(value)
- {
- this.path = value;
- },
- append(path)
- {
- this.path += path;
- },
- clone()
- {
- return new FakeFile(this.path);
- },
- get parent()
- {
- return {create() {}};
- },
- normalize() {}
-};
-
-//
// Services.jsm module emulation
//
Cu.import.resources.set("Services", {
obs: {
addObserver() {},
removeObserver() {}
},
« no previous file with comments | « dependencies ('k') | lib/io.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld