<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>78302</bug_id>
          
          <creation_ts>2012-02-09 17:54:24 -0800</creation_ts>
          <short_desc>[ActiveDOMObject] attribute should be inherited</short_desc>
          <delta_ts>2013-01-30 00:47:14 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore JavaScript</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>107877</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kentaro Hara">haraken</reporter>
          <assigned_to name="Kentaro Hara">haraken</assigned_to>
          <cc>abarth</cc>
    
    <cc>darin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>553654</commentid>
    <comment_count>0</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-02-09 17:54:24 -0800</bug_when>
    <thetext>If interface B inherits interface A and interface A has [ActiveDOMObject], then interface B should have [ActiveDOMObject].</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>553673</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-02-09 18:05:41 -0800</bug_when>
    <thetext>Isn&apos;t any case where we don&apos;t do this a bug because the wrappers get GCed too early?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>553690</commentid>
    <comment_count>2</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-02-09 18:16:24 -0800</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>553696</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-02-09 18:21:04 -0800</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>553698</commentid>
    <comment_count>4</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-02-09 18:23:55 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; 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.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>553712</commentid>
    <comment_count>5</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2012-02-09 18:41:41 -0800</bug_when>
    <thetext>Sounds like a good plan.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>554041</commentid>
    <comment_count>6</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-02-10 05:54:13 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; 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: &quot;grep -r &apos;: Worker&apos; *&quot; told me DedicatedWorkerContext and SharedWorkerContext, and I thought that they inherit Worker. But actually they inherit WorkerContext:-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>555684</commentid>
    <comment_count>7</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2012-02-13 15:40:49 -0800</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>819895</commentid>
    <comment_count>8</comment_count>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2013-01-30 00:47:14 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 107877 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>