Changeset 10178 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Aug 14, 2005, 9:04:19 AM (20 years ago)
Author:
darin
Message:
  • kjs/error_object.cpp: (NativeErrorImp::NativeErrorImp): Set proto in a more straightforward way. The old code set the proto to 0 and then to the correct value. This showed up as a "false positive" when searching for places that set prototype to NULL/0 so I fixed it.
  • kjs/function_object.cpp: (FunctionPrototypeImp::FunctionPrototypeImp): Change to not pass an explicit "0" to the base class (InternalFunctionImp) constructor.
  • kjs/internal.h: Added a default constructor for InternalFunctionImp.
  • kjs/internal.cpp: (KJS::InternalFunctionImp::InternalFunctionImp): Added the default constructor (empty body, just calls base class's default constructor).
  • kjs/object.h: (KJS::ObjectImp::ObjectImp): Add an assertion to catch NULL prototypes earlier in Development builds. (KJS::ObjectImp::setPrototype): Ditto.
Location:
trunk/JavaScriptCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r10168 r10178  
     12005-08-14  Darin Adler  <[email protected]>
     2
     3        - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=4344
     4          REGRESSION: JavaScript crash when going back from viewing a thread (NULL protoype)
     5
     6        * kjs/error_object.cpp: (NativeErrorImp::NativeErrorImp): Set proto in a more
     7        straightforward way. The old code set the proto to 0 and then to the correct value.
     8        This showed up as a "false positive" when searching for places that set prototype
     9        to NULL/0 so I fixed it.
     10
     11        * kjs/function_object.cpp: (FunctionPrototypeImp::FunctionPrototypeImp): Change to
     12        not pass an explicit "0" to the base class (InternalFunctionImp) constructor.
     13
     14        * kjs/internal.h: Added a default constructor for InternalFunctionImp.
     15        * kjs/internal.cpp: (KJS::InternalFunctionImp::InternalFunctionImp): Added the
     16        default constructor (empty body, just calls base class's default constructor).
     17
     18        * kjs/object.h:
     19        (KJS::ObjectImp::ObjectImp): Add an assertion to catch NULL prototypes earlier
     20        in Development builds.
     21        (KJS::ObjectImp::setPrototype): Ditto.
     22
    1232005-08-12  Maciej Stachowiak  <[email protected]>
    224
  • trunk/JavaScriptCore/Makefile.am

    r9906 r10178  
    22        defaults write com.apple.Xcode PBXProductDirectory "$(SYMROOTS)"
    33        defaults write com.apple.Xcode PBXIntermediatesDirectory "$(SYMROOTS)"
     4        ../WebKitTools/Scripts/set-webkit-configuration --$(BUILDSTYLE)
    45        xcodebuild -target All -configuration $(BUILDSTYLE)
    56clean-am:
    67        defaults write com.apple.Xcode PBXProductDirectory "$(SYMROOTS)"
    78        defaults write com.apple.Xcode PBXIntermediatesDirectory "$(SYMROOTS)"
    8         xcodebuild -target All clean -configuration ${BUILDSTYLE}
     9        ../WebKitTools/Scripts/set-webkit-configuration --$(BUILDSTYLE)
     10        xcodebuild -target All clean -configuration $(BUILDSTYLE)
  • trunk/JavaScriptCore/kjs/error_object.cpp

    r10084 r10178  
    146146NativeErrorImp::NativeErrorImp(ExecState *exec, FunctionPrototypeImp *funcProto,
    147147                               ObjectImp *prot)
    148   : InternalFunctionImp(funcProto), proto(0)
     148  : InternalFunctionImp(funcProto), proto(prot)
    149149{
    150   proto = static_cast<ObjectImp*>(prot);
    151 
    152150  putDirect(lengthPropertyName, jsOne(), DontDelete|ReadOnly|DontEnum); // ECMA 15.11.7.5
    153151  putDirect(prototypePropertyName, proto, DontDelete|ReadOnly|DontEnum);
  • trunk/JavaScriptCore/kjs/function_object.cpp

    r10084 r10178  
    3939
    4040FunctionPrototypeImp::FunctionPrototypeImp(ExecState *exec)
    41   : InternalFunctionImp(0)
    4241{
    4342  putDirect(lengthPropertyName,   jsZero(),                                                       DontDelete|ReadOnly|DontEnum);
  • trunk/JavaScriptCore/kjs/internal.cpp

    r10084 r10178  
    858858const ClassInfo InternalFunctionImp::info = {"Function", 0, 0, 0};
    859859
     860InternalFunctionImp::InternalFunctionImp()
     861{
     862}
     863
    860864InternalFunctionImp::InternalFunctionImp(FunctionPrototypeImp *funcProto)
    861865  : ObjectImp(funcProto)
  • trunk/JavaScriptCore/kjs/internal.h

    r10084 r10178  
    393393  class InternalFunctionImp : public ObjectImp {
    394394  public:
     395    InternalFunctionImp();
    395396    InternalFunctionImp(FunctionPrototypeImp *funcProto);
    396397    bool implementsHasInstance() const;
  • trunk/JavaScriptCore/kjs/object.h

    r10148 r10178  
    623623    : _proto(proto), _internalValue(0)
    624624{
     625    assert(proto);
    625626}
    626627
     
    647648inline void ObjectImp::setPrototype(ValueImp *proto)
    648649{
     650    assert(proto);
    649651    _proto = proto;
    650652}
Note: See TracChangeset for help on using the changeset viewer.