Changeset 45969 in webkit
- Timestamp:
- Jul 16, 2009 4:16:14 AM (15 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r45949 r45969 1 2009-07-16 Zoltan Herczeg <zherczeg@inf.u-szeged.hu> 2 3 Reviewed by Oliver Hunt. 4 5 Workers + garbage collector: weird crashes 6 https://bugs.webkit.org/show_bug.cgi?id=27077 7 8 We need to unlink cached method call sites when a function is destroyed. 9 10 * JavaScriptCore.xcodeproj/project.pbxproj: 11 * bytecode/CodeBlock.cpp: 12 (JSC::CodeBlock::~CodeBlock): 13 (JSC::CodeBlock::unlinkCallers): 14 * jit/JIT.cpp: 15 (JSC::JIT::unlinkMethodCall): 16 * jit/JIT.h: 17 1 18 2009-07-15 Steve Falkenburg <sfalken@apple.com> 2 19 -
trunk/JavaScriptCore/bytecode/CodeBlock.cpp
r45609 r45969 1319 1319 } 1320 1320 1321 for (size_t size = m_methodCallLinkInfos.size(), i = 0; i < size; ++i) {1322 if (Structure* structure = m_methodCallLinkInfos[i].cachedStructure)1323 structure->deref();1324 }1325 1326 1321 unlinkCallers(); 1327 1322 #endif … … 1342 1337 } 1343 1338 m_linkedCallerList.clear(); 1339 1340 for (size_t size = m_methodCallLinkInfos.size(), i = 0; i < size; ++i) { 1341 if (m_methodCallLinkInfos[i].cachedStructure) { 1342 m_methodCallLinkInfos[i].cachedStructure->deref(); 1343 m_methodCallLinkInfos[i].cachedStructure = 0; 1344 JIT::unlinkMethodCall(&m_methodCallLinkInfos[i]); 1345 } 1346 } 1344 1347 } 1345 1348 #endif -
trunk/JavaScriptCore/jit/JIT.cpp
r45609 r45969 908 908 } 909 909 910 void JIT::unlinkMethodCall(MethodCallLinkInfo* methodCallLinkInfo) 911 { 912 // see the comment above. 913 RepatchBuffer repatchBuffer; 914 repatchBuffer.repatch(methodCallLinkInfo->structureLabel, reinterpret_cast<void*>(patchGetByIdDefaultStructure)); 915 } 916 910 917 void JIT::linkCall(JSFunction* callee, CodeBlock* calleeCodeBlock, JITCode& code, CallLinkInfo* callLinkInfo, int callerArgCount, JSGlobalData* globalData) 911 918 { -
trunk/JavaScriptCore/jit/JIT.h
r45138 r45969 392 392 static void linkCall(JSFunction* callee, CodeBlock* calleeCodeBlock, JITCode&, CallLinkInfo*, int callerArgCount, JSGlobalData*); 393 393 static void unlinkCall(CallLinkInfo*); 394 static void unlinkMethodCall(MethodCallLinkInfo*); 394 395 395 396 private:
Note: See TracChangeset
for help on using the changeset viewer.