src/share/vm/prims/whitebox.cpp

changeset 4987
f258c5828eb8
parent 4954
2a9d97b57920
child 4989
f32b6c267d2e
equal deleted inserted replaced
4985:3c9b7ef92c61 4987:f258c5828eb8
1 /* 1 /*
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
308 WB_END 308 WB_END
309 309
310 WB_ENTRY(jboolean, WB_IsInStringTable(JNIEnv* env, jobject o, jstring javaString)) 310 WB_ENTRY(jboolean, WB_IsInStringTable(JNIEnv* env, jobject o, jstring javaString))
311 ResourceMark rm(THREAD); 311 ResourceMark rm(THREAD);
312 int len; 312 int len;
313 jchar* name = java_lang_String::as_unicode_string(JNIHandles::resolve(javaString), len); 313 jchar* name = java_lang_String::as_unicode_string(JNIHandles::resolve(javaString), len, CHECK_false);
314 oop found_string = StringTable::the_table()->lookup(name, len); 314 return (StringTable::lookup(name, len) != NULL);
315 if (found_string == NULL) {
316 return false;
317 }
318 return true;
319 WB_END 315 WB_END
320 316
321 317
322 WB_ENTRY(void, WB_FullGC(JNIEnv* env, jobject o)) 318 WB_ENTRY(void, WB_FullGC(JNIEnv* env, jobject o))
323 Universe::heap()->collector_policy()->set_should_clear_all_soft_refs(true); 319 Universe::heap()->collector_policy()->set_should_clear_all_soft_refs(true);

mercurial