Changeset 31205 in webkit for trunk/JavaScriptCore
- Timestamp:
- Mar 20, 2008, 10:00:16 PM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r31195 r31205 1 2008-03-20 Oliver Hunt <[email protected]> 2 3 Reviewed by Maciej. 4 5 Fix for leak introduced by inline ScopeChainNode use 6 7 To avoid any extra branches when managing an inline ScopeChainNode 8 in the ScopeChain the inline node gets inserted with a refcount of 9 2. This meant than when the ScopeChain was destroyed the ScopeChainNodes 10 above the inline node would be leaked. 11 12 We resolve this by manually popping the inline node in the 13 FunctionExecState destructor. 14 15 * JavaScriptCore.xcodeproj/project.pbxproj: 16 * kjs/ExecStateInlines.h: 17 (KJS::FunctionExecState::~FunctionExecState): 18 * kjs/scope_chain.h: 19 (KJS::ScopeChain::popInlineScopeNode): 20 1 21 2008-03-20 Mark Rowe <[email protected]> 2 22 -
trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r31174 r31205 483 483 93F1981A08245AAE001E9ABC /* keywords.table */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = text; path = keywords.table; sourceTree = "<group>"; tabWidth = 8; }; 484 484 95C18D3E0C90E7EF00E72F73 /* JSRetainPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSRetainPtr.h; sourceTree = "<group>"; }; 485 A785E3030D9341AB00953772 /* ExecStateInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExecStateInlines.h; sourceTree = "<group>"; }; 485 486 A8E894310CD0602400367179 /* JSCallbackObjectFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCallbackObjectFunctions.h; sourceTree = "<group>"; }; 486 487 A8E894330CD0603F00367179 /* JSGlobalObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObject.h; sourceTree = "<group>"; }; … … 827 828 14BD53F40A3E12D800BAF59C /* ExecState.cpp */, 828 829 14BD53F30A3E12D800BAF59C /* ExecState.h */, 830 A785E3030D9341AB00953772 /* ExecStateInlines.h */, 829 831 F692A85E0255597D01FF60F7 /* function.cpp */, 830 832 F692A85F0255597D01FF60F7 /* function.h */, -
trunk/JavaScriptCore/kjs/ExecStateInlines.h
r31173 r31205 84 84 if (m_activation->needsPop()) 85 85 m_globalObject->popActivation(); 86 87 if (m_inlineScopeChainNode.next) { 88 m_scopeChain.popInlineScopeNode(); 89 m_inlineScopeChainNode.next = 0; 90 } 86 91 } 87 92 -
trunk/JavaScriptCore/kjs/scope_chain.h
r31172 r31205 94 94 void replaceTop(JSObject*); 95 95 void pop(); 96 96 void popInlineScopeNode(); 97 97 98 void mark(); 98 99 … … 172 173 } 173 174 175 inline void ScopeChain::popInlineScopeNode() 176 { 177 _node = _node->next; 178 } 179 174 180 } // namespace KJS 175 181
Note:
See TracChangeset
for help on using the changeset viewer.