source: webkit/trunk/JavaScriptCore/JavaScriptCore.exp@ 19894

Last change on this file since 19894 was 19894, checked in by ggaren, 18 years ago

JavaScriptCore:

Reviewed by Maciej Stachowiak.


Fixed http://bugs.webkit.org/show_bug.cgi?id=12659 | <rdar://problem/4954306>
JS objects not collected after closing window @ ebay.com/maps.google.com

Don't GC in the Interpreter destructor. For that to work, the Interpreter
would have to NULL out all of its ProtectedPtrs before calling collect(). But
we've decided that we don't want things to work that way, anyway. We want the
client to be in charge of manual GC so that it can optimize cases when
it will be destroying many interpreters at once
(e.g., http://bugs.webkit.org/show_bug.cgi?id=12900).


Also removed Interpreter::collect() because it was redundant with
Collector::collect().

  • JavaScriptCore.exp:
  • kjs/interpreter.cpp: (KJS::Interpreter::~Interpreter):
  • kjs/testkjs.cpp: (TestFunctionImp::callAsFunction):

LayoutTests:

Reviewed by Maciej Stachowiak.


Test for http://bugs.webkit.org/show_bug.cgi?id=12659 | <rdar://problem/4954306>
JS objects not collected after closing window @ ebay.com/maps.google.com


  • fast/leaks/003-expected.txt: Added.
  • fast/leaks/003.html: Added.
  • fast/dom/gc-10.html: Bumped the wiggle room threshold on this test by 2 because it's failing on my machine with the patch applied but, according to the test notes, we're still well within the margin of error.

WebCore:

Reviewed by Maciej Stachowiak.


Fixed http://bugs.webkit.org/show_bug.cgi?id=12659 | <rdar://problem/4954306>
JS objects not collected after closing window @ ebay.com/maps.google.com

Garbage collect in the KJSProxy destructor, after clearing our reference
to the interpreter, because that's when the interpreter has torn down fully.

(Technically speaking, we can't *prove* that we have the only reference to
our interpreter, but that's how it works in practice, and manual garbage
collection is just an opportunistic optimization, so it's OK for it to
work in practice even if it can't be proven in theory.)


Layout tests pass. No leaks reported.

  • bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::~KJSProxy):
  • bindings/js/kjs_proxy.h:
  • page/Page.cpp: (WebCore::Page::~Page): Merged pageDestroyed() calls. Moved debug-only code to the bottom.
  • page/Frame.cpp: (WebCore::Frame::~Frame): Don't call getObject() because globalObject() returns a JSObject* already, and the call can leave a pointer to the Window object on the stack. Don't check for NULL because it is an invariant of JavaScriptCore that no JSObject* can be NULL. Do use a volatile pointer for w because the 'w = 0' assignment just screams to the compiler, "Don't generate any code for me!"
File size: 9.9 KB
Line 
1_JSCheckScriptSyntax
2_JSClassCreate
3_JSClassRelease
4_JSClassRetain
5_JSContextGetGlobalObject
6_JSEvaluateScript
7_JSGarbageCollect
8_JSGlobalContextCreate
9_JSGlobalContextRelease
10_JSGlobalContextRetain
11_JSObjectCallAsConstructor
12_JSObjectCallAsFunction
13_JSObjectCopyPropertyNames
14_JSObjectDeleteProperty
15_JSObjectGetPrivate
16_JSObjectGetProperty
17_JSObjectGetPropertyAtIndex
18_JSObjectGetPrototype
19_JSObjectHasProperty
20_JSObjectIsConstructor
21_JSObjectIsFunction
22_JSObjectMake
23_JSObjectMakeConstructor
24_JSObjectMakeFunction
25_JSObjectMakeFunction
26_JSObjectMakeFunctionWithCallback
27_JSObjectSetPrivate
28_JSObjectSetProperty
29_JSObjectSetPropertyAtIndex
30_JSObjectSetPrototype
31_JSPropertyNameAccumulatorAddName
32_JSPropertyNameArrayGetCount
33_JSPropertyNameArrayGetNameAtIndex
34_JSPropertyNameArrayRelease
35_JSPropertyNameArrayRetain
36_JSStringCopyCFString
37_JSStringCreateWithCFString
38_JSStringCreateWithCharacters
39_JSStringCreateWithUTF8CString
40_JSStringGetCharactersPtr
41_JSStringGetLength
42_JSStringGetMaximumUTF8CStringSize
43_JSStringGetUTF8CString
44_JSStringIsEqual
45_JSStringIsEqualToUTF8CString
46_JSStringRelease
47_JSStringRetain
48_JSValueGetType
49_JSValueIsBoolean
50_JSValueIsEqual
51_JSValueIsInstanceOfConstructor
52_JSValueIsNull
53_JSValueIsNumber
54_JSValueIsObject
55_JSValueIsObjectOfClass
56_JSValueIsStrictEqual
57_JSValueIsString
58_JSValueIsUndefined
59_JSValueMakeBoolean
60_JSValueMakeNull
61_JSValueMakeNumber
62_JSValueMakeString
63_JSValueMakeUndefined
64_JSValueProtect
65_JSValueToBoolean
66_JSValueToNumber
67_JSValueToObject
68_JSValueToStringCopy
69_JSValueUnprotect
70_KJS_JSCreateNativeJSObject
71_KJS_JSObject_JSFinalize
72_KJS_JSObject_JSObjectCall
73_KJS_JSObject_JSObjectEval
74_KJS_JSObject_JSObjectGetMember
75_KJS_JSObject_JSObjectGetSlot
76_KJS_JSObject_JSObjectRemoveMember
77_KJS_JSObject_JSObjectSetMember
78_KJS_JSObject_JSObjectSetSlot
79_KJS_JSObject_JSObjectToString
80_WTFLog
81_WTFReportArgumentAssertionFailure
82_WTFReportAssertionFailure
83_WTFReportAssertionFailureWithMessage
84_WTFReportError
85_WTFReportFatalError
86__NPN_CreateObject
87__NPN_DeallocateObject
88__NPN_Evaluate
89__NPN_GetIntIdentifier
90__NPN_GetProperty
91__NPN_GetStringIdentifier
92__NPN_GetStringIdentifiers
93__NPN_IdentifierIsString
94__NPN_Invoke
95__NPN_InvokeDefault
96__NPN_ReleaseObject
97__NPN_ReleaseVariantValue
98__NPN_RemoveProperty
99__NPN_RetainObject
100__NPN_SetException
101__NPN_SetProperty
102__NPN_UTF8FromIdentifier
103__Z23_NPN_CreateScriptObjectP4_NPPPN3KJS8JSObjectEN3WTF10PassRefPtrINS1_8Bindings10RootObjectEEES8_
104__Z25_NPN_CreateNoScriptObjectv
105__ZN3KJS10Identifier3addEPKNS_5UCharEi
106__ZN3KJS10Identifier3addEPKc
107__ZN3KJS10Identifier3addEPNS_7UString3RepE
108__ZN3KJS10Identifier5equalEPKNS_7UString3RepEPKc
109__ZN3KJS10throwErrorEPNS_9ExecStateENS_9ErrorTypeE
110__ZN3KJS10throwErrorEPNS_9ExecStateENS_9ErrorTypeEPKc
111__ZN3KJS11Interpreter10globalExecEv
112__ZN3KJS11Interpreter11checkSyntaxERKNS_7UStringEiPKNS_5UCharEi
113__ZN3KJS11Interpreter11checkSyntaxERKNS_7UStringEiS3_
114__ZN3KJS11Interpreter15restoreBuiltinsERKNS_13SavedBuiltinsE
115__ZN3KJS11Interpreter16initGlobalObjectEv
116__ZN3KJS11Interpreter16stopTimeoutCheckEv
117__ZN3KJS11Interpreter17startTimeoutCheckEv
118__ZN3KJS11Interpreter21shouldPrintExceptionsEv
119__ZN3KJS11Interpreter24setShouldPrintExceptionsEb
120__ZN3KJS11Interpreter4markEb
121__ZN3KJS11Interpreter6s_hookE
122__ZN3KJS11Interpreter8evaluateERKNS_7UStringEiPKNS_5UCharEiPNS_7JSValueE
123__ZN3KJS11Interpreter8evaluateERKNS_7UStringEiS3_PNS_7JSValueE
124__ZN3KJS11InterpreterC1EPNS_8JSObjectE
125__ZN3KJS11InterpreterC1Ev
126__ZN3KJS11InterpreterC2EPNS_8JSObjectE
127__ZN3KJS11InterpreterD1Ev
128__ZN3KJS11InterpreterD2Ev
129__ZN3KJS11JSImmediate4typeEPKNS_7JSValueE
130__ZN3KJS11JSImmediate8toObjectEPKNS_7JSValueEPNS_9ExecStateE
131__ZN3KJS11JSImmediate8toStringEPKNS_7JSValueE
132__ZN3KJS11PropertyMap11getLocationERKNS_10IdentifierE
133__ZN3KJS11PropertyMap5clearEv
134__ZN3KJS11PropertyMap7restoreERKNS_15SavedPropertiesE
135__ZN3KJS11PropertyMapD1Ev
136__ZN3KJS12DateInstance4infoE
137__ZN3KJS12PropertySlot15undefinedGetterEPNS_9ExecStateEPNS_8JSObjectERKNS_10IdentifierERKS0_
138__ZN3KJS12jsNumberCellEd
139__ZN3KJS13ArrayInstance4infoE
140__ZN3KJS13SavedBuiltinsC1Ev
141__ZN3KJS13SavedBuiltinsD1Ev
142__ZN3KJS14StringInstance14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
143__ZN3KJS14StringInstance16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE
144__ZN3KJS14StringInstance18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
145__ZN3KJS14StringInstance3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueEi
146__ZN3KJS14StringInstance4infoE
147__ZN3KJS14StringInstanceC1EPNS_8JSObjectERKNS_7UStringE
148__ZN3KJS14StringInstanceC2EPNS_8JSObjectERKNS_7UStringE
149__ZN3KJS15JSWrapperObject4markEv
150__ZN3KJS15SavedPropertiesC1Ev
151__ZN3KJS15SavedPropertiesD1Ev
152__ZN3KJS16RuntimeObjectImp4infoE
153__ZN3KJS16RuntimeObjectImpC1EPNS_8Bindings8InstanceE
154__ZN3KJS17PropertyNameArray3addERKNS_10IdentifierE
155__ZN3KJS18lengthPropertyNameE
156__ZN3KJS19InternalFunctionImp4infoE
157__ZN3KJS19InternalFunctionImpC2EPNS_17FunctionPrototypeERKNS_10IdentifierE
158__ZN3KJS19messagePropertyNameE
159__ZN3KJS21prototypePropertyNameE
160__ZN3KJS4List6appendEPNS_7JSValueE
161__ZN3KJS4List7releaseEv
162__ZN3KJS4ListC1Ev
163__ZN3KJS6JSCell9getObjectEv
164__ZN3KJS6JSCellnwEm
165__ZN3KJS6JSLock12DropAllLocksC1Ev
166__ZN3KJS6JSLock12DropAllLocksD1Ev
167__ZN3KJS6JSLock4lockEv
168__ZN3KJS6JSLock6unlockEv
169__ZN3KJS6Lookup9findEntryEPKNS_9HashTableERKNS_10IdentifierE
170__ZN3KJS6Parser11prettyPrintERKNS_7UStringEPiPS1_
171__ZN3KJS7CStringD1Ev
172__ZN3KJS7UString3Rep4nullE
173__ZN3KJS7UString3Rep7destroyEv
174__ZN3KJS7UString6appendERKS0_
175__ZN3KJS7UStringC1EPKNS_5UCharEi
176__ZN3KJS7UStringC1EPKc
177__ZN3KJS7UStringC1ERKS0_S2_
178__ZN3KJS7UStringaSEPKc
179__ZN3KJS8Bindings10RootObject10invalidateEv
180__ZN3KJS8Bindings10RootObject11gcUnprotectEPNS_8JSObjectE
181__ZN3KJS8Bindings10RootObject17_createRootObjectE
182__ZN3KJS8Bindings10RootObject19setCreateRootObjectEPFN3WTF10PassRefPtrIS1_EEPvE
183__ZN3KJS8Bindings10RootObject6createEPKvN3WTF10PassRefPtrINS_11InterpreterEEE
184__ZN3KJS8Bindings10RootObject9gcProtectEPNS_8JSObjectE
185__ZN3KJS8Bindings10RootObjectD1Ev
186__ZN3KJS8Bindings10throwErrorEPNS_9ExecStateENS_9ErrorTypeEP8NSString
187__ZN3KJS8Bindings23convertObjcValueToValueEPNS_9ExecStateEPvNS0_13ObjcValueTypeE
188__ZN3KJS8Bindings23convertValueToObjcValueEPNS_9ExecStateEPNS_7JSValueENS0_13ObjcValueTypeE
189__ZN3KJS8Bindings8Instance18didExecuteFunctionEv
190__ZN3KJS8Bindings8Instance21setDidExecuteFunctionEPFvPNS_9ExecStateEPNS_8JSObjectEE
191__ZN3KJS8Bindings8Instance32createBindingForLanguageInstanceENS1_15BindingLanguageEPvN3WTF10PassRefPtrINS0_10RootObjectEEE
192__ZN3KJS8Debugger12sourceUnusedEPNS_9ExecStateEi
193__ZN3KJS8Debugger6attachEPNS_11InterpreterE
194__ZN3KJS8Debugger9exceptionEPNS_9ExecStateEiiPNS_7JSValueE
195__ZN3KJS8DebuggerC2Ev
196__ZN3KJS8DebuggerD2Ev
197__ZN3KJS8JSObject11hasInstanceEPNS_9ExecStateEPNS_7JSValueE
198__ZN3KJS8JSObject14callAsFunctionEPNS_9ExecStateEPS0_RKNS_4ListE
199__ZN3KJS8JSObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
200__ZN3KJS8JSObject14deletePropertyEPNS_9ExecStateEj
201__ZN3KJS8JSObject16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE
202__ZN3KJS8JSObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
203__ZN3KJS8JSObject22fillGetterPropertySlotERNS_12PropertySlotEPPNS_7JSValueE
204__ZN3KJS8JSObject3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueEi
205__ZN3KJS8JSObject3putEPNS_9ExecStateEjPNS_7JSValueEi
206__ZN3KJS8JSObject4callEPNS_9ExecStateEPS0_RKNS_4ListE
207__ZN3KJS8JSObject4markEv
208__ZN3KJS8JSObject9constructEPNS_9ExecStateERKNS_4ListE
209__ZN3KJS8JSObject9constructEPNS_9ExecStateERKNS_4ListERKNS_10IdentifierERKNS_7UStringEi
210__ZN3KJS8JSObject9putDirectERKNS_10IdentifierEPNS_7JSValueEi
211__ZN3KJS8JSObject9putDirectERKNS_10IdentifierEii
212__ZN3KJS8jsStringEPKc
213__ZN3KJS8jsStringERKNS_7UStringE
214__ZN3KJS9Collector15numInterpretersEv
215__ZN3KJS9Collector19numProtectedObjectsEv
216__ZN3KJS9Collector20rootObjectTypeCountsEv
217__ZN3KJS9Collector4sizeEv
218__ZN3KJS9Collector7collectEv
219__ZN3KJS9Collector7protectEPNS_7JSValueE
220__ZN3KJS9Collector9unprotectEPNS_7JSValueE
221__ZN3KJSeqERKNS_7UStringEPKc
222__ZN3WTF10fastCallocEmm
223__ZN3WTF10fastMallocEm
224__ZN3WTF11fastReallocEPvm
225__ZN3WTF8fastFreeEPv
226__ZNK3KJS11Interpreter12builtinArrayEv
227__ZNK3KJS11Interpreter12globalObjectEv
228__ZNK3KJS11Interpreter12saveBuiltinsERNS_13SavedBuiltinsE
229__ZNK3KJS11Interpreter15builtinFunctionEv
230__ZNK3KJS11Interpreter22builtinObjectPrototypeEv
231__ZNK3KJS11Interpreter22builtinStringPrototypeEv
232__ZNK3KJS11Interpreter24builtinFunctionPrototypeEv
233__ZNK3KJS11PropertyMap3getERKNS_10IdentifierE
234__ZNK3KJS11PropertyMap4saveERNS_15SavedPropertiesE
235__ZNK3KJS12DateInstance7getTimeERdRi
236__ZNK3KJS13ArrayInstance7getItemEj
237__ZNK3KJS19InternalFunctionImp14implementsCallEv
238__ZNK3KJS19InternalFunctionImp21implementsHasInstanceEv
239__ZNK3KJS4List2atEi
240__ZNK3KJS4List8copyTailEv
241__ZNK3KJS6JSCell9getNumberERd
242__ZNK3KJS6JSCell9getNumberEv
243__ZNK3KJS6JSCell9getStringERNS_7UStringE
244__ZNK3KJS6JSCell9getStringEv
245__ZNK3KJS6JSCell9getUInt32ERj
246__ZNK3KJS7JSValue7toInt32EPNS_9ExecStateE
247__ZNK3KJS7JSValue7toInt32EPNS_9ExecStateERb
248__ZNK3KJS7JSValue8toUInt32EPNS_9ExecStateE
249__ZNK3KJS7JSValue8toUInt32EPNS_9ExecStateERb
250__ZNK3KJS7JSValue9toIntegerEPNS_9ExecStateE
251__ZNK3KJS7UString10UTF8StringEv
252__ZNK3KJS7UString14toStrictUInt32EPb
253__ZNK3KJS7UString5asciiEv
254__ZNK3KJS7UString6is8BitEv
255__ZNK3KJS7UString8toUInt32EPb
256__ZNK3KJS8Bindings10RootObject11interpreterEv
257__ZNK3KJS8JSObject11hasPropertyEPNS_9ExecStateERKNS_10IdentifierE
258__ZNK3KJS8JSObject12defaultValueEPNS_9ExecStateENS_6JSTypeE
259__ZNK3KJS8JSObject14implementsCallEv
260__ZNK3KJS8JSObject19implementsConstructEv
261__ZNK3KJS8JSObject21implementsHasInstanceEv
262__ZNK3KJS8JSObject3getEPNS_9ExecStateERKNS_10IdentifierE
263__ZNK3KJS8JSObject3getEPNS_9ExecStateEj
264__ZNK3KJS8JSObject4typeEv
265__ZNK3KJS8JSObject6canPutEPNS_9ExecStateERKNS_10IdentifierE
266__ZNK3KJS8JSObject8toNumberEPNS_9ExecStateE
267__ZNK3KJS8JSObject8toObjectEPNS_9ExecStateE
268__ZNK3KJS8JSObject8toStringEPNS_9ExecStateE
269__ZNK3KJS8JSObject9classInfoEv
270__ZNK3KJS8JSObject9classNameEv
271__ZNK3KJS8JSObject9toBooleanEPNS_9ExecStateE
272__ZNK3KJS9ExecState18lexicalInterpreterEv
273__ZTVN3KJS14StringInstanceE
274__ZTVN3KJS15JSWrapperObjectE
275__ZTVN3KJS19InternalFunctionImpE
276__ZTVN3KJS8JSObjectE
277_kJSClassDefinitionEmpty
278_kjs_pcre_compile
279_kjs_pcre_exec
280_kjs_pcre_free
281_kjs_pcre_free_substring
282_kjs_pcre_get_substring
283_kjs_strtod
Note: See TracBrowser for help on using the repository browser.