Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(688)

Unified Diff: chrome/renderer/resources/extensions/web_request_internal_custom_bindings.js

Issue 17451011: Make the externally connectable browser test clobber all of the builtins, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/web_request_internal_custom_bindings.js
diff --git a/chrome/renderer/resources/extensions/web_request_internal_custom_bindings.js b/chrome/renderer/resources/extensions/web_request_internal_custom_bindings.js
index 45ebec2df98527a1fd6b8eb6a1b99a0cc3acf59e..7d168050da79485dd6797137b6d69b9d9210cd2e 100644
--- a/chrome/renderer/resources/extensions/web_request_internal_custom_bindings.js
+++ b/chrome/renderer/resources/extensions/web_request_internal_custom_bindings.js
@@ -67,7 +67,7 @@ WebRequestEvent.prototype.addListener =
var subEventName = webRequestNatives.GetUniqueSubEventName(this.eventName_);
// Note: this could fail to validate, in which case we would not add the
// subEvent listener.
- validate(Array.prototype.slice.call(arguments, 1), this.extraArgSchemas_);
+ validate($Array.slice(arguments, 1), this.extraArgSchemas_);
webRequestInternal.addEventListener(
cb, opt_filter, opt_extraInfo, this.eventName_, subEventName,
this.webViewInstanceId_);
@@ -79,7 +79,7 @@ WebRequestEvent.prototype.addListener =
subEventCallback = function() {
var requestId = arguments[0].requestId;
try {
- var result = cb.apply(null, arguments);
+ var result = $Function.apply(cb, null, arguments);
webRequestInternal.eventHandled(
eventName, subEventName, requestId, result);
} catch (e) {
@@ -97,10 +97,10 @@ WebRequestEvent.prototype.addListener =
webRequestInternal.eventHandled(
eventName, subEventName, requestId, response);
};
- cb.apply(null, [details, handledCallback]);
+ $Function.apply(cb, null, [details, handledCallback]);
};
}
- this.subEvents_.push(
+ $Array.push(this.subEvents_,
{subEvent: subEvent, callback: cb, subEventCallback: subEventCallback});
subEvent.addListener(subEventCallback);
};
@@ -117,7 +117,7 @@ WebRequestEvent.prototype.removeListener = function(cb) {
console.error(
'Internal error: webRequest subEvent has orphaned listeners.');
}
- this.subEvents_.splice(idx, 1);
+ $Array.splice(this.subEvents_, idx, 1);
}
};
@@ -156,13 +156,13 @@ binding.registerCustomHook(function(api) {
var apiFunctions = api.apiFunctions;
apiFunctions.setHandleRequest('addEventListener', function() {
- var args = Array.prototype.slice.call(arguments);
+ var args = $Array.slice(arguments);
sendRequest(this.name, args, this.definition.parameters,
{forIOThread: true});
});
apiFunctions.setHandleRequest('eventHandled', function() {
- var args = Array.prototype.slice.call(arguments);
+ var args = $Array.slice(arguments);
sendRequest(this.name, args, this.definition.parameters,
{forIOThread: true});
});
« no previous file with comments | « chrome/renderer/resources/extensions/web_request_custom_bindings.js ('k') | chrome/renderer/resources/extensions/web_view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698