Created
August 26, 2013 15:56
-
-
Save isaacs/6343070 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/string_bytes.cc b/src/string_bytes.cc | |
index 99a6a9b..2e4db05 100644 | |
--- a/src/string_bytes.cc | |
+++ b/src/string_bytes.cc | |
@@ -360,6 +360,9 @@ size_t StringBytes::StorageSize(Handle<Value> val, enum encoding encoding) { | |
return Buffer::Length(val); | |
} | |
+ if (!is_buffer && !val->IsString()) | |
+ assert(0 && "non-string/buffer passed to StringBytes::StorageSize"); | |
+ | |
Local<String> str = val->ToString(); | |
switch (encoding) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment