Changeset 19013 in webkit
- Timestamp:
- Jan 21, 2007, 12:51:34 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r19012 r19013 1 2007-01-21 Sanjay Madhav <sanjay12@gmail.com> 2 3 Reviewed by Darin. 4 5 Test for: <rdar://problem/4928583> Memory usage grows when reloading google.com/ig 6 7 * fast/dom/gc-10-expected.txt: Added. 8 * fast/dom/gc-10.html: Added. 9 * fast/dom/resources/gc-10-frame.html: Added. 10 1 11 2007-01-21 Mitz Pettel <mitz@webkit.org> 2 12 -
trunk/WebCore/ChangeLog
r19012 r19013 1 2007-01-21 Sanjay Madhav <sanjay12@gmail.com> 2 3 Reviewed by Darin. 4 5 Fix for: <rdar://problem/4928583> Memory usage grows when reloading google.com/ig 6 7 JSDocuments are now responsible for marking the DOM wrappers associated with them, when they get marked. 8 This fixes a JS object leak when a DOM wrapper has a reference to a JSDocument that is otherwise not reachable. 9 10 Test: fast/dom/gc-10.html 11 12 * WebCore.vcproj/WebCore/WebCore.vcproj: 13 * WebCore.xcodeproj/project.pbxproj: 14 * bindings/js/JSDocumentCustom.cpp: Added. 15 (WebCore::JSDocument::mark): 16 * bindings/js/kjs_binding.cpp: 17 (KJS::ScriptInterpreter::markDOMNodesForDocument): 18 (KJS::ScriptInterpreter::mark): 19 * bindings/js/kjs_binding.h: 20 * dom/Document.idl: 21 1 22 2007-01-21 Mitz Pettel <mitz@webkit.org> 2 23 -
trunk/WebCore/WebCore.vcproj/WebCore/WebCore.vcproj
r18966 r19013 5423 5423 </File> 5424 5424 <File 5425 RelativePath="..\..\bindings\js\JSDocumentCustom.cpp" 5426 > 5427 </File> 5428 <File 5425 5429 RelativePath="..\..\bindings\js\JSHTMLElementWrapperFactory.cpp" 5426 5430 > -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r18994 r19013 1347 1347 85FF315A0AAFBFCB00374F38 /* DOMKeyboardEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 85FF31580AAFBFCB00374F38 /* DOMKeyboardEvent.h */; }; 1348 1348 85FF315B0AAFBFCB00374F38 /* DOMKeyboardEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */; }; 1349 929264770B61FC7200B41D34 /* JSDocumentCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 929264760B61FC7200B41D34 /* JSDocumentCustom.cpp */; }; 1349 1350 9305B24D098F1B6B00C28855 /* Timer.h in Headers */ = {isa = PBXBuildFile; fileRef = 9305B24C098F1B6B00C28855 /* Timer.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1350 1351 9307056C09E0AF8F00B17FE4 /* csshelper.h in Headers */ = {isa = PBXBuildFile; fileRef = BCEA4786097CAAC80094C9E4 /* csshelper.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 4370 4371 85FF31580AAFBFCB00374F38 /* DOMKeyboardEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DOMKeyboardEvent.h; sourceTree = "<group>"; }; 4371 4372 85FF31590AAFBFCB00374F38 /* DOMKeyboardEvent.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMKeyboardEvent.mm; sourceTree = "<group>"; }; 4373 929264760B61FC7200B41D34 /* JSDocumentCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDocumentCustom.cpp; sourceTree = "<group>"; }; 4372 4374 9305B24C098F1B6B00C28855 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Timer.h; sourceTree = "<group>"; }; 4373 4375 9307059009E0C75800B17FE4 /* CSSPrimitiveValue.idl */ = {isa = PBXFileReference; explicitFileType = sourcecode; fileEncoding = 4; path = CSSPrimitiveValue.idl; sourceTree = "<group>"; }; … … 8781 8783 93F8B3060A300FEA00F61AB8 /* CodeGeneratorJS.pm */, 8782 8784 1A9EF4560A1B957D00332B63 /* JSCanvasRenderingContext2DCustom.cpp */, 8785 929264760B61FC7200B41D34 /* JSDocumentCustom.cpp */, 8783 8786 938E65F609F0985D008A48EC /* JSHTMLElementWrapperFactory.cpp */, 8784 8787 938E65F009F09840008A48EC /* JSHTMLElementWrapperFactory.h */, … … 12344 12347 1A2A68230B5BEDE70002A480 /* ProgressTracker.cpp in Sources */, 12345 12348 A80CEBAD0B60FC49007637C1 /* SVGMPathElement.cpp in Sources */, 12349 929264770B61FC7200B41D34 /* JSDocumentCustom.cpp in Sources */, 12346 12350 ); 12347 12351 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/bindings/js/kjs_binding.cpp
r18863 r19013 198 198 } 199 199 200 void ScriptInterpreter::mark (bool currentThreadIsMainThread)201 { 202 NodePerDocMap::iterator dict End = domNodesPerDocument().end();203 for (NodePerDocMap::iterator dictIt = domNodesPerDocument().begin(); dictIt != dictEnd; ++dictIt) {200 void ScriptInterpreter::markDOMNodesForDocument(Document* doc) 201 { 202 NodePerDocMap::iterator dictIt = domNodesPerDocument().find(doc); 203 if (dictIt != domNodesPerDocument().end()) { 204 204 NodeMap* nodeDict = dictIt->second; 205 205 NodeMap::iterator nodeEnd = nodeDict->end(); … … 213 213 } 214 214 } 215 215 } 216 217 void ScriptInterpreter::mark(bool currentThreadIsMainThread) 218 { 216 219 if (!currentThreadIsMainThread) { 217 220 // On alternate threads, DOMObjects remain in the cache because they're not collected. -
trunk/WebCore/bindings/js/kjs_binding.h
r18874 r19013 77 77 static void forgetAllDOMNodesForDocument(WebCore::Document*); 78 78 static void updateDOMNodeDocument(WebCore::Node*, WebCore::Document* oldDoc, WebCore::Document* newDoc); 79 static void markDOMNodesForDocument(WebCore::Document*); 79 80 80 81 WebCore::Frame* frame() const { return m_frame; } -
trunk/WebCore/dom/Document.idl
r17859 r19013 21 21 module core { 22 22 23 interface [LegacyParent=KJS::DOMEventTargetNode, GenerateConstructor ] Document : EventTargetNode {23 interface [LegacyParent=KJS::DOMEventTargetNode, GenerateConstructor, CustomMarkFunction] Document : EventTargetNode { 24 24 25 25 // DOM Level 1 Core -
trunk/WebKitTools/ChangeLog
r19000 r19013 1 2007-01-21 Sanjay Madhav <sanjay12@gmail.com> 2 3 Reviewed by Darin. 4 5 Test support for: <rdar://problem/4928583> Memory usage grows when reloading google.com/ig 6 7 This adds a getJSObjectCount test-accessible function to allow test scripts to track JSObject usage. 8 9 * DumpRenderTree/GCController.h: 10 * DumpRenderTree/GCController.mm: 11 (+[GCController isSelectorExcludedFromWebScript:]): 12 (-[GCController getJSObjectCount]): 13 1 14 2007-01-20 Mark Rowe <mrowe@apple.com> 2 15 -
trunk/WebKitTools/DumpRenderTree/GCController.h
r14569 r19013 35 35 - (void)collect; 36 36 - (void)collectOnAlternateThread:(BOOL)waitUntilDone; 37 - (size_t)getJSObjectCount; 37 38 @end -
trunk/WebKitTools/DumpRenderTree/GCController.mm
r14569 r19013 38 38 if (aSelector == @selector(collectOnAlternateThread:)) 39 39 return NO; 40 if (aSelector == @selector(getJSObjectCount)) 41 return NO; 42 40 43 return YES; 41 44 } … … 58 61 [WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThread:waitUntilDone]; 59 62 } 63 64 - (size_t)getJSObjectCount 65 { 66 return [WebCoreStatistics javaScriptObjectsCount]; 67 } 60 68 @end
Note:
See TracChangeset
for help on using the changeset viewer.