Changeset 211063 in webkit


Ignore:
Timestamp:
Jan 23, 2017 2:49:26 PM (7 years ago)
Author:
mark.lam@apple.com
Message:

ObjCCallbackFunction::destroy() should not use jsCast().
https://bugs.webkit.org/show_bug.cgi?id=167322

Reviewed by Filip Pizlo.

Since r210829, it is no longer correct for object destructors to use jsCast().
Fixed ObjCCallbackFunction::destroy() to use a static_cast instead.

  • API/ObjCCallbackFunction.mm:

(JSC::ObjCCallbackFunction::destroy):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/ObjCCallbackFunction.mm

    r205462 r211063  
    524524void ObjCCallbackFunction::destroy(JSCell* cell)
    525525{
    526     ObjCCallbackFunction& function = *jsCast<ObjCCallbackFunction*>(cell);
     526    ObjCCallbackFunction& function = *static_cast<ObjCCallbackFunction*>(cell);
    527527    function.impl()->destroy(*Heap::heap(cell));
    528528    function.~ObjCCallbackFunction();
  • trunk/Source/JavaScriptCore/ChangeLog

    r211043 r211063  
     12017-01-23  Mark Lam  <mark.lam@apple.com>
     2
     3        ObjCCallbackFunction::destroy() should not use jsCast().
     4        https://bugs.webkit.org/show_bug.cgi?id=167322
     5
     6        Reviewed by Filip Pizlo.
     7
     8        Since r210829, it is no longer correct for object destructors to use jsCast().
     9        Fixed ObjCCallbackFunction::destroy() to use a static_cast instead.
     10
     11        * API/ObjCCallbackFunction.mm:
     12        (JSC::ObjCCallbackFunction::destroy):
     13
    1142017-01-23  Michael Saboff  <msaboff@apple.com>
    215
Note: See TracChangeset for help on using the changeset viewer.