summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp')
-rw-r--r--Source/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp b/Source/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp
index b86a090..b22d57f 100644
--- a/Source/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp
+++ b/Source/WebCore/bridge/jni/v8/JavaNPObjectV8.cpp
@@ -137,8 +137,10 @@ bool JavaNPObjectInvoke(NPObject* obj, NPIdentifier identifier, const NPVariant*
break;
}
}
- if (!jMethod)
+ if (!jMethod) {
+ instance->end();
return false;
+ }
JavaValue* jArgs = new JavaValue[argCount];
for (unsigned int i = 0; i < argCount; i++)
@@ -181,8 +183,10 @@ bool JavaNPObjectGetProperty(NPObject* obj, NPIdentifier identifier, NPVariant*
instance->begin();
JavaField* field = instance->getClass()->fieldNamed(name);
free(name); // TODO: use NPN_MemFree
- if (!field)
+ if (!field) {
+ instance->end();
return false;
+ }
#if PLATFORM(ANDROID)
// JSC does not seem to support returning object properties so we emulate that