1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-02 08:52:45 +01:00

move profiling code to platform-specific

This commit is contained in:
gorhill 2015-02-03 18:40:56 -05:00
parent 780f89d999
commit bbb2d8d1ff
2 changed files with 6 additions and 12 deletions

View File

@ -477,6 +477,12 @@ vAPI.net.registerListeners = function() {
}; };
chrome.webRequest.onBeforeRequest.addListener( chrome.webRequest.onBeforeRequest.addListener(
onBeforeRequest, onBeforeRequest,
//function(details) {
// quickProfiler.start('onBeforeRequest');
// var r = onBeforeRequest(details);
// quickProfiler.stop();
// return r;
//},
{ {
'urls': this.onBeforeRequest.urls || ['<all_urls>'], 'urls': this.onBeforeRequest.urls || ['<all_urls>'],
'types': this.onBeforeRequest.types || [] 'types': this.onBeforeRequest.types || []

View File

@ -366,12 +366,6 @@ vAPI.net.onBeforeRequest = {
], ],
extra: [ 'blocking' ], extra: [ 'blocking' ],
callback: onBeforeRequest callback: onBeforeRequest
//function(details) {
// quickProfiler.start('onBeforeRequest');
// var r = onBeforeRequest(details);
// quickProfiler.stop();
// return r;
//},
}; };
vAPI.net.onBeforeSendHeaders = { vAPI.net.onBeforeSendHeaders = {
@ -384,12 +378,6 @@ vAPI.net.onBeforeSendHeaders = {
], ],
extra: [ 'blocking', 'requestHeaders' ], extra: [ 'blocking', 'requestHeaders' ],
callback: onBeforeSendHeaders callback: onBeforeSendHeaders
//function(details) {
// quickProfiler.start('onBeforeSendHeaders');
// var r = onBeforeSendHeaders(details);
// quickProfiler.stop();
// return r;
//},
}; };
vAPI.net.onHeadersReceived = { vAPI.net.onHeadersReceived = {