Changeset 13752 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp


Ignore:
Timestamp:
Apr 9, 2006, 10:06:35 PM (19 years ago)
Author:
ggaren
Message:

Reviewed by eric.

This patch switches manual RefPtr exchange with use of
RefPtr::release to ensure that a node's ref count never tops 1
(in the normal case).

  • kjs/nodes.cpp: (BlockNode::BlockNode): (CaseBlockNode::CaseBlockNode):
  • kjs/nodes.h: (KJS::ArrayNode::ArrayNode): (KJS::ObjectLiteralNode::ObjectLiteralNode): (KJS::ArgumentsNode::ArgumentsNode): (KJS::VarStatementNode::VarStatementNode): (KJS::ForNode::ForNode): (KJS::CaseClauseNode::CaseClauseNode): (KJS::FuncExprNode::FuncExprNode): (KJS::FuncDeclNode::FuncDeclNode):
File:
1 edited

Legend:

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

    r13488 r13752  
    16781678{
    16791679  if (s) {
    1680     source = s->next;
     1680    source = s->next.release();
    16811681    Parser::removeNodeCycle(source.get());
    1682     s->next = 0;
    16831682    setLoc(s->firstLine(), s->lastLine());
    16841683  } else {
     
    21442143{
    21452144  if (l1) {
    2146     list1 = l1->next;
     2145    list1 = l1->next.release();
    21472146    Parser::removeNodeCycle(list1.get());
    2148     l1->next = 0;
    21492147  } else {
    21502148    list1 = 0;
     
    21542152
    21552153  if (l2) {
    2156     list2 = l2->next;
     2154    list2 = l2->next.release();
    21572155    Parser::removeNodeCycle(list2.get());
    2158     l2->next = 0;
    21592156  } else {
    21602157    list2 = 0;
Note: See TracChangeset for help on using the changeset viewer.