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

Unified Diff: chrome/renderer/resources/extensions/automation/automation_event.js

Issue 1903303002: Ensure that privates are private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix utils.expose 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: chrome/renderer/resources/extensions/automation/automation_event.js
diff --git a/chrome/renderer/resources/extensions/automation/automation_event.js b/chrome/renderer/resources/extensions/automation/automation_event.js
index 7d04ecc438628d07da08dba54affb6cd43d0fb8d..206b0bfab90297a330deb703f31a4eafe5854d0a 100644
--- a/chrome/renderer/resources/extensions/automation/automation_event.js
+++ b/chrome/renderer/resources/extensions/automation/automation_event.js
@@ -19,8 +19,19 @@ AutomationEventImpl.prototype = {
}
};
-exports.AutomationEvent = utils.expose(
- 'AutomationEvent',
- AutomationEventImpl,
- { functions: ['stopPropagation'],
- readonly: ['type', 'target', 'eventPhase'] });
+function AutomationEvent() {
+ privates(AutomationEvent).constructPrivate(this, arguments);
+}
+utils.expose(AutomationEvent, AutomationEventImpl, {
+ __proto__: null,
Devlin 2016/04/22 17:08:21 We should always do this, right? Can we move it i
robwu 2016/04/22 17:37:40 Done. using $Object.setPrototypeOf, NOT by setting
Devlin 2016/04/22 18:52:46 FYI, I hear from V8 experts that Object.defineProp
+ functions: [
+ 'stopPropagation',
+ ],
+ readonly: [
+ 'type',
+ 'target',
+ 'eventPhase',
+ ],
+});
+
+exports.$set('AutomationEvent', AutomationEvent);

Powered by Google App Engine
This is Rietveld 408576698