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

Unified Diff: chrome/renderer/resources/extensions/enterprise_platform_keys/key_pair.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/enterprise_platform_keys/key_pair.js
diff --git a/chrome/renderer/resources/extensions/enterprise_platform_keys/key_pair.js b/chrome/renderer/resources/extensions/enterprise_platform_keys/key_pair.js
index dc06f16498ddb53cc8a090af60275f7a59758d72..1cab18f8487051fc6cbc8e4829029473b54581a7 100644
--- a/chrome/renderer/resources/extensions/enterprise_platform_keys/key_pair.js
+++ b/chrome/renderer/resources/extensions/enterprise_platform_keys/key_pair.js
@@ -30,6 +30,14 @@ var KeyPairImpl = function(publicKeySpki, algorithm, usages) {
false /* not extractable */);
};
-exports.KeyPair = utils.expose('KeyPair',
- KeyPairImpl,
- {readonly:['publicKey', 'privateKey']});
+function KeyPair() {
+ privates(KeyPair).constructPrivate(this, arguments);
+}
+utils.expose(KeyPair, KeyPairImpl, {
+ readonly: [
+ 'publicKey',
+ 'privateKey',
+ ],
+});
+
+exports.$set('KeyPair', KeyPair);

Powered by Google App Engine
This is Rietveld 408576698