From ad3dda51552aeeeea60540c7f1b513fe45b486a5 Mon Sep 17 00:00:00 2001 From: Matt Falkenhagen Date: Sat, 11 Aug 2018 03:18:45 +0900 Subject: [PATCH] Return the completion record result from running a script The Service Worker spec will use this to detect uncaught runtime errors: https://github.com/w3c/ServiceWorker/issues/1334. --- source | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/source b/source index 60fb32e02a9..0729e64f361 100644 --- a/source +++ b/source @@ -81974,10 +81974,11 @@ interface Location { // but see also running the - classic script script. If evaluation was unsuccessful, let - result be undefined instead. (The result will also be undefined if scripting is disabled.)

+
  • Let evaluationStatus be the result of running the classic script script.

  • + +
  • Let result be undefined if evaluationStatus is an abrupt + completion, or evaluationStatus.[[Value]] otherwise.

  • Let response be null.

  • @@ -87371,7 +87372,7 @@ interface ApplicationCache : EventTarget {
  • Let settings be the settings object of script.

  • Check if we can run script with settings. If this returns "do - not run" then return.

  • + not run" then return NormalCompletion(undefined).

  • Prepare to run script given settings.

  • @@ -87426,7 +87427,7 @@ interface ApplicationCache : EventTarget {
  • Clean up after running script with settings.

  • -
  • Return undefined.

  • +
  • Return evaluationStatus.

  • @@ -87436,7 +87437,7 @@ interface ApplicationCache : EventTarget {
  • If evaluationStatus is a normal completion, return - evaluationStatus.[[Value]].

    + evaluationStatus.

    This value is only ever used by the javascript: URL steps.

    @@ -87444,7 +87445,9 @@ interface ApplicationCache : EventTarget {
  • If we've reached this point, evaluationStatus was left as null because the script was aborted prematurely during evaluation. - Return undefined.

  • + Return Completion { [[Type]]: throw, [[Value]]: a new + "QuotaExceededError" DOMException, [[Target]]: empty }. +

    To run a module script given a module script @@ -87456,7 +87459,7 @@ interface ApplicationCache : EventTarget {

  • Let settings be the settings object of script.

  • Check if we can run script with settings. If this returns "do - not run" then return.

  • + not run" then return NormalCompletion(undefined).

  • Prepare to run script given settings.

  • @@ -87485,7 +87488,7 @@ interface ApplicationCache : EventTarget { evaluationStatus to Completion { [[Type]]: throw, [[Value]]: a new "QuotaExceededError" DOMException, [[Target]]: empty }.

    - + @@ -87502,6 +87505,8 @@ interface ApplicationCache : EventTarget {
  • Clean up after running script with settings.

  • + +
  • Return evaluationStatus.

  • The steps to check if we can run script with an environment settings