RESOLVED FIXED Bug 69466
Added a simpler mechanism for registering one-off finalizers
https://bugs.webkit.org/show_bug.cgi?id=69466
Summary Added a simpler mechanism for registering one-off finalizers
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.