Bug 42634

Summary: [v8] Allow handles to be disposed and WebKit objects to be dereferenced even if their map is already destroyed.
Product: WebKit Reporter: anton muhin <antonm>
Component: WebKit Misc.Assignee: anton muhin <antonm>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Shorter none

Description anton muhin 2010-07-20 06:20:59 PDT
[v8] Allow handles to be disposed and WebKit objects to be dereferenced even if their map is already destroyed.
Comment 1 anton muhin 2010-07-20 07:53:23 PDT
Created attachment 62075 [details]
Shorter
Comment 2 anton muhin 2010-07-20 08:01:23 PDT
I've got longer patch which attacks the problem differently: it introduces additional weak reference callbacks to be used for all mapping in the map being destroyed.  However, I think this simpler approach is better.  One of possible drawbacks: it could mask some other problems as we unconditionally release objects.
Comment 3 Adam Barth 2010-07-20 08:54:51 PDT
Comment on attachment 62075 [details]
Shorter

Yeah, I like this approach better than introducing additional weak callbacks.  This code is really complicated.  I wish there was an easier (i.e., more automatic) way of handling this stuff.  All this manually ref()/deref()/Dispose() business is bad news bears.  Keeps the weak relationships in sync is really tricky.

I think this patch is correct.  Thanks for working in this area.
Comment 4 anton muhin 2010-07-20 09:09:50 PDT
Comment on attachment 62075 [details]
Shorter

Thanks a lot, Adam.
Comment 5 WebKit Commit Bot 2010-07-20 10:21:02 PDT
Comment on attachment 62075 [details]
Shorter

Clearing flags on attachment: 62075

Committed r63751: <http://trac.webkit.org/changeset/63751>
Comment 6 WebKit Commit Bot 2010-07-20 10:21:06 PDT
All reviewed patches have been landed.  Closing bug.