Bug 31380 - DOM Wrappers for some nodes may not be marked.
Summary: DOM Wrappers for some nodes may not be marked.
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2009-11-11 15:31 PST by Gavin Barraclough
Modified: 2009-11-11 17:00 PST (History)
1 user (show)

See Also:

The patch (7.16 KB, patch)
2009-11-11 15:52 PST, Gavin Barraclough
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2009-11-11 15:31:03 PST
Some markChildren methods are calling getCachedDOMNodeWrapper, which will find the wrapper for the current world only.  This means that wrappers may be GC'ed prematurely, and properties lost.

Move to a model more like markDOMObjectWrapper, mark wrappers for all worlds.
Comment 1 Gavin Barraclough 2009-11-11 15:52:34 PST
Created attachment 43014 [details]
The patch
Comment 2 Gavin Barraclough 2009-11-11 17:00:39 PST
Sending        WebCore/ChangeLog
Sending        WebCore/bindings/js/JSAttrCustom.cpp
Sending        WebCore/bindings/js/JSDOMBinding.cpp
Sending        WebCore/bindings/js/JSDOMBinding.h
Sending        WebCore/bindings/js/JSNamedNodeMapCustom.cpp
Sending        WebCore/bindings/js/JSNodeCustom.cpp
Sending        WebCore/bindings/js/JSSVGElementInstanceCustom.cpp
Sending        WebCore/bindings/js/JSStyleSheetCustom.cpp
Transmitting file data ........
Committed revision 50850.