Fix [DAP-ISSUE-136]: Issues related to garbage collection
authorRich Tibbett <richt@opera.com>
Mon, 12 Aug 2013 18:16:00 +1000
changeset 441b4b2569b4e9b
parent 440 fcbaadc4fd54
child 442 a6ad49819c41
Fix [DAP-ISSUE-136]: Issues related to garbage collection
discovery-api/Overview.html
discovery-api/Overview.src.html
     1.1 --- a/discovery-api/Overview.html	Mon Aug 12 16:20:17 2013 +1000
     1.2 +++ b/discovery-api/Overview.html	Mon Aug 12 18:16:00 2013 +1000
     1.3 @@ -17,9 +17,6 @@
     1.4       /* Add better spacing to sections */
     1.5       section, .section { margin-bottom: 2em; }
     1.6  
     1.7 -     /* Reduce note & issue render size */
     1.8 -     .note, .issue { font-size:0.8em; }
     1.9 -
    1.10       /* Add addition spacing to <ol> and <ul> for rule definition */
    1.11       ol.rule li, ul.rule li { padding:0.6em; }
    1.12  
    1.13 @@ -222,7 +219,7 @@
    1.14        </h1>
    1.15        <h2 property="dcterms:issued"
    1.16            datatype="xsd:dateTime"
    1.17 -          content="2013-08-11T20:17:25.000Z"
    1.18 +          content="2013-08-11T22:14:32.000Z"
    1.19            id="w3c-editor-s-draft-12-august-2013">
    1.20          <abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published"
    1.21              datetime="2013-08-12">12 August 2013</time>
    1.22 @@ -1116,7 +1113,7 @@
    1.23              When a <a href="#networkservice"><code>NetworkService</code></a> object is provided to a Web page, the
    1.24              <a href="#dfn-user-agent"
    1.25                 class="internalDFN">user agent</a> <em class="rfc2119"
    1.26 -               title="MUST">MUST</em> add the <code>url</code> property to the <dfn id=
    1.27 +               title="MUST">MUST</em> add its <a href="#dom-networkservice-url"><code>url</code></a> to the <dfn id=
    1.28                 "dfn-entry-script-origin-s-url-whitelist">entry script origin's <abbr title=
    1.29                 "Uniform Resource Locator">URL</abbr> whitelist</dfn>. This list enables the Web page to override and
    1.30                 initiate cross-site resource requests towards these URLs, and any sub-resources of these URLs, within
    1.31 @@ -1132,14 +1129,18 @@
    1.32              "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
    1.33                 class="externalDFN">entry script</a>'s <a href=
    1.34                 "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
    1.35 -               class="externalDFN">origin</a> then the <a href="#dfn-user-agent"
    1.36 +               class="externalDFN">origin</a> or permission to access a given networked service is revoked at any time
    1.37 +               by the platform or user then the <a href="#dfn-user-agent"
    1.38                 class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119"
    1.39 -                title="MUST">MUST</em></em> remove all previously whitelisted urls from the <a href=
    1.40 +                title="MUST">MUST</em></em> remove its previously whitelisted urls from the <a href=
    1.41                  "#dfn-entry-script-origin-s-url-whitelist"
    1.42                 class="internalDFN">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr>
    1.43 -               whitelist</a>. There is no persistence to network service selections provided to a web page. It is not
    1.44 -               possible to access a previously white-listed networked service without the necessary user authorization
    1.45 -               in all of the following cases:
    1.46 +               whitelist</a>.
    1.47 +          </p>
    1.48 +          <p>
    1.49 +            There is no implied persistence to networked service sharing provided to a web page. It <em class="rfc2119"
    1.50 +               title="MUST NOT">MUST NOT</em> be possible to access a previously white-listed networked service without
    1.51 +               user authorization in all of the following cases:
    1.52            </p>
    1.53            <ul>
    1.54              <li>If the current script is reloaded at any point in the same or different window.
    1.55 @@ -2571,32 +2572,40 @@
    1.56          <span class="secno">10.</span> Garbage collection
    1.57        </h2>
    1.58        <p>
    1.59 -        A user agent <em class="rfc2119"
    1.60 -           title="MUST">MUST</em> only garbage collect a <a href="#networkservices"
    1.61 -           class="internalDFN"><code>NetworkServices</code></a> object and remove its entry from the <a href=
    1.62 -           "#dfn-list-of-active-service-managers"
    1.63 -           class="internalDFN">list of active service managers</a> when the user has navigated away from the <a href=
    1.64 -           "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
    1.65 -           class="externalDFN">entry script</a>'s <a href=
    1.66 -           "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
    1.67 -           class="externalDFN">origin</a> in which the current <a href="#networkservices"
    1.68 -           class="internalDFN"><code>NetworkServices</code></a> object was provided.
    1.69 +        There is an <dfn id="dfn-implied-strong-reference">implied strong reference</dfn> from any IDL attribute in
    1.70 +        this <abbr title="Application Programming Interface">API</abbr> that returns a pre-existing object to that
    1.71 +        object.
    1.72        </p>
    1.73 +      <div class="note">
    1.74 +        <div class="note-title"
    1.75 +             role="heading"
    1.76 +             aria-level="3">
    1.77 +          <span>Note</span>
    1.78 +        </div>
    1.79 +        <p class="">
    1.80 +          For example, if a <a href="#networkservices"
    1.81 +             class="internalDFN"><code>NetworkServices</code></a> object has one or more <a href=
    1.82 +             "#dfn-indexed-properties-1"
    1.83 +             class="internalDFN">indexed properties</a> attached to it then there is a strong reference from that
    1.84 +             <a href="#networkservices"
    1.85 +             class="internalDFN"><code>NetworkServices</code></a> object toward each of its <a href=
    1.86 +             "#dfn-indexed-properties-1"
    1.87 +             class="internalDFN">indexed properties</a>.
    1.88 +        </p>
    1.89 +      </div>
    1.90        <p>
    1.91 -        A user agent <em class="rfc2119"
    1.92 -           title="MUST NOT">MUST NOT</em> garbage collect individual <a href="#networkservice"
    1.93 -           class="internalDFN"><code>NetworkService</code></a> objects until their parent <a href="#networkservices"
    1.94 -           class="internalDFN"><code>NetworkServices</code></a> object has been garbage collected.
    1.95 -      </p>
    1.96 -      <p>
    1.97 -        A user agent <em class="rfc2119"
    1.98 -           title="MUST">MUST</em> garbage collect the <a href="#networkservice"
    1.99 -           class="internalDFN"><code>NetworkService</code></a> <a href="#dfn-indexed-properties-1"
   1.100 -           class="internalDFN">indexed properties</a> of a <a href="#networkservices"
   1.101 -           class="internalDFN"><code>NetworkServices</code></a> object, passing each indexed property's <code>id</code>
   1.102 -           attribute as the only argument to the rule for <a href="#dfn-removing-an-available-service"
   1.103 -           class="internalDFN">removing an available service</a>, when that <a href="#networkservices"
   1.104 -           class="internalDFN"><code>NetworkServices</code></a> object itself has been garbage-collected.
   1.105 +        If a <a href="#dfn-user-agent"
   1.106 +           class="internalDFN">user agent</a> is to <dfn id="dfn-make-disappear">make disappear</dfn> a <a href=
   1.107 +           "#networkservices"
   1.108 +           class="internalDFN"><code>NetworkServices</code></a> object (this happens when a <a href=
   1.109 +           "http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document"
   1.110 +           class="externalDFN"><code>Document</code></a> object goes away), the <a href="#dfn-user-agent"
   1.111 +           class="internalDFN">user agent</a> <em class="rfc2119"
   1.112 +           title="MUST">MUST</em> remove this object from the <a href="#dfn-list-of-active-service-managers"
   1.113 +           class="internalDFN">list of active service managers</a> and remove the <a href=
   1.114 +           "#dom-networkservice-url"><code>url</code></a> of each of its <a href="#dfn-indexed-properties-1"
   1.115 +           class="internalDFN">indexed properties</a> from the <a href="#dfn-entry-script-origin-s-url-whitelist"
   1.116 +           class="internalDFN">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a>.
   1.117        </p>
   1.118      </section>
   1.119      <section id="use-cases-and-requirements">
     2.1 --- a/discovery-api/Overview.src.html	Mon Aug 12 16:20:17 2013 +1000
     2.2 +++ b/discovery-api/Overview.src.html	Mon Aug 12 18:16:00 2013 +1000
     2.3 @@ -71,9 +71,6 @@
     2.4       /* Add better spacing to sections */
     2.5       section, .section { margin-bottom: 2em; }
     2.6  
     2.7 -     /* Reduce note & issue render size */
     2.8 -     .note, .issue { font-size:0.8em; }
     2.9 -
    2.10       /* Add addition spacing to <ol> and <ul> for rule definition */
    2.11       ol.rule li, ul.rule li { padding:0.6em; }
    2.12  
    2.13 @@ -616,9 +613,9 @@
    2.14            </p>
    2.15            <p>
    2.16              When a <a href="#networkservice"><code>NetworkService</code></a> object is provided to a Web page, the
    2.17 -            <a>user agent</a> MUST add the <code>url</code> property to the <dfn>entry script origin's URL
    2.18 -            whitelist</dfn>. This list enables the Web page to override and initiate cross-site resource requests
    2.19 -            towards these URLs, and any sub-resources of these URLs, within the current <a href=
    2.20 +            <a>user agent</a> MUST add its <a href="#dom-networkservice-url"><code>url</code></a> to the <dfn>entry
    2.21 +            script origin's URL whitelist</dfn>. This list enables the Web page to override and initiate cross-site
    2.22 +            resource requests towards these URLs, and any sub-resources of these URLs, within the current <a href=
    2.23              "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
    2.24                 class="externalDFN">entry script</a>'s <a href=
    2.25                 "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
    2.26 @@ -630,10 +627,14 @@
    2.27              "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
    2.28                 class="externalDFN">entry script</a>'s <a href=
    2.29                 "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
    2.30 -               class="externalDFN">origin</a> then the <a>user agent</a> <em class="ct">MUST</em> remove all previously
    2.31 -               whitelisted urls from the <a>entry script origin's URL whitelist</a>. There is no persistence to network
    2.32 -               service selections provided to a web page. It is not possible to access a previously white-listed
    2.33 -               networked service without the necessary user authorization in all of the following cases:
    2.34 +               class="externalDFN">origin</a> or permission to access a given networked service is revoked at any time
    2.35 +               by the platform or user then the <a>user agent</a> <em class="ct">MUST</em> remove its previously
    2.36 +               whitelisted urls from the <a>entry script origin's URL whitelist</a>.
    2.37 +          </p>
    2.38 +          <p>
    2.39 +            There is no implied persistence to networked service sharing provided to a web page. It MUST NOT be
    2.40 +            possible to access a previously white-listed networked service without user authorization in all of the
    2.41 +            following cases:
    2.42            </p>
    2.43            <ul>
    2.44              <li>If the current script is reloaded at any point in the same or different window.
    2.45 @@ -1804,22 +1805,21 @@
    2.46          Garbage collection
    2.47        </h3>
    2.48        <p>
    2.49 -        A user agent MUST only garbage collect a <a><code>NetworkServices</code></a> object and remove its entry from
    2.50 -        the <a>list of active service managers</a> when the user has navigated away from the <a href=
    2.51 -        "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
    2.52 -           class="externalDFN">entry script</a>'s <a href=
    2.53 -           "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
    2.54 -           class="externalDFN">origin</a> in which the current <a><code>NetworkServices</code></a> object was provided.
    2.55 +        There is an <dfn>implied strong reference</dfn> from any IDL attribute in this API that returns a pre-existing
    2.56 +        object to that object.
    2.57 +      </p>
    2.58 +      <p class="note">
    2.59 +        For example, if a <a><code>NetworkServices</code></a> object has one or more <a>indexed properties</a> attached
    2.60 +        to it then there is a strong reference from that <a><code>NetworkServices</code></a> object toward each of its
    2.61 +        <a>indexed properties</a>.
    2.62        </p>
    2.63        <p>
    2.64 -        A user agent MUST NOT garbage collect individual <a><code>NetworkService</code></a> objects until their parent
    2.65 -        <a><code>NetworkServices</code></a> object has been garbage collected.
    2.66 -      </p>
    2.67 -      <p>
    2.68 -        A user agent MUST garbage collect the <a><code>NetworkService</code></a> <a>indexed properties</a> of a
    2.69 -        <a><code>NetworkServices</code></a> object, passing each indexed property's <code>id</code> attribute as the
    2.70 -        only argument to the rule for <a>removing an available service</a>, when that
    2.71 -        <a><code>NetworkServices</code></a> object itself has been garbage-collected.
    2.72 +        If a <a>user agent</a> is to <dfn>make disappear</dfn> a <a><code>NetworkServices</code></a> object (this
    2.73 +        happens when a <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document"
    2.74 +           class="externalDFN"><code>Document</code></a> object goes away), the <a>user agent</a> MUST remove this
    2.75 +           object from the <a>list of active service managers</a> and remove the <a href=
    2.76 +           "#dom-networkservice-url"><code>url</code></a> of each of its <a>indexed properties</a> from the <a>entry
    2.77 +           script origin's URL whitelist</a>.
    2.78        </p>
    2.79      </section>
    2.80      <section>