Permalink
Browse files

Add support for null for WebGL* opaque handles

Change-Id: I864a9875a919c7192ee403cc0eef43bf5f69a53e
  • Loading branch information...
1 parent bd80f2a commit 1c7f0a861c55698fc60e628f403b892559effb13 @creationix committed Sep 8, 2011
Showing with 114 additions and 114 deletions.
  1. +2 −2 api.js
  2. +112 −112 webgl.js
View
@@ -238,8 +238,8 @@ forEach({
sig.push(type.name);
fullArgs.push(type.name + " " + arg);
if (type.name.substr(0, 5) === "WebGL") {
- cargs.push(arg + "._");
- check.push(arg + " instanceof " + type.name);
+ cargs.push(arg + " ? " + arg + "._ : 0");
+ check.push("(" + arg + " === null || " + arg + " instanceof " + type.name + ")");
} else {
cargs.push(arg);
check.push("typeof " + arg + ' === "object"');
Oops, something went wrong.

0 comments on commit 1c7f0a8

Please sign in to comment.