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

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

Issue 1938123002: Ensure that privates are private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: 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
« no previous file with comments | « extensions/renderer/module_system_unittest.cc ('k') | extensions/renderer/resources/messaging.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/resources/event.js
diff --git a/extensions/renderer/resources/event.js b/extensions/renderer/resources/event.js
index a6d64cf6fd98ec7eea428be9aaa66c63c390f9cc..105f7114da0bfdea38c7c32b75924a7f0e0a0064 100644
--- a/extensions/renderer/resources/event.js
+++ b/extensions/renderer/resources/event.js
@@ -490,17 +490,22 @@
ruleFunctionSchemas.getRules.parameters);
}
- var Event = utils.expose('Event', EventImpl, { functions: [
- 'addListener',
- 'removeListener',
- 'hasListener',
- 'hasListeners',
- 'dispatchToListener',
- 'dispatch',
- 'addRules',
- 'removeRules',
- 'getRules'
- ] });
+ function Event() {
+ privates(Event).constructPrivate(this, arguments);
+ }
+ utils.expose(Event, EventImpl, {
+ functions: [
+ 'addListener',
+ 'removeListener',
+ 'hasListener',
+ 'hasListeners',
+ 'dispatchToListener',
+ 'dispatch',
+ 'addRules',
+ 'removeRules',
+ 'getRules',
+ ],
+ });
// NOTE: Event is (lazily) exposed as chrome.Event from dispatcher.cc.
exports.$set('Event', Event);
« no previous file with comments | « extensions/renderer/module_system_unittest.cc ('k') | extensions/renderer/resources/messaging.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698