Bug 42634 - [v8] Allow handles to be disposed and WebKit objects to be dereferenced even if their map is already destroyed.
Summary: [v8] Allow handles to be disposed and WebKit objects to be dereferenced even ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: anton muhin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-20 06:20 PDT by anton muhin
Modified: 2010-07-20 10:21 PDT (History)
2 users (show)

See Also:


Attachments
Shorter (5.19 KB, patch)
2010-07-20 07:53 PDT, anton muhin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.