| Index: mojo/public/js/bindings/codec.js
|
| diff --git a/mojo/public/js/bindings/codec.js b/mojo/public/js/bindings/codec.js
|
| index 88433e2fc4bc40f6646e373ad0a0fb4dccf379f7..623cca71b66ff334e41f72173997199cbd410e52 100644
|
| --- a/mojo/public/js/bindings/codec.js
|
| +++ b/mojo/public/js/bindings/codec.js
|
| @@ -316,7 +316,8 @@ define("mojo/public/js/bindings/codec", [
|
| };
|
|
|
| Encoder.prototype.encodeStructPointer = function(cls, val) {
|
| - if (!val) {
|
| + if (val == null) {
|
| + // Also handles undefined, since undefined == null.
|
| this.encodePointer(val);
|
| return;
|
| }
|
| @@ -325,7 +326,8 @@ define("mojo/public/js/bindings/codec", [
|
| };
|
|
|
| Encoder.prototype.encodeArrayPointer = function(cls, val) {
|
| - if (!val) {
|
| + if (val == null) {
|
| + // Also handles undefined, since undefined == null.
|
| this.encodePointer(val);
|
| return;
|
| }
|
| @@ -337,7 +339,8 @@ define("mojo/public/js/bindings/codec", [
|
| };
|
|
|
| Encoder.prototype.encodeStringPointer = function(val) {
|
| - if (!val) {
|
| + if (val == null) {
|
| + // Also handles undefined, since undefined == null.
|
| this.encodePointer(val);
|
| return;
|
| }
|
|
|