Ignore:
Timestamp:
Sep 19, 2015, 8:36:46 AM (10 years ago)
Author:
[email protected]
Message:

VariableEnvironmentNode should inherit from ParserArenaDeletable because VariableEnvironment's must have their destructors run
https://bugs.webkit.org/show_bug.cgi?id=149359

Reviewed by Andreas Kling.

VariableEnvironment must have its destructor run.
Therefore, VariableEnvironmentNode should inherit from ParserArenaDeletable.
Also, anything that inherits from VariableEnvironmentNode must use
ParserArenaDeletable's operator new. Also, any other nodes that own
a VariableEnvironment must also have their destructors run.

  • parser/Nodes.h:

(JSC::VariableEnvironmentNode::VariableEnvironmentNode):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp

    r189884 r190014  
    28512851        }
    28522852
    2853         generator.emitPushCatchScope(m_thrownValueIdent, thrownValueRegister.get(), m_catchEnvironment);
     2853        generator.emitPushCatchScope(m_thrownValueIdent, thrownValueRegister.get(), m_lexicalVariables);
    28542854        generator.emitProfileControlFlow(m_tryBlock->endOffset() + 1);
    28552855        if (m_finallyBlock)
     
    28572857        else
    28582858            generator.emitNodeInTailPosition(dst, m_catchBlock);
    2859         generator.emitPopCatchScope(m_catchEnvironment);
     2859        generator.emitPopCatchScope(m_lexicalVariables);
    28602860        generator.emitLabel(catchEndLabel.get());
    28612861    }
Note: See TracChangeset for help on using the changeset viewer.