Changeset 151747 in webkit


Ignore:
Timestamp:
Jun 19, 2013, 12:45:01 PM (12 years ago)
Author:
oliver@apple.com
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r151745 r151747  
     12013-06-19  Oliver Hunt  <oliver@apple.com>
     2
     3        Incorrect use of jsCast in a finalizer
     4        https://bugs.webkit.org/show_bug.cgi?id=117807
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        We can't use jsCast in a finalizer as it checks an object's structure,
     9        and the structure may already have been swept by that point.  Use a
     10        static_cast instead.
     11
     12        * bridge/runtime_array.cpp:
     13        (JSC::RuntimeArray::destroy):
     14
    1152013-06-19  Brent Fulgham  <bfulgham@apple.com>
    216
  • trunk/Source/WebCore/bridge/runtime_array.cpp

    r148696 r151747  
    5858void RuntimeArray::destroy(JSCell* cell)
    5959{
    60     jsCast<RuntimeArray*>(cell)->RuntimeArray::~RuntimeArray();
     60    static_cast<RuntimeArray*>(cell)->RuntimeArray::~RuntimeArray();
    6161}
    6262
Note: See TracChangeset for help on using the changeset viewer.