Title: [151747] trunk/Source/WebCore
Revision
151747
Author
[email protected]
Date
2013-06-19 12:45:01 -0700 (Wed, 19 Jun 2013)

Log Message

Incorrect use of jsCast in a finalizer
https://bugs.webkit.org/show_bug.cgi?id=117807

Reviewed by Geoffrey Garen.

We can't use jsCast in a finalizer as it checks an object's structure,
and the structure may already have been swept by that point.  Use a
static_cast instead.

* bridge/runtime_array.cpp:
(JSC::RuntimeArray::destroy):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (151746 => 151747)


--- trunk/Source/WebCore/ChangeLog	2013-06-19 18:54:32 UTC (rev 151746)
+++ trunk/Source/WebCore/ChangeLog	2013-06-19 19:45:01 UTC (rev 151747)
@@ -1,3 +1,17 @@
+2013-06-19  Oliver Hunt  <[email protected]>
+
+        Incorrect use of jsCast in a finalizer
+        https://bugs.webkit.org/show_bug.cgi?id=117807
+
+        Reviewed by Geoffrey Garen.
+
+        We can't use jsCast in a finalizer as it checks an object's structure,
+        and the structure may already have been swept by that point.  Use a
+        static_cast instead.
+
+        * bridge/runtime_array.cpp:
+        (JSC::RuntimeArray::destroy):
+
 2013-06-19  Brent Fulgham  <[email protected]>
 
         [Windows] AX: Extend notification handling

Modified: trunk/Source/WebCore/bridge/runtime_array.cpp (151746 => 151747)


--- trunk/Source/WebCore/bridge/runtime_array.cpp	2013-06-19 18:54:32 UTC (rev 151746)
+++ trunk/Source/WebCore/bridge/runtime_array.cpp	2013-06-19 19:45:01 UTC (rev 151747)
@@ -57,7 +57,7 @@
 
 void RuntimeArray::destroy(JSCell* cell)
 {
-    jsCast<RuntimeArray*>(cell)->RuntimeArray::~RuntimeArray();
+    static_cast<RuntimeArray*>(cell)->RuntimeArray::~RuntimeArray();
 }
 
 JSValue RuntimeArray::lengthGetter(ExecState*, JSValue slotBase, PropertyName)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to