Skip to content
  • mhahnenberg@apple.com's avatar
    Make JSCell::toBoolean non-virtual · f2fa8ff1
    mhahnenberg@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=67727
    
    Reviewed by Geoffrey Garen.
    
    JSCell::toBoolean now manually performs the toBoolean check for objects and strings (where
    before it was simply virtual and would crash if its implementation was called).
    Its descendants in JSObject and JSString have also been made non-virtual.  JSCell now
    explicitly covers all cases of toBoolean, so having a virtual implementation of
    JSCell::toBoolean is no longer necessary.  This is part of a larger process of un-virtualizing JSCell.
    
    * JavaScriptCore.exp:
    * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
    * runtime/JSCell.cpp:
    * runtime/JSCell.h:
    * runtime/JSNotAnObject.cpp:
    * runtime/JSNotAnObject.h:
    * runtime/JSObject.h:
    * runtime/JSString.h:
    (JSC::JSCell::toBoolean):
    (JSC::JSValue::toBoolean):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    f2fa8ff1