Summary: | Global object is recreated on teardown, for no good reason | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | George Staikos <staikos> | ||||||
Component: | JavaScriptCore | Assignee: | Geoffrey Garen <ggaren> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, ademar, dave+webkit, dimich, ggaren, mjs, oliver | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | PC | ||||||||
OS: | OS X 10.5 | ||||||||
Attachments: |
|
Description
George Staikos
2011-04-28 06:56:10 PDT
Created attachment 91486 [details]
Possible fix
Does this cause a possible leak? I'm not sure yet.
> You can see from this trace that frame teardown is creating a new global object for no good reason that I can determine. We immediately get rid of it all anyway.
Yeah, this is a pretty big travesty.
Comment on attachment 91486 [details]
Possible fix
I think this patch would crash, because setWindow(JSGlobalData&, JSDOMWindow*) assumes the window is not NULL.
It might work to change setWindow(JSGlobalData&, JSDOMWindow*) to use jsNull() as the window shell's prototype if the JSDOMWindow* is NULL, or you could just change setWindow(JSGlobalData&, JSDOMWindow*) to take an explicit prototype argument.
Created attachment 93605 [details]
Patch
Committed r86523: <http://trac.webkit.org/changeset/86523> Thanks! Just got back from vacation/travel to see this :) Revision r86523 cherry-picked into qtwebkit-2.2 with commit 97cb464 <http://gitorious.org/webkit/qtwebkit/commit/97cb464> |