diff options
author | Leon Clarke <leonclarke@google.com> | 2010-02-23 10:17:11 +0000 |
---|---|---|
committer | Leon Clarke <leonclarke@google.com> | 2010-03-04 11:35:51 +0000 |
commit | e58dffb37ac1ec127575ed17b47adf1ed731cf0a (patch) | |
tree | 5281aee3ba75c2e58479b542d2e1e0b7b12e2edd /WebCore | |
parent | 4c323f8a0dc77cccc10310a0509b52e8aba221ef (diff) | |
download | external_webkit-e58dffb37ac1ec127575ed17b47adf1ed731cf0a.zip external_webkit-e58dffb37ac1ec127575ed17b47adf1ed731cf0a.tar.gz external_webkit-e58dffb37ac1ec127575ed17b47adf1ed731cf0a.tar.bz2 |
Don't leak global weak references when running layout tests
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/bridge/jni/v8/JavaNPObjectV8.cpp | 4 | ||||
-rw-r--r-- | WebCore/bridge/jni/v8/JavaNPObjectV8.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp b/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp index 808de03..9c39c25 100644 --- a/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp +++ b/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp @@ -68,7 +68,9 @@ static NPClass JavaNPObjectClass = { 0 // construct }; -NPObject* JavaInstanceToNPObject(JavaInstance* instance) +// ANDROID-specific change. TODO: Upstream +NPObject* JavaInstanceToNPObject(PassRefPtr<JavaInstance> instance) +// END ANDROID-specific change { JavaNPObject* object = reinterpret_cast<JavaNPObject*>(_NPN_CreateObject(0, &JavaNPObjectClass)); object->m_instance = instance; diff --git a/WebCore/bridge/jni/v8/JavaNPObjectV8.h b/WebCore/bridge/jni/v8/JavaNPObjectV8.h index 31b0ac7..e68a5aa 100644 --- a/WebCore/bridge/jni/v8/JavaNPObjectV8.h +++ b/WebCore/bridge/jni/v8/JavaNPObjectV8.h @@ -41,7 +41,9 @@ struct JavaNPObject { RefPtr<JavaInstance> m_instance; }; -NPObject* JavaInstanceToNPObject(JavaInstance*); +// ANDROID-specific change. TODO: Upstream +NPObject* JavaInstanceToNPObject(PassRefPtr<JavaInstance>); +// END ANDROID-specific change JavaInstance* ExtractJavaInstance(NPObject*); bool JavaNPObjectHasMethod(NPObject*, NPIdentifier name); |