Bug 69466

Summary: Added a simpler mechanism for registering one-off finalizers
Product: WebKit Reporter: Geoffrey Garen <ggaren>
Component: New BugsAssignee: Geoffrey Garen <ggaren>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, oliver, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch oliver: review+

Geoffrey Garen
Reported 2011-10-05 14:39:33 PDT
Added a simpler mechanism for registering one-off finalizers
Attachments
Patch (13.47 KB, patch)
2011-10-05 14:42 PDT, Geoffrey Garen
oliver: review+
Geoffrey Garen
Comment 1 2011-10-05 14:42:07 PDT
Geoffrey Garen
Comment 2 2011-10-05 15:43:33 PDT
Adam Roben (:aroben)
Comment 3 2011-10-05 15:49:41 PDT
Comment on attachment 109864 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=109864&action=review > Source/JavaScriptCore/heap/Heap.cpp:706 > + Weak<JSCell> weak(*globalData(), cell, &m_finalizerOwner, reinterpret_cast<void*>(finalizer)); I'm surprised a cast is needed here.
Geoffrey Garen
Comment 4 2011-10-05 18:57:34 PDT
> I'm surprised a cast is needed here. C/C++ are based on an abstract machine in which pointers to data (which includes void*) and pointers to functions might be in different address spaces or of different sizes, or where one might be a direct pointer and the other a handle. So, in theory, casting between the two is illegal. That's why reinterpret_cast is required here.
Ryosuke Niwa
Comment 6 2011-10-05 19:52:01 PDT
Note You need to log in before you can comment on or make changes to this bug.