Skip to content

Instantly share code, notes, and snippets.

@isaacs isaacs/gist:6343070
Created Aug 26, 2013

What would you like to do?
diff --git a/src/ b/src/
index 99a6a9b..2e4db05 100644
--- a/src/
+++ b/src/
@@ -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
You can’t perform that action at this time.