Ignore:
Timestamp:
Sep 26, 2011, 4:53:42 PM (14 years ago)
Author:
[email protected]
Message:

Make JSCell::toBoolean non-virtual
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):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSNotAnObject.h

    r95901 r96045  
    6666        virtual JSValue defaultValue(ExecState*, PreferredPrimitiveType) const;
    6767        virtual bool getPrimitiveNumber(ExecState*, double& number, JSValue&);
    68         virtual bool toBoolean(ExecState*) const;
    6968        virtual double toNumber(ExecState*) const;
    7069        virtual UString toString(ExecState*) const;
Note: See TracChangeset for help on using the changeset viewer.