summaryrefslogtreecommitdiffstats
path: root/WebKit/android/jni/WebHistory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android/jni/WebHistory.cpp')
-rw-r--r--WebKit/android/jni/WebHistory.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/WebKit/android/jni/WebHistory.cpp b/WebKit/android/jni/WebHistory.cpp
index 3741e03..6d4db64 100644
--- a/WebKit/android/jni/WebHistory.cpp
+++ b/WebKit/android/jni/WebHistory.cpp
@@ -226,7 +226,7 @@ jbyteArray WebHistory::Flatten(JNIEnv* env, WTF::Vector<char>& v, WebCore::Histo
WebHistoryItem::WebHistoryItem(JNIEnv* env, jobject obj,
WebCore::HistoryItem* item) {
- m_object = adoptGlobalRef(env, obj);
+ m_object = env->NewWeakGlobalRef(obj);
m_parent = 0;
m_scale = 100;
m_active = false;
@@ -238,7 +238,7 @@ WebHistoryItem::~WebHistoryItem() {
JNIEnv* env = JSC::Bindings::getJNIEnv();
if (!env)
return;
- env->DeleteGlobalRef(m_object);
+ env->DeleteWeakGlobalRef(m_object);
}
}