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

Unified Diff: chrome/renderer/resources/extensions/platform_keys/key.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
Index: chrome/renderer/resources/extensions/platform_keys/key.js
diff --git a/chrome/renderer/resources/extensions/platform_keys/key.js b/chrome/renderer/resources/extensions/platform_keys/key.js
index ee29bf01691b443b4064db61746ae5655ac5b15f..bea1fc402a187f89a335f8d7575752fcca58b4b1 100644
--- a/chrome/renderer/resources/extensions/platform_keys/key.js
+++ b/chrome/renderer/resources/extensions/platform_keys/key.js
@@ -49,10 +49,17 @@ Object.defineProperty(KeyBase.prototype, 'algorithm', {
}
});
-var Key = utils.expose(
- 'Key',
- KeyImpl,
- {superclass: KeyBase, readonly: ['extractable', 'type', 'usages']});
+function Key() {
+ privates(Key).constructPrivate(this, arguments);
+}
+utils.expose(Key, KeyImpl, {
+ superclass: KeyBase,
+ readonly: [
+ 'extractable',
+ 'type',
+ 'usages',
+ ],
+});
/**
* Returns |key|'s Subject Public Key Info. Throws an exception if |key| is not

Powered by Google App Engine
This is Rietveld 408576698