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

Unified Diff: sdk/lib/web_gl/dart2js/web_gl_dart2js.dart

Issue 15138002: Added tests to previously broken functionality and added null checks. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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: sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
diff --git a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
index de46851ff2d9a7c072418b30fd28df2557defffb..6e5d2ea17dec3463f28ac883db02bb8a5e7b29fc 100644
--- a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
+++ b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
@@ -2406,7 +2406,7 @@ class RenderingContext extends CanvasRenderingContext native "WebGLRenderingCont
@DomName('WebGLRenderingContext.texImage2D')
@DocsEditable
void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, TypedData pixels]) {
- if ((border_OR_canvas_OR_image_OR_pixels_OR_video is int || border_OR_canvas_OR_image_OR_pixels_OR_video == null)) {
+ if (format_OR_width != null && height_OR_type != null && (border_OR_canvas_OR_image_OR_pixels_OR_video is int || border_OR_canvas_OR_image_OR_pixels_OR_video == null) && pixels != null) {
blois 2013/05/14 01:47:56 IDL has pixels as: ArrayBufferView? pixels Is it
Andrei Mouravski 2013/05/14 01:58:56 No idea, that was put in because pixels is optiona
sra1 2013/05/14 03:47:45 I have seen some Blink IDL that has nullable param
Anton Muhin 2013/05/14 06:17:34 ? means nullable that is null is acceptable value.
Andrei Mouravski 2013/05/21 09:38:49 Done.
_texImage2D_1(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels);
return;
}
@@ -2461,7 +2461,7 @@ class RenderingContext extends CanvasRenderingContext native "WebGLRenderingCont
@DomName('WebGLRenderingContext.texSubImage2D')
@DocsEditable
void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [int type, TypedData pixels]) {
- if ((canvas_OR_format_OR_image_OR_pixels_OR_video is int || canvas_OR_format_OR_image_OR_pixels_OR_video == null)) {
+ if (format_OR_width != null && height_OR_type != null && (canvas_OR_format_OR_image_OR_pixels_OR_video is int || canvas_OR_format_OR_image_OR_pixels_OR_video == null) && pixels != null) {
_texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels);
return;
}

Powered by Google App Engine
This is Rietveld 408576698