WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 107877
78302
[ActiveDOMObject] attribute should be inherited
https://bugs.webkit.org/show_bug.cgi?id=78302
Summary
[ActiveDOMObject] attribute should be inherited
Kentaro Hara
Reported
2012-02-09 17:54:24 PST
If interface B inherits interface A and interface A has [ActiveDOMObject], then interface B should have [ActiveDOMObject].
Attachments
Add attachment
proposed patch, testcase, etc.
Adam Barth
Comment 1
2012-02-09 18:05:41 PST
Isn't any case where we don't do this a bug because the wrappers get GCed too early?
Kentaro Hara
Comment 2
2012-02-09 18:16:24 PST
I searched the code base and confirmed that DedicatedWorkerContext and SharedWorkerContext are the only interfaces that do not have [ActiveDOMObject] but inherit an interface with [ActiveDOMObject]. I agree that this would be a bug. Though I am not familiar with workers and have not yet written tests which causes the bug.
Adam Barth
Comment 3
2012-02-09 18:21:04 PST
It might be hard to write such a test because code running in workers can only see one global object and any function would retain its global object by another means.
Kentaro Hara
Comment 4
2012-02-09 18:23:55 PST
(In reply to
comment #3
)
> It might be hard to write such a test because code running in workers can only see one global object and any function would retain its global object by another means.
Thanks! Then is it OK to add [ActiveDOMObject] to DedicatedWorkerContext and SharedWorkerContext without tests? (After that patch is landed, I can work on IDL attribute inheritance if needed.)
Adam Barth
Comment 5
2012-02-09 18:41:41 PST
Sounds like a good plan.
Kentaro Hara
Comment 6
2012-02-10 05:54:13 PST
(In reply to
comment #2
)
> I searched the code base and confirmed that DedicatedWorkerContext and SharedWorkerContext are the only interfaces that do not have [ActiveDOMObject] but inherit an interface with [ActiveDOMObject].
Correction: I confirmed that all interfaces which inherits an [ActiveDOMObject] interface has [ActiveDOMObject]. (Nit: "grep -r ': Worker' *" told me DedicatedWorkerContext and SharedWorkerContext, and I thought that they inherit Worker. But actually they inherit WorkerContext:-)
Darin Adler
Comment 7
2012-02-13 15:40:49 PST
The only reason we don’t do this already is that interface generation never involves reading the IDL of base classes. So mechanically there is no straightforward way to do inheritance. The concept of inheriting automatically seems fine. The real issue is just the mechanics of how we’d compile IDLs to accomplish this. I think it would be even better to not need [ActiveDOMObject] at all; maybe there’s a compile time trick we can do with templates or something like that to automatically figure out if the implementation class derives from ActiveDOMObject.
Kentaro Hara
Comment 8
2013-01-30 00:47:14 PST
*** This bug has been marked as a duplicate of
bug 107877
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug