[Webkit-unassigned] [Bug 28433] New: Associated objects set via 10.6 obj-c API are lost

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 18 11:13:21 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=28433

           Summary: Associated objects set via 10.6 obj-c API are lost
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: andy at andymatuschak.org
                CC: simon.fraser at apple.com


Created an attachment (id=35053)
 --> (https://bugs.webkit.org/attachment.cgi?id=35053)
Reduced test case demonstrating the faulty behavior

Snow Leopard introduces a new API called associated objects:
objc_setAssociatedObject and objc_getAssociatedObject can be used to basically
treat any objcet like a big dictionary. This is especially useful when writing
categories on DOM objects if one wants to store any kind of instance data at
all.

Unfortunately, DOM objects seem to "lose" the associated objects, even when
keeping the same memory address and having otherwise all the same properties
from request to request.

Please see the attached reduced test case: when clicking "Set Value", the app
sets an associated object on the web view and on a DOM element inside. When the
user clicks "Get Value", it fetches those values again and displays the
results.

At time of writing, the WebView successfully stores the saved value ("Test
value"), but the DOM element does not.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list