Changeset 38265 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Nov 10, 2008, 10:17:15 AM (17 years ago)
Author:
[email protected]
Message:

2008-11-10 Cameron Zwarich <[email protected]>

Reviewed by Darin Adler.

Bug 22152: Remove asObject() call from JSCallbackObject::getOwnPropertySlot()
<https://bugs.webkit.org/show_bug.cgi?id=22152>

With the recent change to adopt asType() style cast functions with
assertions instead of static_casts in many places, the assertion for
the asObject() call in JSCallbackObject::getOwnPropertySlot() has been
failing when using any nontrivial client of the JavaScriptCore API.
The cast isn't even necessary to call slot.setCustom(), so it should
be removed.

  • API/JSCallbackObjectFunctions.h: (JSC::JSCallbackObject::getOwnPropertySlot):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h

    r37845 r38265  
    131131                // FIXME: This violates the PropertySlot design a little bit.
    132132                // We should either use this optimization everywhere, or nowhere.
    133                 slot.setCustom(asObject(toJS(value)), cachedValueGetter);
     133                slot.setCustom(toJS(value), cachedValueGetter);
    134134                return true;
    135135            }
  • trunk/JavaScriptCore/ChangeLog

    r38259 r38265  
     12008-11-10  Cameron Zwarich  <[email protected]>
     2
     3        Reviewed by Darin Adler.
     4
     5        Bug 22152: Remove asObject() call from JSCallbackObject::getOwnPropertySlot()
     6        <https://bugs.webkit.org/show_bug.cgi?id=22152>
     7
     8        With the recent change to adopt asType() style cast functions with
     9        assertions instead of static_casts in many places, the assertion for
     10        the asObject() call in JSCallbackObject::getOwnPropertySlot() has been
     11        failing when using any nontrivial client of the JavaScriptCore API.
     12        The cast isn't even necessary to call slot.setCustom(), so it should
     13        be removed.
     14
     15        * API/JSCallbackObjectFunctions.h:
     16        (JSC::JSCallbackObject::getOwnPropertySlot):
     17
    1182008-11-10  Alexey Proskuryakov  <[email protected]>
    219
Note: See TracChangeset for help on using the changeset viewer.