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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp

Issue 1414553002: Fix out-of-memory crashes related to ArrayBuffer allocation Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+more tweaks Created 5 years, 1 month 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: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
index a57a1983b8a24e661d9fba1547ec67e595782560..6d70694598a9152764560929e5323eb183199acf 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
@@ -141,10 +141,12 @@ void CanvasRenderingContext2DTest::SetUp()
m_document->view()->updateAllLifecyclePhases();
m_canvasElement = toHTMLCanvasElement(m_document->getElementById("c"));
- m_fullImageData = ImageData::create(IntSize(10, 10));
- m_partialImageData = ImageData::create(IntSize(2, 2));
-
NonThrowableExceptionState exceptionState;
+ m_fullImageData = ImageData::create(IntSize(10, 10), exceptionState);
+ EXPECT_FALSE(exceptionState.hadException());
+ m_partialImageData = ImageData::create(IntSize(2, 2), exceptionState);
+ EXPECT_FALSE(exceptionState.hadException());
+
CanvasGradient* opaqueGradient = CanvasGradient::create(FloatPoint(0, 0), FloatPoint(10, 0));
opaqueGradient->addColorStop(0, String("green"), exceptionState);
EXPECT_FALSE(exceptionState.hadException());

Powered by Google App Engine
This is Rietveld 408576698