This file is indexed.

/usr/share/xul-ext/greasemonkey/modules/ipcscript.js is in xul-ext-greasemonkey 3.8-1~deb8u1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
var EXPORTED_SYMBOLS = ['IPCScript'];

Components.utils.import("chrome://greasemonkey-modules/content/util.js");
Components.utils.import('chrome://greasemonkey-modules/content/abstractScript.js');


function IPCScript(aScript, addonVersion) {
  this.addonVersion = addonVersion;
  this.description = aScript.description;
  this.enabled = aScript.enabled;
  this.excludes = aScript.excludes;
  this.fileURL = aScript.fileURL;
  this.grants = aScript.grants;
  this.id = aScript.id;
  this.includes = aScript.includes;
  this.localized = aScript.localized;
  this.name = aScript.name;
  this.namespace = aScript.namespace;
  this.needsUninstall = aScript.needsUninstall;
  this.noframes = aScript.noframes;
  this.pendingExec = {};
  this.pendingExec.length = aScript.pendingExec.length || 0;
  this.runAt = aScript.runAt;
  this.userExcludes = aScript.userExcludes;
  this.userIncludes = aScript.userIncludes;
  this.uuid = aScript.uuid;
  this.version = aScript.version;
  this.willUpdate = aScript.isRemoteUpdateAllowed();

  this.matches = aScript.matches.map(function(m) {
    return m.pattern;
  });
  this.userMatches = aScript.userMatches.map(function(m) {
    return m.pattern;
  });

  this.requires = aScript.requires.map(function(req) {
    return {
      'fileURL': req.fileURL
    };
  });

  this.resources = aScript.resources.map(function(res) {
    return {
      'name': res.name,
      'mimetype': res.mimetype,
      'file_url': GM_util.getUriFromFile(res.file).spec,
      'gm_url': ['greasemonkey-script:', aScript.uuid, '/', res.name].join(''),
    };
  });
};


IPCScript.prototype = Object.create(AbstractScript.prototype, {
  constructor: {
    value: IPCScript
  }
});


IPCScript.scriptsForUrl = function(url, when, windowId) {
  var result = scripts.filter(function(script) {
    try {
      return GM_util.scriptMatchesUrlAndRuns(script, url, when);
    } catch (e) {
      // See #1692; Prevent failures like that from being so severe.
      GM_util.logError(e, false, e.fileName, e.lineNumber);
      return false;
    }
  });
  return result;
};


IPCScript.prototype.info = function() {
  var resources = {};
  for (var i = 0, r = null; r = this.resources[i]; i++) {
    resources[r.name] = {
      'name': r.name,
      'mimetype': r.mimetype,
      'url': r.gm_url,
    };
  }

  return {
    'uuid': this.uuid,
    'version': this.addonVersion,
    'scriptWillUpdate': this.willUpdate,
    'script': {
      'description': this.description,
      'excludes': this.excludes,
      // 'icon': ??? source URL?
      'includes': this.includes,
      'localizedDescription': this.localized.description,
      'localizedName': this.localized.name,
      'matches': this.matches,
      'name': this.name,
      'namespace': this.namespace,
      'noframes': this.noframes,
      // 'requires': ??? source URL?
      'resources': resources,
      'run-at': this.runAt,
      'version': this.version
    }
  };
};


var scripts = [];

var cpmm = Components.classes["@mozilla.org/childprocessmessagemanager;1"]
    .getService(Components.interfaces.nsISyncMessageSender);


function objectToScript(obj) {
  var script = Object.create(IPCScript.prototype);
  Object.keys(obj).forEach(function(k) {
    script[k] = obj[k];
  });
  Object.freeze(script);
  return script;
}


function updateData(data) {
  if (!data) return;
  var newScripts = data.scripts.map(objectToScript);
  Object.freeze(newScripts);
  scripts = newScripts;
  Object.defineProperty(IPCScript.prototype, "globalExcludes", {
    get: function () { return data.globalExcludes; },
    configurable: true,
    enumerable: true
  });
}


if (cpmm.initialProcessData) {
  updateData(cpmm.initialProcessData["greasemonkey:scripts-update"]);
} else {
  // Support FF < 41.
  var results = cpmm.sendSyncMessage("greasemonkey:scripts-update");
  updateData(results[0]);
}

cpmm.addMessageListener("greasemonkey:scripts-update", function(aMessage) {
  updateData(aMessage.data);
});