summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/bridge
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-11-02 15:43:14 -0700
committerSteve Block <steveblock@google.com>2011-11-02 15:43:14 -0700
commit986ae4ce03ba1a2368cec3a832fa9d73857f1b2e (patch)
treedbab3242eaeecef8633527d1877c109c849466b5 /Source/WebCore/bridge
parent3450eb63fce89339f9625eb1b9ccf62b6b6bf29f (diff)
downloadexternal_webkit-986ae4ce03ba1a2368cec3a832fa9d73857f1b2e.zip
external_webkit-986ae4ce03ba1a2368cec3a832fa9d73857f1b2e.tar.gz
external_webkit-986ae4ce03ba1a2368cec3a832fa9d73857f1b2e.tar.bz2
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
Diffstat (limited to 'Source/WebCore/bridge')
-rw-r--r--Source/WebCore/bridge/jni/v8/JavaValueV8.h13
1 files changed, 12 insertions, 1 deletions
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