Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove disused GM_log tracing calls.
  • Loading branch information
arantius committed Apr 20, 2011
1 parent 2198702 commit d037c31
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
8 changes: 0 additions & 8 deletions content/config.js
Expand Up @@ -256,8 +256,6 @@ Config.prototype = {
},

install: function(script) {
GM_log("> Config.install");

var existingIndex = this._find(script);
if (existingIndex > -1) {
// save the old script's state
Expand Down Expand Up @@ -293,8 +291,6 @@ Config.prototype = {
}

this._changed(script, "install", existingIndex);

GM_log("< Config.install");
},

uninstall: function(script, forUpdate) {
Expand Down Expand Up @@ -382,8 +378,6 @@ Config.prototype = {
* any necessary upgrades.
*/
_updateVersion: function() {
GM_log("> GM_updateVersion");

// this is the last version which has been run at least once
var initialized = GM_prefRoot.getValue("version", "0.0");

Expand Down Expand Up @@ -418,8 +412,6 @@ Config.prototype = {
GM_prefRoot.setValue("version", addon.version);
});
}

GM_log("< GM_updateVersion");
},

/**
Expand Down
20 changes: 0 additions & 20 deletions content/xmlhttprequester.js
Expand Up @@ -17,8 +17,6 @@ GM_xmlhttpRequester.prototype.contentStartRequest = function(details) {
return;
}

GM_log("> GM_xmlhttpRequest.contentStartRequest");

try {
// Validate and parse the (possibly relative) given URL.
var uri = GM_uriFromUrl(details.url, this.originUrl);
Expand All @@ -41,8 +39,6 @@ GM_xmlhttpRequester.prototype.contentStartRequest = function(details) {
throw new Error("Disallowed scheme in URL: " + details.url);
}

GM_log("< GM_xmlhttpRequest.contentStartRequest");

return {
abort: function() {
req.abort();
Expand All @@ -54,8 +50,6 @@ GM_xmlhttpRequester.prototype.contentStartRequest = function(details) {
// that it can access other domains without security warning
GM_xmlhttpRequester.prototype.chromeStartRequest =
function(safeUrl, details, req) {
GM_log("> GM_xmlhttpRequest.chromeStartRequest");

this.setupReferer(details, req);

this.setupRequestEvent(this.unsafeContentWin, req, "onload", details);
Expand Down Expand Up @@ -87,8 +81,6 @@ function(safeUrl, details, req) {
} else {
req.send(body);
}

GM_log("< GM_xmlhttpRequest.chromeStartRequest");
};

// sets the "Referer" HTTP header for this GM_XHR request.
Expand All @@ -97,8 +89,6 @@ function(safeUrl, details, req) {
// http-on-modify-request observer.
GM_xmlhttpRequester.prototype.setupReferer =
function(details, req) {
GM_log("> GM_xmlhttpRequester.setupReferer");

if (!details.headers || !details.headers.Referer) return;

var observerService = Components.classes["@mozilla.org/observer-service;1"]
Expand All @@ -116,21 +106,15 @@ function(details, req) {
}
};
observerService.addObserver(requestObserver, "http-on-modify-request", false);

GM_log("< GM_xmlhttpRequester.setupReferer");
}

// arranges for the specified 'event' on xmlhttprequest 'req' to call the
// method by the same name which is a property of 'details' in the content
// window's security context.
GM_xmlhttpRequester.prototype.setupRequestEvent =
function(unsafeContentWin, req, event, details) {
GM_log("> GM_xmlhttpRequester.setupRequestEvent");

if (details[event]) {
req[event] = function() {
GM_log("> GM_xmlhttpRequester -- callback for " + event);

var responseState = {
// can't support responseXML because security won't
// let the browser call properties on it
Expand All @@ -154,10 +138,6 @@ function(unsafeContentWin, req, event, details) {
// can be abused to get increased priveledges.
new XPCNativeWrapper(unsafeContentWin, "setTimeout()")
.setTimeout(function(){details[event](responseState);}, 0);

GM_log("< GM_xmlhttpRequester -- callback for " + event);
};
}

GM_log("< GM_xmlhttpRequester.setupRequestEvent");
};

0 comments on commit d037c31

Please sign in to comment.