0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 09:06:21 +01:00

more asserts

This commit is contained in:
Eliot Horowitz 2009-01-09 15:54:50 -05:00
parent bdaae591ba
commit d5d18f9a94

View File

@ -578,6 +578,7 @@ JNIEXPORT void JNICALL java_native_say(JNIEnv * env , jclass, jobject outBuffer
Message in; Message in;
jniCallback( out , in ); jniCallback( out , in );
assert( ! out.freeIt );
} }
JNIEXPORT jint JNICALL java_native_call(JNIEnv * env , jclass, jobject outBuffer , jobject inBuffer ) { JNIEXPORT jint JNICALL java_native_call(JNIEnv * env , jclass, jobject outBuffer , jobject inBuffer ) {
@ -593,6 +594,9 @@ JNIEXPORT jint JNICALL java_native_call(JNIEnv * env , jclass, jobject outBuffer
JNI_DEBUG( "copying data of len :" << in.data->len ); JNI_DEBUG( "copying data of len :" << in.data->len );
assert( env->GetDirectBufferCapacity( inBuffer ) >= in.data->len ); assert( env->GetDirectBufferCapacity( inBuffer ) >= in.data->len );
memcpy( env->GetDirectBufferAddress( inBuffer ) , in.data , in.data->len ); memcpy( env->GetDirectBufferAddress( inBuffer ) , in.data , in.data->len );
assert( ! out.freeIt );
assert( in.freeIt );
return in.data->len; return in.data->len;
} }