Fix [DAP-ISSUE-136]: Issues related to garbage collection
authorRich Tibbett <richt@opera.com>
Mon, 12 Aug 2013 18:16:00 +1000
changeset 441 b4b2569b4e9b
parent 440 fcbaadc4fd54
child 442 a6ad49819c41
Fix [DAP-ISSUE-136]: Issues related to garbage collection
discovery-api/Overview.html
discovery-api/Overview.src.html
--- a/discovery-api/Overview.html	Mon Aug 12 16:20:17 2013 +1000
+++ b/discovery-api/Overview.html	Mon Aug 12 18:16:00 2013 +1000
@@ -17,9 +17,6 @@
      /* Add better spacing to sections */
      section, .section { margin-bottom: 2em; }
 
-     /* Reduce note & issue render size */
-     .note, .issue { font-size:0.8em; }
-
      /* Add addition spacing to <ol> and <ul> for rule definition */
      ol.rule li, ul.rule li { padding:0.6em; }
 
@@ -222,7 +219,7 @@
       </h1>
       <h2 property="dcterms:issued"
           datatype="xsd:dateTime"
-          content="2013-08-11T20:17:25.000Z"
+          content="2013-08-11T22:14:32.000Z"
           id="w3c-editor-s-draft-12-august-2013">
         <abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft <time class="dt-published"
             datetime="2013-08-12">12 August 2013</time>
@@ -1116,7 +1113,7 @@
             When a <a href="#networkservice"><code>NetworkService</code></a> object is provided to a Web page, the
             <a href="#dfn-user-agent"
                class="internalDFN">user agent</a> <em class="rfc2119"
-               title="MUST">MUST</em> add the <code>url</code> property to the <dfn id=
+               title="MUST">MUST</em> add its <a href="#dom-networkservice-url"><code>url</code></a> to the <dfn id=
                "dfn-entry-script-origin-s-url-whitelist">entry script origin's <abbr title=
                "Uniform Resource Locator">URL</abbr> whitelist</dfn>. This list enables the Web page to override and
                initiate cross-site resource requests towards these URLs, and any sub-resources of these URLs, within
@@ -1132,14 +1129,18 @@
             "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
                class="externalDFN">entry script</a>'s <a href=
                "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
-               class="externalDFN">origin</a> then the <a href="#dfn-user-agent"
+               class="externalDFN">origin</a> or permission to access a given networked service is revoked at any time
+               by the platform or user then the <a href="#dfn-user-agent"
                class="internalDFN">user agent</a> <em class="ct"><em class="rfc2119"
-                title="MUST">MUST</em></em> remove all previously whitelisted urls from the <a href=
+                title="MUST">MUST</em></em> remove its previously whitelisted urls from the <a href=
                 "#dfn-entry-script-origin-s-url-whitelist"
                class="internalDFN">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr>
-               whitelist</a>. There is no persistence to network service selections provided to a web page. It is not
-               possible to access a previously white-listed networked service without the necessary user authorization
-               in all of the following cases:
+               whitelist</a>.
+          </p>
+          <p>
+            There is no implied persistence to networked service sharing provided to a web page. It <em class="rfc2119"
+               title="MUST NOT">MUST NOT</em> be possible to access a previously white-listed networked service without
+               user authorization in all of the following cases:
           </p>
           <ul>
             <li>If the current script is reloaded at any point in the same or different window.
@@ -2571,32 +2572,40 @@
         <span class="secno">10.</span> Garbage collection
       </h2>
       <p>
-        A user agent <em class="rfc2119"
-           title="MUST">MUST</em> only garbage collect a <a href="#networkservices"
-           class="internalDFN"><code>NetworkServices</code></a> object and remove its entry from the <a href=
-           "#dfn-list-of-active-service-managers"
-           class="internalDFN">list of active service managers</a> when the user has navigated away from the <a href=
-           "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
-           class="externalDFN">entry script</a>'s <a href=
-           "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
-           class="externalDFN">origin</a> in which the current <a href="#networkservices"
-           class="internalDFN"><code>NetworkServices</code></a> object was provided.
+        There is an <dfn id="dfn-implied-strong-reference">implied strong reference</dfn> from any IDL attribute in
+        this <abbr title="Application Programming Interface">API</abbr> that returns a pre-existing object to that
+        object.
       </p>
+      <div class="note">
+        <div class="note-title"
+             role="heading"
+             aria-level="3">
+          <span>Note</span>
+        </div>
+        <p class="">
+          For example, if a <a href="#networkservices"
+             class="internalDFN"><code>NetworkServices</code></a> object has one or more <a href=
+             "#dfn-indexed-properties-1"
+             class="internalDFN">indexed properties</a> attached to it then there is a strong reference from that
+             <a href="#networkservices"
+             class="internalDFN"><code>NetworkServices</code></a> object toward each of its <a href=
+             "#dfn-indexed-properties-1"
+             class="internalDFN">indexed properties</a>.
+        </p>
+      </div>
       <p>
-        A user agent <em class="rfc2119"
-           title="MUST NOT">MUST NOT</em> garbage collect individual <a href="#networkservice"
-           class="internalDFN"><code>NetworkService</code></a> objects until their parent <a href="#networkservices"
-           class="internalDFN"><code>NetworkServices</code></a> object has been garbage collected.
-      </p>
-      <p>
-        A user agent <em class="rfc2119"
-           title="MUST">MUST</em> garbage collect the <a href="#networkservice"
-           class="internalDFN"><code>NetworkService</code></a> <a href="#dfn-indexed-properties-1"
-           class="internalDFN">indexed properties</a> of a <a href="#networkservices"
-           class="internalDFN"><code>NetworkServices</code></a> object, passing each indexed property's <code>id</code>
-           attribute as the only argument to the rule for <a href="#dfn-removing-an-available-service"
-           class="internalDFN">removing an available service</a>, when that <a href="#networkservices"
-           class="internalDFN"><code>NetworkServices</code></a> object itself has been garbage-collected.
+        If a <a href="#dfn-user-agent"
+           class="internalDFN">user agent</a> is to <dfn id="dfn-make-disappear">make disappear</dfn> a <a href=
+           "#networkservices"
+           class="internalDFN"><code>NetworkServices</code></a> object (this happens when a <a href=
+           "http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document"
+           class="externalDFN"><code>Document</code></a> object goes away), the <a href="#dfn-user-agent"
+           class="internalDFN">user agent</a> <em class="rfc2119"
+           title="MUST">MUST</em> remove this object from the <a href="#dfn-list-of-active-service-managers"
+           class="internalDFN">list of active service managers</a> and remove the <a href=
+           "#dom-networkservice-url"><code>url</code></a> of each of its <a href="#dfn-indexed-properties-1"
+           class="internalDFN">indexed properties</a> from the <a href="#dfn-entry-script-origin-s-url-whitelist"
+           class="internalDFN">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a>.
       </p>
     </section>
     <section id="use-cases-and-requirements">
--- a/discovery-api/Overview.src.html	Mon Aug 12 16:20:17 2013 +1000
+++ b/discovery-api/Overview.src.html	Mon Aug 12 18:16:00 2013 +1000
@@ -71,9 +71,6 @@
      /* Add better spacing to sections */
      section, .section { margin-bottom: 2em; }
 
-     /* Reduce note & issue render size */
-     .note, .issue { font-size:0.8em; }
-
      /* Add addition spacing to <ol> and <ul> for rule definition */
      ol.rule li, ul.rule li { padding:0.6em; }
 
@@ -616,9 +613,9 @@
           </p>
           <p>
             When a <a href="#networkservice"><code>NetworkService</code></a> object is provided to a Web page, the
-            <a>user agent</a> MUST add the <code>url</code> property to the <dfn>entry script origin's URL
-            whitelist</dfn>. This list enables the Web page to override and initiate cross-site resource requests
-            towards these URLs, and any sub-resources of these URLs, within the current <a href=
+            <a>user agent</a> MUST add its <a href="#dom-networkservice-url"><code>url</code></a> to the <dfn>entry
+            script origin's URL whitelist</dfn>. This list enables the Web page to override and initiate cross-site
+            resource requests towards these URLs, and any sub-resources of these URLs, within the current <a href=
             "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
                class="externalDFN">entry script</a>'s <a href=
                "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
@@ -630,10 +627,14 @@
             "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
                class="externalDFN">entry script</a>'s <a href=
                "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
-               class="externalDFN">origin</a> then the <a>user agent</a> <em class="ct">MUST</em> remove all previously
-               whitelisted urls from the <a>entry script origin's URL whitelist</a>. There is no persistence to network
-               service selections provided to a web page. It is not possible to access a previously white-listed
-               networked service without the necessary user authorization in all of the following cases:
+               class="externalDFN">origin</a> or permission to access a given networked service is revoked at any time
+               by the platform or user then the <a>user agent</a> <em class="ct">MUST</em> remove its previously
+               whitelisted urls from the <a>entry script origin's URL whitelist</a>.
+          </p>
+          <p>
+            There is no implied persistence to networked service sharing provided to a web page. It MUST NOT be
+            possible to access a previously white-listed networked service without user authorization in all of the
+            following cases:
           </p>
           <ul>
             <li>If the current script is reloaded at any point in the same or different window.
@@ -1804,22 +1805,21 @@
         Garbage collection
       </h3>
       <p>
-        A user agent MUST only garbage collect a <a><code>NetworkServices</code></a> object and remove its entry from
-        the <a>list of active service managers</a> when the user has navigated away from the <a href=
-        "http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script"
-           class="externalDFN">entry script</a>'s <a href=
-           "http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin"
-           class="externalDFN">origin</a> in which the current <a><code>NetworkServices</code></a> object was provided.
+        There is an <dfn>implied strong reference</dfn> from any IDL attribute in this API that returns a pre-existing
+        object to that object.
+      </p>
+      <p class="note">
+        For example, if a <a><code>NetworkServices</code></a> object has one or more <a>indexed properties</a> attached
+        to it then there is a strong reference from that <a><code>NetworkServices</code></a> object toward each of its
+        <a>indexed properties</a>.
       </p>
       <p>
-        A user agent MUST NOT garbage collect individual <a><code>NetworkService</code></a> objects until their parent
-        <a><code>NetworkServices</code></a> object has been garbage collected.
-      </p>
-      <p>
-        A user agent MUST garbage collect the <a><code>NetworkService</code></a> <a>indexed properties</a> of a
-        <a><code>NetworkServices</code></a> object, passing each indexed property's <code>id</code> attribute as the
-        only argument to the rule for <a>removing an available service</a>, when that
-        <a><code>NetworkServices</code></a> object itself has been garbage-collected.
+        If a <a>user agent</a> is to <dfn>make disappear</dfn> a <a><code>NetworkServices</code></a> object (this
+        happens when a <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#document"
+           class="externalDFN"><code>Document</code></a> object goes away), the <a>user agent</a> MUST remove this
+           object from the <a>list of active service managers</a> and remove the <a href=
+           "#dom-networkservice-url"><code>url</code></a> of each of its <a>indexed properties</a> from the <a>entry
+           script origin's URL whitelist</a>.
       </p>
     </section>
     <section>