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

Unified Diff: Source/core/platform/chromium/support/WebCrypto.cpp

Issue 23003021: WebCrypto: assert that WebArrayBuffers are not null. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/chromium/support/WebCrypto.cpp
diff --git a/Source/core/platform/chromium/support/WebCrypto.cpp b/Source/core/platform/chromium/support/WebCrypto.cpp
index 0dd1796deb49bf75f4569cd7adaa97431409a5fe..cd4e17994c0a1e2ef82dac335249a385579ac96f 100644
--- a/Source/core/platform/chromium/support/WebCrypto.cpp
+++ b/Source/core/platform/chromium/support/WebCrypto.cpp
@@ -43,6 +43,7 @@ void WebCryptoResult::completeWithError()
void WebCryptoResult::completeWithBuffer(const WebArrayBuffer& buffer)
{
+ RELEASE_ASSERT(!buffer.isNull());
m_impl->completeWithBuffer(buffer);
reset();
}
@@ -50,6 +51,7 @@ void WebCryptoResult::completeWithBuffer(const WebArrayBuffer& buffer)
void WebCryptoResult::completeWithBuffer(const void* bytes, size_t bytesSize)
{
WebArrayBuffer buffer = WebKit::WebArrayBuffer::create(bytesSize, 1);
+ RELEASE_ASSERT(!buffer.isNull());
memcpy(buffer.data(), bytes, bytesSize);
completeWithBuffer(buffer);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698