Skip to content
  • mhahnenberg@apple.com's avatar
    Make JSCell::toBoolean non-virtual · a0f3daa3
    mhahnenberg@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=67727
    
    Reviewed by Sam Weinig.
    
    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):
    * runtime/StringObjectThatMasqueradesAsUndefined.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    a0f3daa3