From 986ae4ce03ba1a2368cec3a832fa9d73857f1b2e Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 2 Nov 2011 15:43:14 -0700 Subject: Initialize properties of JavaValue When converting from NPVariant to JavaValue, there are cases where we don't do an explicit conversion, but instead rely on the default value of the JavaValue for the corresponding type. We need to make sure that the default values are correctly set. This bug was introduced in http://trac.webkit.org/changeset/82194. Change-Id: I681a305e57a706d54e26c1e0d00ccc2d657bedd9 --- Source/WebCore/bridge/jni/v8/JavaValueV8.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Source') diff --git a/Source/WebCore/bridge/jni/v8/JavaValueV8.h b/Source/WebCore/bridge/jni/v8/JavaValueV8.h index 3e1c623..c6ff315 100644 --- a/Source/WebCore/bridge/jni/v8/JavaValueV8.h +++ b/Source/WebCore/bridge/jni/v8/JavaValueV8.h @@ -49,7 +49,18 @@ class JavaInstance; // currently used only with V8. // See https://bugs.webkit.org/show_bug.cgi?id=57023. struct JavaValue { - JavaValue() : m_type(JavaTypeInvalid) {} +// ANDROID + JavaValue() + : m_type(JavaTypeInvalid) + , m_booleanValue(false) + , m_byteValue(0) + , m_charValue(0) + , m_shortValue(0) + , m_intValue(0) + , m_longValue(0) + , m_floatValue(0.0) + , m_doubleValue(0.0) {} +// ANDROID JavaType m_type; // We don't use a union because we want to be able to ref-count some of the -- cgit v1.1