OSDN Git Service

Fix crash in JavaClassV8
authorBen Murdoch <benm@google.com>
Wed, 24 Nov 2010 12:16:03 +0000 (12:16 +0000)
committerBen Murdoch <benm@google.com>
Wed, 24 Nov 2010 18:16:08 +0000 (18:16 +0000)
commit0f5d01ff84a9ac1fdde0788971482fffa00e90f3
treeee0a500330421692e139e4dc78aea740d7ed3f61
parent191252e3c6fe40d347e09de00cb7103b847e931b
Fix crash in JavaClassV8

It is possible that the m_name member of JavaClass is uninitialized as
we possibly early out from the constructor if we could not load the Java
class from the JVM. In this case when we call the dtor we try to free
uninitialized memory and crash. m_name is not actually used anywhere
so we just remove it.

Will upstream to webkit.

Bug: 3222518
Change-Id: I9354e9914157d2c4afd72dcce9122329c2486c89
WebCore/bridge/jni/v8/JavaClassV8.cpp
WebCore/bridge/jni/v8/JavaClassV8.h