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

Unified Diff: chrome/renderer/resources/extensions/platform_keys/subtle_crypto.js

Issue 1903303002: Ensure that privates are private. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for failing tests 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/subtle_crypto.js
diff --git a/chrome/renderer/resources/extensions/platform_keys/subtle_crypto.js b/chrome/renderer/resources/extensions/platform_keys/subtle_crypto.js
index 14a5388cef3ad8f189b8b05287e0b8da9c79f6c9..390400394539e665ca5a4e7f5b526711f09d1f20 100644
--- a/chrome/renderer/resources/extensions/platform_keys/subtle_crypto.js
+++ b/chrome/renderer/resources/extensions/platform_keys/subtle_crypto.js
@@ -110,10 +110,16 @@ SubtleCryptoImpl.prototype.exportKey = function(format, key) {
});
};
-// Required for subclassing.
-exports.SubtleCryptoImpl = SubtleCryptoImpl
+function SubtleCrypto() {
+ privates(SubtleCrypto).constructPrivate(this, arguments);
+}
+utils.expose(SubtleCrypto, SubtleCryptoImpl, {
+ functions: [
+ 'sign',
+ 'exportKey',
+ ],
+});
-exports.SubtleCrypto =
- utils.expose('SubtleCrypto',
- SubtleCryptoImpl,
- {functions:['sign', 'exportKey']});
+// Required for subclassing.
+exports.$set('SubtleCryptoImpl', SubtleCryptoImpl);
+exports.$set('SubtleCrypto', SubtleCrypto);

Powered by Google App Engine
This is Rietveld 408576698