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