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

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

Issue 1939833003: Sanitize inheritance in callers of utils.expose (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/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 390400394539e665ca5a4e7f5b526711f09d1f20..0fdfca6696e63d042b43338c2653f09c8b12b346 100644
--- a/chrome/renderer/resources/extensions/platform_keys/subtle_crypto.js
+++ b/chrome/renderer/resources/extensions/platform_keys/subtle_crypto.js
@@ -14,7 +14,7 @@ var normalizeAlgorithm =
// This error is thrown by the internal and public API's token functions and
// must be rethrown by this custom binding. Keep this in sync with the C++ part
// of this API.
-var errorInvalidToken = "The token is not valid.";
+var errorInvalidToken = 'The token is not valid.';
// The following errors are specified in WebCrypto.
// TODO(pneubeck): These should be DOMExceptions.
@@ -55,9 +55,10 @@ function catchInvalidTokenError(reject) {
* @param {string} tokenId The id of the backing Token.
* @constructor
*/
-var SubtleCryptoImpl = function(tokenId) {
+function SubtleCryptoImpl(tokenId) {
this.tokenId = tokenId;
-};
+}
+$Object.setPrototypeOf(SubtleCryptoImpl.prototype, null);
SubtleCryptoImpl.prototype.sign = function(algorithm, key, dataView) {
var subtleCrypto = this;

Powered by Google App Engine
This is Rietveld 408576698