Changeset 51672 in webkit
- Timestamp:
- Dec 3, 2009 6:17:46 PM (14 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r51671 r51672 1 2009-12-03 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Gavin Barraclough. 4 5 REGRESSION(4.0.3-48777): Crash in JSC::ExecState::propertyNames() (Debug-only?) 6 https://bugs.webkit.org/show_bug.cgi?id=32133 7 8 Work around odd GCC-ism and correct the scopechain for use by 9 calls made while a cachedcall is active on the callstack. 10 11 * interpreter/CachedCall.h: 12 (JSC::CachedCall::newCallFrame): 13 * runtime/JSArray.cpp: 14 (JSC::AVLTreeAbstractorForArrayCompare::compare_key_key): 15 * runtime/StringPrototype.cpp: 16 (JSC::stringProtoFuncReplace): 17 1 18 2009-12-03 Gavin Barraclough <barraclough@apple.com> 2 19 -
trunk/JavaScriptCore/interpreter/CachedCall.h
r50608 r51672 53 53 void setThis(JSValue v) { m_closure.setArgument(0, v); } 54 54 void setArgument(int n, JSValue v) { m_closure.setArgument(n + 1, v); } 55 CallFrame* newCallFrame() { return m_closure.newCallFrame; } 55 56 CallFrame* newCallFrame(ExecState* exec) 57 { 58 CallFrame* callFrame = m_closure.newCallFrame; 59 callFrame->setScopeChain(exec->scopeChain()); 60 return callFrame; 61 } 62 56 63 ~CachedCall() 57 64 { -
trunk/JavaScriptCore/interpreter/CallFrame.h
r48774 r51672 40 40 JSFunction* callee() const { return this[RegisterFile::Callee].function(); } 41 41 CodeBlock* codeBlock() const { return this[RegisterFile::CodeBlock].Register::codeBlock(); } 42 ScopeChainNode* scopeChain() const { return this[RegisterFile::ScopeChain].Register::scopeChain(); } 42 ScopeChainNode* scopeChain() const 43 { 44 ASSERT(this[RegisterFile::ScopeChain].Register::scopeChain()); 45 return this[RegisterFile::ScopeChain].Register::scopeChain(); 46 } 43 47 int argumentCount() const { return this[RegisterFile::ArgumentCount].i(); } 44 48 … … 67 71 JSGlobalData& globalData() const 68 72 { 73 ASSERT(scopeChain()->globalData); 69 74 return *scopeChain()->globalData; 70 75 } -
trunk/JavaScriptCore/runtime/ArrayPrototype.cpp
r48948 r51672 746 746 cachedCall.setArgument(1, jsNumber(exec, k)); 747 747 cachedCall.setArgument(2, thisObj); 748 749 if (! cachedCall.call().toBoolean(exec))748 JSValue result = cachedCall.call(); 749 if (!result.toBoolean(cachedCall.newCallFrame(exec))) 750 750 return jsBoolean(false); 751 751 } … … 847 847 cachedCall.setArgument(1, jsNumber(exec, k)); 848 848 cachedCall.setArgument(2, thisObj); 849 850 if ( cachedCall.call().toBoolean(exec))849 JSValue result = cachedCall.call(); 850 if (result.toBoolean(cachedCall.newCallFrame(exec))) 851 851 return jsBoolean(true); 852 852 } -
trunk/JavaScriptCore/runtime/JSArray.cpp
r49065 r51672 786 786 m_cachedCall->setArgument(0, va); 787 787 m_cachedCall->setArgument(1, vb); 788 compareResult = m_cachedCall->call().toNumber(m_cachedCall->newCallFrame( ));788 compareResult = m_cachedCall->call().toNumber(m_cachedCall->newCallFrame(m_exec)); 789 789 } else { 790 790 MarkedArgumentBuffer arguments; -
trunk/JavaScriptCore/runtime/StringPrototype.cpp
r51307 r51672 282 282 283 283 cachedCall.setThis(exec->globalThisValue()); 284 replacements.append(cachedCall.call().toString(cachedCall.newCallFrame())); 284 JSValue result = cachedCall.call(); 285 replacements.append(result.toString(cachedCall.newCallFrame(exec))); 285 286 if (exec->hadException()) 286 287 break;
Note: See TracChangeset
for help on using the changeset viewer.