summaryrefslogtreecommitdiffstats
path: root/WebCore/bridge
diff options
context:
space:
mode:
authorEd Heyl <ed@google.com>2011-03-08 23:03:03 -0800
committerEd Heyl <ed@google.com>2011-03-08 23:03:03 -0800
commit12db9a6492824cedb54ec0cd640e686a7af09e91 (patch)
treedc7c4ba77ca2733dc0e5e7ec496a81cddf9e370f /WebCore/bridge
parent91672cbe203b55ec355d118636d333e9e7d7f3d7 (diff)
downloadexternal_webkit-12db9a6492824cedb54ec0cd640e686a7af09e91.zip
external_webkit-12db9a6492824cedb54ec0cd640e686a7af09e91.tar.gz
external_webkit-12db9a6492824cedb54ec0cd640e686a7af09e91.tar.bz2
cherry-pick this change from master (should be in honeycomb-mr1) (please don't merge)
Avoid Android modifications to JavaNPObjectV8.cpp/h https://android-git.corp.google.com/g/40387 fixed a long-standing bug to avoid leaking references to injected Java objects. However, it did so by making changes to JavaNPObjectV8.cpp/h which were never upstreamed. This change avoids the need for these changes. This change also avoids the use of a local PassRefPtr, which was incorrectly introduced in https://android-git.corp.google.com/g/36204. Change-Id: Ia1e3245a953826bbfd8e085f7ed1b1341228255d
Diffstat (limited to 'WebCore/bridge')
-rw-r--r--WebCore/bridge/jni/v8/JavaNPObjectV8.cpp4
-rw-r--r--WebCore/bridge/jni/v8/JavaNPObjectV8.h4
2 files changed, 2 insertions, 6 deletions
diff --git a/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp b/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp
index 7aa55b5..3bb8e27 100644
--- a/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp
+++ b/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp
@@ -68,9 +68,7 @@ static NPClass JavaNPObjectClass = {
0 // construct
};
-// ANDROID-specific change. TODO: Upstream
-NPObject* JavaInstanceToNPObject(PassRefPtr<JavaInstance> instance)
-// END ANDROID-specific change
+NPObject* JavaInstanceToNPObject(JavaInstance* instance)
{
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 e68a5aa..31b0ac7 100644
--- a/WebCore/bridge/jni/v8/JavaNPObjectV8.h
+++ b/WebCore/bridge/jni/v8/JavaNPObjectV8.h
@@ -41,9 +41,7 @@ struct JavaNPObject {
RefPtr<JavaInstance> m_instance;
};
-// ANDROID-specific change. TODO: Upstream
-NPObject* JavaInstanceToNPObject(PassRefPtr<JavaInstance>);
-// END ANDROID-specific change
+NPObject* JavaInstanceToNPObject(JavaInstance*);
JavaInstance* ExtractJavaInstance(NPObject*);
bool JavaNPObjectHasMethod(NPObject*, NPIdentifier name);