OSDN Git Service

resolved conflicts for merge of acf4a21d to master
authorSteve Block <steveblock@google.com>
Tue, 19 Jan 2010 15:43:31 +0000 (15:43 +0000)
committerSteve Block <steveblock@google.com>
Tue, 19 Jan 2010 15:45:30 +0000 (15:45 +0000)
Change-Id: If8bb4335848f51919608d28a30ee610acb120ae7

1  2 
WebCore/ChangeLog
WebKit/android/jni/WebCoreFrameBridge.cpp

Simple merge
@@@ -1174,22 -1222,9 +1174,22 @@@ private
      {
          JNIEnv* env = getJNIEnv();
          // JavaInstance creates a global ref to instance in its constructor.
-         env->DeleteGlobalRef(_instance->instance());
+         env->DeleteGlobalRef(m_instance->instance());
 -        // Set the object to our WeakReference wrapper.
 -        m_instance->setInstance(adoptGlobalRef(env, instance));
 +        // Set the object to a weak reference.
-         _instance->setInstance(env->NewWeakGlobalRef(instance));
++        m_instance->setInstance(env->NewWeakGlobalRef(instance));
 +    }
 +    ~WeakJavaInstance()
 +    {
 +        JNIEnv* env = getJNIEnv();
 +        // Store the weak reference so we can delete it later.
-         jweak weak = _instance->instance();
++        jweak weak = m_instance->instance();
 +        // The JavaInstance destructor attempts to delete the global ref stored
-         // in _instance. Since we replaced it in our constructor with a weak
++        // in m_instance. Since we replaced it in our constructor with a weak
 +        // reference, restore the global ref here so the vm will not complain.
-         _instance->setInstance(env->NewGlobalRef(
-                 getRealObject(env, _instance->instance()).get()));
++        m_instance->setInstance(env->NewGlobalRef(
++                getRealObject(env, m_instance->instance()).get()));
 +        // Delete the weak reference.
 +        env->DeleteWeakGlobalRef(weak);
      }
  
      virtual void virtualBegin()