From 72cc555dc703aa3f6a7338b5c3ade9fee7e799e3 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Thu, 17 Oct 2013 10:32:46 -0400 Subject: Back out changeset 420d72e5cee7 Back out changeset 420d72e5cee7 due to breaking LiveConnect feature. http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2013-October/024919.html * plugin/icedteanp/IcedTeaNPPlugin.cc: undo 420d72e5cee7 * plugin/icedteanp/IcedTeaPluginUtils.cc: undo 420d72e5cee7 * plugin/icedteanp/IcedTeaPluginUtils.h: undo 420d72e5cee7 * plugin/icedteanp/IcedTeaScriptablePluginObject.cc: undo 420d72e5cee7 * plugin/icedteanp/IcedTeaScriptablePluginObject.h: undo 420d72e5cee7 * tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc: undo 420d72e5cee7 --- tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc') diff --git a/tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc b/tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc index b5c893c..bb2b376 100644 --- a/tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc +++ b/tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc @@ -66,15 +66,16 @@ SUITE(IcedTeaScriptableJavaObject) { TEST(get_scriptable_java_object) { MemoryLeakDetector leak_detector; - /* Ensure freeing*/ { - NPObjectRef first_obj = IcedTeaScriptableJavaObject::get_scriptable_java_object(&dummy_npp, "DummyClass", "DummyInstance", false); + NPObject* first_obj = IcedTeaScriptableJavaObject::get_scriptable_java_object(&dummy_npp, "DummyClass", "DummyInstance", false); + browser_functions.releaseobject(first_obj); - /* After the first call, the object should be cached in the object map */ - NPObjectRef second_obj = IcedTeaScriptableJavaObject::get_scriptable_java_object(&dummy_npp, "DummyClass", "DummyInstance", false); + /* After the first call, the object should be cached in the object map */ + NPObject* second_obj = IcedTeaScriptableJavaObject::get_scriptable_java_object(&dummy_npp, "DummyClass", "DummyInstance", false); - /* Objects should be the same, because of caching */ - CHECK(first_obj.get() == second_obj.get()); - } + /* Objects should be the same, because of caching */ + CHECK(first_obj == second_obj); + + browser_functions.releaseobject(second_obj); CHECK(leak_detector.memory_leaks() == 0); } -- cgit v1.2.3