Changeset 30109 in webkit for trunk/JavaScriptCore/kjs/nodes.h


Ignore:
Timestamp:
Feb 9, 2008, 10:09:42 AM (17 years ago)
Author:
Darin Adler
Message:

Reviewed by Mitz.

We'll want to do this to every RefCounted class, one at a time.

  • kjs/nodes.h: (KJS::RegExpNode::RegExpNode): Use RegExp::create instead of new RegExp.
  • kjs/regexp.cpp: (KJS::RegExp::RegExp): Marked inline, set initial ref count to 1. (KJS::RegExp::create): Added. Calls new RegExp then adopts the initial ref.
  • kjs/regexp.h: Reformatted. Made the constructors private. Added static create functions that return objects already wrapped in PassRefPtr.
  • kjs/regexp_object.cpp: (KJS::regExpProtoFuncCompile): Use RegExp::create instead of new RegExp. (KJS::RegExpObjectImp::construct): Ditto.
  • kjs/string_object.cpp: (KJS::stringProtoFuncMatch): Ditto. (KJS::stringProtoFuncSearch): Ditto.
File:
1 edited

Legend:

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

    r30105 r30109  
    335335    public:
    336336        RegExpNode(const UString& pattern, const UString& flags) KJS_FAST_CALL
    337             : m_regExp(new RegExp(pattern, flags))
     337            : m_regExp(RegExp::create(pattern, flags))
    338338        {
    339339        }
Note: See TracChangeset for help on using the changeset viewer.