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

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

Issue 1903303002: Ensure that privates are private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase for safe_builtins conflict Created 4 years, 8 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: extensions/renderer/resources/web_request_internal_custom_bindings.js
diff --git a/extensions/renderer/resources/web_request_internal_custom_bindings.js b/extensions/renderer/resources/web_request_internal_custom_bindings.js
index 7c9e279a0464031deb9ff669d3a488aaf8a55f1d..df10729e6b3fb66ebe2df2912d7ca9c127e1ca02 100644
--- a/extensions/renderer/resources/web_request_internal_custom_bindings.js
+++ b/extensions/renderer/resources/web_request_internal_custom_bindings.js
@@ -175,17 +175,20 @@ binding.registerCustomHook(function(api) {
});
});
-var WebRequestEvent = utils.expose('WebRequestEvent',
- WebRequestEventImpl,
- { functions: [
- 'hasListener',
- 'hasListeners',
- 'addListener',
- 'removeListener',
- 'addRules',
- 'removeRules',
- 'getRules'
-] });
+function WebRequestEvent() {
+ privates(WebRequestEvent).constructPrivate(this, arguments);
+}
+utils.expose(WebRequestEvent, WebRequestEventImpl, {
+ functions: [
+ 'hasListener',
+ 'hasListeners',
+ 'addListener',
+ 'removeListener',
+ 'addRules',
+ 'removeRules',
+ 'getRules',
+ ],
+});
webRequestInternal = binding.generate();
exports.$set('binding', webRequestInternal);
Devlin 2016/04/22 18:52:46 nit: since you're here, may as well inline the bin
robwu 2016/04/22 20:33:43 webRequestInternal is also used internally within

Powered by Google App Engine
This is Rietveld 408576698