mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 00:56:44 +01:00
more asserts
This commit is contained in:
parent
bdaae591ba
commit
d5d18f9a94
@ -578,6 +578,7 @@ JNIEXPORT void JNICALL java_native_say(JNIEnv * env , jclass, jobject outBuffer
|
||||
Message in;
|
||||
|
||||
jniCallback( out , in );
|
||||
assert( ! out.freeIt );
|
||||
}
|
||||
|
||||
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 );
|
||||
assert( env->GetDirectBufferCapacity( inBuffer ) >= in.data->len );
|
||||
memcpy( env->GetDirectBufferAddress( inBuffer ) , in.data , in.data->len );
|
||||
|
||||
assert( ! out.freeIt );
|
||||
assert( in.freeIt );
|
||||
return in.data->len;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user