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

Unified Diff: Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp

Issue 20421002: WebCrypto: Test error delivery during process(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | « LayoutTests/crypto/digest-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp
index b0500a094c1e51636d4c7b40ed290d0b23d661c5..a7d2aca22db2cddd45aef084a3da749742eadcd3 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp
+++ b/Tools/DumpRenderTree/chromium/TestRunner/src/MockWebCrypto.cpp
@@ -48,8 +48,11 @@ public:
virtual void process(const unsigned char* bytes, size_t size) OVERRIDE
{
// Don't buffer too much data.
- if (m_data.size() + size > 6)
+ if (m_data.size() + size > 6) {
m_result.completeWithError();
+ delete this;
+ return;
+ }
if (size)
m_data.append(reinterpret_cast<const char*>(bytes), size);
« no previous file with comments | « LayoutTests/crypto/digest-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698