Ignore:
Timestamp:
Oct 28, 2007, 9:11:37 PM (18 years ago)
Author:
darin
Message:

Reviewed by Maciej.

  • fix a storage leak where we ref the UString every time we replace a ResolveNode with a LocalVarAccessNode
  • kjs/identifier.h: (KJS::Identifier::Identifier): Added a constructor that takes PlacementNewAdopt.
  • kjs/nodes.h: (KJS::ResolveNode::ResolveNode): Initialize the ident with PlacementNewAdopt instead of the old value of ident.
  • kjs/ustring.h: (KJS::UString::UString): Added a constructor that takes PlacementNewAdopt.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/identifier.h

    r26996 r27206  
    11/*
    2  *  This file is part of the KDE libraries
    3  *  Copyright (C) 2003 Apple Computer, Inc
     2 *  Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
    43 *
    54 *  This library is free software; you can redistribute it and/or
     
    3534        explicit Identifier(UString::Rep* rep) : _ustring(add(rep)) { }
    3635        explicit Identifier(const UString& s) : _ustring(add(s.rep())) { }
     36
     37        // Special constructor for cases where we overwrite an object in place.
     38        Identifier(PlacementNewAdoptType) : _ustring(PlacementNewAdopt) { }
    3739       
    3840        const UString& ustring() const { return _ustring; }
Note: See TracChangeset for help on using the changeset viewer.