• oliver@apple.com's avatar
    Make JSValue bool conversion less dangerous · 02fe0141
    oliver@apple.com authored
    Reviewed by Darin Adler.
    Replaces JSValue::operator bool() with a operator UnspecifiedBoolType* as
    we do elsewhere.  Then fix the places where terrible type coercion was
    happening.  All of the changes made had no fundamental behavioural impact
    as they were coercion results that were ignored (returning undefined
    after an exception).
    * dfg/DFGOperations.cpp:
    * interpreter/CallFrame.h:
    * runtime/JSCJSValue.h:
    * runtime/JSCJSValueInlines.h:
    (JSC::JSValue::operator UnspecifiedBoolType*):
    * runtime/JSGlobalObjectFunctions.cpp:
    * runtime/PropertyDescriptor.cpp:
    Make LIKELY and UNLIKELY macros coerce to bool before
    passing to expect.
    * wtf/Compiler.h:
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PropertyDescriptor.cpp 6.78 KB