⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 227898 in webkit


Ignore:
Timestamp:
Jan 31, 2018, 2:18:28 AM (9 years ago)
Author:
sbarati@apple.com
Message:

JSC incorrectly interpreting script, sets Global Property instead of Global Lexical variable (LiteralParser / JSONP path)
​https://bugs.webkit.org/show_bug.cgi?id=182074
<rdar://problem/36846261>

Reviewed by Mark Lam.

JSTests:

  • stress/jsonp-program-evaluate-path-must-consider-global-lexical-environment.js: Added.

(assert):
(let.func):
(let.o.foo):
(varFunc):

LayoutTests/imported/w3c:

  • web-platform-tests/service-workers/service-worker/import-scripts-updated-flag.https-expected.txt:

Source/JavaScriptCore:

This patch teaches the JSONP evaluator about the global lexical environment.
Before, it was using the global object as the global scope, but that's wrong.
The global lexical environment is the first node in the global scope chain.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::executeProgram):

  • jsc.cpp:

(GlobalObject::finishCreation):
(shellSupportsRichSourceInfo):
(functionDisableRichSourceInfo):

  • runtime/LiteralParser.cpp:

(JSC::LiteralParser<CharType>::tryJSONPParse):

  • runtime/LiteralParser.h:

LayoutTests:

  • http/tests/security/regress-52192-expected.txt:
Location:
trunk
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r227780 r227898  
     12018-01-31  Saam Barati  <sbarati@apple.com>
     2
     3        JSC incorrectly interpreting script, sets Global Property instead of Global Lexical variable (LiteralParser / JSONP path)
     4        https://bugs.webkit.org/show_bug.cgi?id=182074
     5        <rdar://problem/36846261>
     6
     7        Reviewed by Mark Lam.
     8
     9        * stress/jsonp-program-evaluate-path-must-consider-global-lexical-environment.js: Added.
     10        (assert):
     11        (let.func):
     12        (let.o.foo):
     13        (varFunc):
     14
    1152018-01-30  Yusuke Suzuki  <utatane.tea@gmail.com>
    216
  • trunk/LayoutTests/ChangeLog

    r227875 r227898  
     12018-01-31  Saam Barati  <sbarati@apple.com>
     2
     3        JSC incorrectly interpreting script, sets Global Property instead of Global Lexical variable (LiteralParser / JSONP path)
     4        https://bugs.webkit.org/show_bug.cgi?id=182074
     5        <rdar://problem/36846261>
     6
     7        Reviewed by Mark Lam.
     8
     9        * http/tests/security/regress-52192-expected.txt:
     10
    1112018-01-30  John Wilander  <wilander@apple.com>
    212
  • trunk/LayoutTests/http/tests/security/regress-52192-expected.txt

    r202460 r227898  
    872872CONSOLE MESSAGE: line 36: OtherScriptError: Error thrown from other script with Secret
    873873CONSOLE MESSAGE: line 42:
    874 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    875 CONSOLE MESSAGE: line 9:    [case 33] var e = new Error('Error thrown from other script with Secret');
    876 CONSOLE MESSAGE: line 11:    [case 33] e.name = 'OtherScriptError'
    877 CONSOLE MESSAGE: line 17:       [Error] e = 'OtherScriptError: Error thrown from other script with Secret'
    878 CONSOLE MESSAGE: line 18:       [Error] e.name = 'OtherScriptError'
    879 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
    880 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'OtherScriptError: Error thrown from other script with Secret'
     874CONSOLE MESSAGE: line 43: Test thrown EvalError from a script from another domain
     875CONSOLE MESSAGE: line 9:    [case 33] var e = new EvalError('Error thrown from other script with Secret');
     876CONSOLE MESSAGE: line 11:    [case 33] e.name = 'OtherScriptEvalError'
     877CONSOLE MESSAGE: line 17:       [EvalError] e = 'OtherScriptEvalError: Error thrown from other script with Secret'
     878CONSOLE MESSAGE: line 18:       [EvalError] e.name = 'OtherScriptEvalError'
     879CONSOLE MESSAGE: line 19:       [EvalError] e.message = 'Error thrown from other script with Secret'
     880CONSOLE MESSAGE: line 20:       [EvalError] e.toString() = 'OtherScriptEvalError: Error thrown from other script with Secret'
    881881CONSOLE MESSAGE: line 24:    [case 33] throw e;
    882 CONSOLE MESSAGE: line 31:    [case 33] Caught: OtherScriptError: Error thrown from other script with Secret
     882CONSOLE MESSAGE: line 31:    [case 33] Caught: OtherScriptEvalError: Error thrown from other script with Secret
    883883CONSOLE MESSAGE: line 32:    [case 33]    re-throw e;
    884884CONSOLE MESSAGE: line 47:    [case 33] in window.onerror: err = Script error.
    … …  
    890890CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    891891CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    892 CONSOLE MESSAGE: line 36: OtherScriptError: Error thrown from other script with Secret
    893 CONSOLE MESSAGE: line 42:
    894 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    895 CONSOLE MESSAGE: line 9:    [case 34] var e = new Error('Error thrown from other script with Secret');
    896 CONSOLE MESSAGE: line 11:    [case 34] e.name = 'OtherScriptError'
    897 CONSOLE MESSAGE: line 17:       [Error] e = 'OtherScriptError: Error thrown from other script with Secret'
    898 CONSOLE MESSAGE: line 18:       [Error] e.name = 'OtherScriptError'
    899 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
    900 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'OtherScriptError: Error thrown from other script with Secret'
     892CONSOLE MESSAGE: line 36: OtherScriptEvalError: Error thrown from other script with Secret
     893CONSOLE MESSAGE: line 42:
     894CONSOLE MESSAGE: line 43: Test thrown RangeError from a script from another domain
     895CONSOLE MESSAGE: line 9:    [case 34] var e = new RangeError('Error thrown from other script with Secret');
     896CONSOLE MESSAGE: line 11:    [case 34] e.name = 'OtherScriptRangeError'
     897CONSOLE MESSAGE: line 17:       [RangeError] e = 'OtherScriptRangeError: Error thrown from other script with Secret'
     898CONSOLE MESSAGE: line 18:       [RangeError] e.name = 'OtherScriptRangeError'
     899CONSOLE MESSAGE: line 19:       [RangeError] e.message = 'Error thrown from other script with Secret'
     900CONSOLE MESSAGE: line 20:       [RangeError] e.toString() = 'OtherScriptRangeError: Error thrown from other script with Secret'
    901901CONSOLE MESSAGE: line 24:    [case 34] throw e;
    902 CONSOLE MESSAGE: line 31:    [case 34] Caught: OtherScriptError: Error thrown from other script with Secret
     902CONSOLE MESSAGE: line 31:    [case 34] Caught: OtherScriptRangeError: Error thrown from other script with Secret
    903903CONSOLE MESSAGE: line 32:    [case 34]    re-throw e;
    904904CONSOLE MESSAGE: line 47:    [case 34] in window.onerror: err = Script error.
    … …  
    910910CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    911911CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    912 CONSOLE MESSAGE: line 36: OtherScriptError: Error thrown from other script with Secret
    913 CONSOLE MESSAGE: line 42:
    914 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    915 CONSOLE MESSAGE: line 9:    [case 35] var e = new Error('Error thrown from other script with Secret');
    916 CONSOLE MESSAGE: line 11:    [case 35] e.name = 'OtherScriptError'
    917 CONSOLE MESSAGE: line 17:       [Error] e = 'OtherScriptError: Error thrown from other script with Secret'
    918 CONSOLE MESSAGE: line 18:       [Error] e.name = 'OtherScriptError'
    919 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
    920 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'OtherScriptError: Error thrown from other script with Secret'
     912CONSOLE MESSAGE: line 36: OtherScriptRangeError: Error thrown from other script with Secret
     913CONSOLE MESSAGE: line 42:
     914CONSOLE MESSAGE: line 43: Test thrown ReferenceError from a script from another domain
     915CONSOLE MESSAGE: line 9:    [case 35] var e = new ReferenceError('Error thrown from other script with Secret');
     916CONSOLE MESSAGE: line 11:    [case 35] e.name = 'OtherScriptReferenceError'
     917CONSOLE MESSAGE: line 17:       [ReferenceError] e = 'OtherScriptReferenceError: Error thrown from other script with Secret'
     918CONSOLE MESSAGE: line 18:       [ReferenceError] e.name = 'OtherScriptReferenceError'
     919CONSOLE MESSAGE: line 19:       [ReferenceError] e.message = 'Error thrown from other script with Secret'
     920CONSOLE MESSAGE: line 20:       [ReferenceError] e.toString() = 'OtherScriptReferenceError: Error thrown from other script with Secret'
    921921CONSOLE MESSAGE: line 24:    [case 35] throw e;
    922 CONSOLE MESSAGE: line 31:    [case 35] Caught: OtherScriptError: Error thrown from other script with Secret
     922CONSOLE MESSAGE: line 31:    [case 35] Caught: OtherScriptReferenceError: Error thrown from other script with Secret
    923923CONSOLE MESSAGE: line 32:    [case 35]    re-throw e;
    924924CONSOLE MESSAGE: line 47:    [case 35] in window.onerror: err = Script error.
    … …  
    930930CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    931931CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    932 CONSOLE MESSAGE: line 36: OtherScriptError: Error thrown from other script with Secret
    933 CONSOLE MESSAGE: line 42:
    934 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    935 CONSOLE MESSAGE: line 9:    [case 36] var e = new Error('Error thrown from other script with Secret');
    936 CONSOLE MESSAGE: line 11:    [case 36] e.name = 'OtherScriptError'
    937 CONSOLE MESSAGE: line 17:       [Error] e = 'OtherScriptError: Error thrown from other script with Secret'
    938 CONSOLE MESSAGE: line 18:       [Error] e.name = 'OtherScriptError'
    939 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
    940 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'OtherScriptError: Error thrown from other script with Secret'
     932CONSOLE MESSAGE: line 36: OtherScriptReferenceError: Error thrown from other script with Secret
     933CONSOLE MESSAGE: line 42:
     934CONSOLE MESSAGE: line 43: Test thrown SyntaxError from a script from another domain
     935CONSOLE MESSAGE: line 9:    [case 36] var e = new SyntaxError('Error thrown from other script with Secret');
     936CONSOLE MESSAGE: line 11:    [case 36] e.name = 'OtherScriptSyntaxError'
     937CONSOLE MESSAGE: line 17:       [SyntaxError] e = 'OtherScriptSyntaxError: Error thrown from other script with Secret'
     938CONSOLE MESSAGE: line 18:       [SyntaxError] e.name = 'OtherScriptSyntaxError'
     939CONSOLE MESSAGE: line 19:       [SyntaxError] e.message = 'Error thrown from other script with Secret'
     940CONSOLE MESSAGE: line 20:       [SyntaxError] e.toString() = 'OtherScriptSyntaxError: Error thrown from other script with Secret'
    941941CONSOLE MESSAGE: line 24:    [case 36] throw e;
    942 CONSOLE MESSAGE: line 31:    [case 36] Caught: OtherScriptError: Error thrown from other script with Secret
     942CONSOLE MESSAGE: line 31:    [case 36] Caught: OtherScriptSyntaxError: Error thrown from other script with Secret
    943943CONSOLE MESSAGE: line 32:    [case 36]    re-throw e;
    944944CONSOLE MESSAGE: line 47:    [case 36] in window.onerror: err = Script error.
    … …  
    950950CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    951951CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    952 CONSOLE MESSAGE: line 36: OtherScriptError: Error thrown from other script with Secret
    953 CONSOLE MESSAGE: line 42:
    954 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    955 CONSOLE MESSAGE: line 9:    [case 37] var e = new Error('Error thrown from other script with Secret');
    956 CONSOLE MESSAGE: line 11:    [case 37] e.name = 'OtherScriptError'
    957 CONSOLE MESSAGE: line 17:       [Error] e = 'OtherScriptError: Error thrown from other script with Secret'
    958 CONSOLE MESSAGE: line 18:       [Error] e.name = 'OtherScriptError'
    959 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
    960 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'OtherScriptError: Error thrown from other script with Secret'
     952CONSOLE MESSAGE: line 36: OtherScriptSyntaxError: Error thrown from other script with Secret
     953CONSOLE MESSAGE: line 42:
     954CONSOLE MESSAGE: line 43: Test thrown TypeError from a script from another domain
     955CONSOLE MESSAGE: line 9:    [case 37] var e = new TypeError('Error thrown from other script with Secret');
     956CONSOLE MESSAGE: line 11:    [case 37] e.name = 'OtherScriptTypeError'
     957CONSOLE MESSAGE: line 17:       [TypeError] e = 'OtherScriptTypeError: Error thrown from other script with Secret'
     958CONSOLE MESSAGE: line 18:       [TypeError] e.name = 'OtherScriptTypeError'
     959CONSOLE MESSAGE: line 19:       [TypeError] e.message = 'Error thrown from other script with Secret'
     960CONSOLE MESSAGE: line 20:       [TypeError] e.toString() = 'OtherScriptTypeError: Error thrown from other script with Secret'
    961961CONSOLE MESSAGE: line 24:    [case 37] throw e;
    962 CONSOLE MESSAGE: line 31:    [case 37] Caught: OtherScriptError: Error thrown from other script with Secret
     962CONSOLE MESSAGE: line 31:    [case 37] Caught: OtherScriptTypeError: Error thrown from other script with Secret
    963963CONSOLE MESSAGE: line 32:    [case 37]    re-throw e;
    964964CONSOLE MESSAGE: line 47:    [case 37] in window.onerror: err = Script error.
    … …  
    970970CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    971971CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    972 CONSOLE MESSAGE: line 36: OtherScriptError: Error thrown from other script with Secret
    973 CONSOLE MESSAGE: line 42:
    974 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    975 CONSOLE MESSAGE: line 9:    [case 38] var e = new Error('Error thrown from other script with Secret');
    976 CONSOLE MESSAGE: line 11:    [case 38] e.name = 'OtherScriptError'
    977 CONSOLE MESSAGE: line 17:       [Error] e = 'OtherScriptError: Error thrown from other script with Secret'
    978 CONSOLE MESSAGE: line 18:       [Error] e.name = 'OtherScriptError'
    979 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
    980 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'OtherScriptError: Error thrown from other script with Secret'
     972CONSOLE MESSAGE: line 36: OtherScriptTypeError: Error thrown from other script with Secret
     973CONSOLE MESSAGE: line 42:
     974CONSOLE MESSAGE: line 43: Test thrown URIError from a script from another domain
     975CONSOLE MESSAGE: line 9:    [case 38] var e = new URIError('Error thrown from other script with Secret');
     976CONSOLE MESSAGE: line 11:    [case 38] e.name = 'OtherScriptURIError'
     977CONSOLE MESSAGE: line 17:       [URIError] e = 'OtherScriptURIError: Error thrown from other script with Secret'
     978CONSOLE MESSAGE: line 18:       [URIError] e.name = 'OtherScriptURIError'
     979CONSOLE MESSAGE: line 19:       [URIError] e.message = 'Error thrown from other script with Secret'
     980CONSOLE MESSAGE: line 20:       [URIError] e.toString() = 'OtherScriptURIError: Error thrown from other script with Secret'
    981981CONSOLE MESSAGE: line 24:    [case 38] throw e;
    982 CONSOLE MESSAGE: line 31:    [case 38] Caught: OtherScriptError: Error thrown from other script with Secret
     982CONSOLE MESSAGE: line 31:    [case 38] Caught: OtherScriptURIError: Error thrown from other script with Secret
    983983CONSOLE MESSAGE: line 32:    [case 38]    re-throw e;
    984984CONSOLE MESSAGE: line 47:    [case 38] in window.onerror: err = Script error.
    … …  
    990990CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    991991CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    992 CONSOLE MESSAGE: line 36: OtherScriptError: Error thrown from other script with Secret
     992CONSOLE MESSAGE: line 36: OtherScriptURIError: Error thrown from other script with Secret
    993993CONSOLE MESSAGE: line 42:
    994994CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    … …  
    10201020CONSOLE MESSAGE: line 36: Error: Error thrown from other script with Secret
    10211021CONSOLE MESSAGE: line 42:
    1022 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    1023 CONSOLE MESSAGE: line 9:    [case 40] var e = new Error('Error thrown from other script with Secret');
    1024 CONSOLE MESSAGE: line 11:    [case 40] e.name = 'OtherScriptError'
     1022CONSOLE MESSAGE: line 43: Test thrown EvalError from a script from another domain
     1023CONSOLE MESSAGE: line 9:    [case 40] var e = new EvalError('Error thrown from other script with Secret');
     1024CONSOLE MESSAGE: line 11:    [case 40] e.name = 'OtherScriptEvalError'
    10251025CONSOLE MESSAGE: line 67:    [case 40] in 'name' getter[8]: error.message = 'Error thrown from other script with Secret'
    10261026CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1027 CONSOLE MESSAGE: line 17:       [Error] e = 'GetterErrorName: getter[8] Error thrown from other script with Secret: Error thrown from other script with Secret'
     1027CONSOLE MESSAGE: line 17:       [EvalError] e = 'GetterErrorName: getter[8] Error thrown from other script with Secret: Error thrown from other script with Secret'
    10281028CONSOLE MESSAGE: line 67:    [case 40] in 'name' getter[9]: error.message = 'Error thrown from other script with Secret'
    10291029CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1030 CONSOLE MESSAGE: line 18:       [Error] e.name = 'GetterErrorName: getter[9] Error thrown from other script with Secret'
    1031 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
     1030CONSOLE MESSAGE: line 18:       [EvalError] e.name = 'GetterErrorName: getter[9] Error thrown from other script with Secret'
     1031CONSOLE MESSAGE: line 19:       [EvalError] e.message = 'Error thrown from other script with Secret'
    10321032CONSOLE MESSAGE: line 67:    [case 40] in 'name' getter[10]: error.message = 'Error thrown from other script with Secret'
    10331033CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1034 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'GetterErrorName: getter[10] Error thrown from other script with Secret: Error thrown from other script with Secret'
     1034CONSOLE MESSAGE: line 20:       [EvalError] e.toString() = 'GetterErrorName: getter[10] Error thrown from other script with Secret: Error thrown from other script with Secret'
    10351035CONSOLE MESSAGE: line 24:    [case 40] throw e;
    10361036CONSOLE MESSAGE: line 67:    [case 40] in 'name' getter[11]: error.message = 'Error thrown from other script with Secret'
    … …  
    10481048CONSOLE MESSAGE: line 36: Error: Error thrown from other script with Secret
    10491049CONSOLE MESSAGE: line 42:
    1050 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    1051 CONSOLE MESSAGE: line 9:    [case 41] var e = new Error('Error thrown from other script with Secret');
    1052 CONSOLE MESSAGE: line 11:    [case 41] e.name = 'OtherScriptError'
     1050CONSOLE MESSAGE: line 43: Test thrown RangeError from a script from another domain
     1051CONSOLE MESSAGE: line 9:    [case 41] var e = new RangeError('Error thrown from other script with Secret');
     1052CONSOLE MESSAGE: line 11:    [case 41] e.name = 'OtherScriptRangeError'
    10531053CONSOLE MESSAGE: line 67:    [case 41] in 'name' getter[12]: error.message = 'Error thrown from other script with Secret'
    10541054CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1055 CONSOLE MESSAGE: line 17:       [Error] e = 'GetterErrorName: getter[12] Error thrown from other script with Secret: Error thrown from other script with Secret'
     1055CONSOLE MESSAGE: line 17:       [RangeError] e = 'GetterErrorName: getter[12] Error thrown from other script with Secret: Error thrown from other script with Secret'
    10561056CONSOLE MESSAGE: line 67:    [case 41] in 'name' getter[13]: error.message = 'Error thrown from other script with Secret'
    10571057CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1058 CONSOLE MESSAGE: line 18:       [Error] e.name = 'GetterErrorName: getter[13] Error thrown from other script with Secret'
    1059 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
     1058CONSOLE MESSAGE: line 18:       [RangeError] e.name = 'GetterErrorName: getter[13] Error thrown from other script with Secret'
     1059CONSOLE MESSAGE: line 19:       [RangeError] e.message = 'Error thrown from other script with Secret'
    10601060CONSOLE MESSAGE: line 67:    [case 41] in 'name' getter[14]: error.message = 'Error thrown from other script with Secret'
    10611061CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1062 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'GetterErrorName: getter[14] Error thrown from other script with Secret: Error thrown from other script with Secret'
     1062CONSOLE MESSAGE: line 20:       [RangeError] e.toString() = 'GetterErrorName: getter[14] Error thrown from other script with Secret: Error thrown from other script with Secret'
    10631063CONSOLE MESSAGE: line 24:    [case 41] throw e;
    10641064CONSOLE MESSAGE: line 67:    [case 41] in 'name' getter[15]: error.message = 'Error thrown from other script with Secret'
    … …  
    10761076CONSOLE MESSAGE: line 36: Error: Error thrown from other script with Secret
    10771077CONSOLE MESSAGE: line 42:
    1078 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    1079 CONSOLE MESSAGE: line 9:    [case 42] var e = new Error('Error thrown from other script with Secret');
    1080 CONSOLE MESSAGE: line 11:    [case 42] e.name = 'OtherScriptError'
     1078CONSOLE MESSAGE: line 43: Test thrown ReferenceError from a script from another domain
     1079CONSOLE MESSAGE: line 9:    [case 42] var e = new ReferenceError('Error thrown from other script with Secret');
     1080CONSOLE MESSAGE: line 11:    [case 42] e.name = 'OtherScriptReferenceError'
    10811081CONSOLE MESSAGE: line 67:    [case 42] in 'name' getter[16]: error.message = 'Error thrown from other script with Secret'
    10821082CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1083 CONSOLE MESSAGE: line 17:       [Error] e = 'GetterErrorName: getter[16] Error thrown from other script with Secret: Error thrown from other script with Secret'
     1083CONSOLE MESSAGE: line 17:       [ReferenceError] e = 'GetterErrorName: getter[16] Error thrown from other script with Secret: Error thrown from other script with Secret'
    10841084CONSOLE MESSAGE: line 67:    [case 42] in 'name' getter[17]: error.message = 'Error thrown from other script with Secret'
    10851085CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1086 CONSOLE MESSAGE: line 18:       [Error] e.name = 'GetterErrorName: getter[17] Error thrown from other script with Secret'
    1087 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
     1086CONSOLE MESSAGE: line 18:       [ReferenceError] e.name = 'GetterErrorName: getter[17] Error thrown from other script with Secret'
     1087CONSOLE MESSAGE: line 19:       [ReferenceError] e.message = 'Error thrown from other script with Secret'
    10881088CONSOLE MESSAGE: line 67:    [case 42] in 'name' getter[18]: error.message = 'Error thrown from other script with Secret'
    10891089CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1090 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'GetterErrorName: getter[18] Error thrown from other script with Secret: Error thrown from other script with Secret'
     1090CONSOLE MESSAGE: line 20:       [ReferenceError] e.toString() = 'GetterErrorName: getter[18] Error thrown from other script with Secret: Error thrown from other script with Secret'
    10911091CONSOLE MESSAGE: line 24:    [case 42] throw e;
    10921092CONSOLE MESSAGE: line 67:    [case 42] in 'name' getter[19]: error.message = 'Error thrown from other script with Secret'
    … …  
    11041104CONSOLE MESSAGE: line 36: Error: Error thrown from other script with Secret
    11051105CONSOLE MESSAGE: line 42:
    1106 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    1107 CONSOLE MESSAGE: line 9:    [case 43] var e = new Error('Error thrown from other script with Secret');
    1108 CONSOLE MESSAGE: line 11:    [case 43] e.name = 'OtherScriptError'
     1106CONSOLE MESSAGE: line 43: Test thrown SyntaxError from a script from another domain
     1107CONSOLE MESSAGE: line 9:    [case 43] var e = new SyntaxError('Error thrown from other script with Secret');
     1108CONSOLE MESSAGE: line 11:    [case 43] e.name = 'OtherScriptSyntaxError'
    11091109CONSOLE MESSAGE: line 67:    [case 43] in 'name' getter[20]: error.message = 'Error thrown from other script with Secret'
    11101110CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1111 CONSOLE MESSAGE: line 17:       [Error] e = 'GetterErrorName: getter[20] Error thrown from other script with Secret: Error thrown from other script with Secret'
     1111CONSOLE MESSAGE: line 17:       [SyntaxError] e = 'GetterErrorName: getter[20] Error thrown from other script with Secret: Error thrown from other script with Secret'
    11121112CONSOLE MESSAGE: line 67:    [case 43] in 'name' getter[21]: error.message = 'Error thrown from other script with Secret'
    11131113CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1114 CONSOLE MESSAGE: line 18:       [Error] e.name = 'GetterErrorName: getter[21] Error thrown from other script with Secret'
    1115 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
     1114CONSOLE MESSAGE: line 18:       [SyntaxError] e.name = 'GetterErrorName: getter[21] Error thrown from other script with Secret'
     1115CONSOLE MESSAGE: line 19:       [SyntaxError] e.message = 'Error thrown from other script with Secret'
    11161116CONSOLE MESSAGE: line 67:    [case 43] in 'name' getter[22]: error.message = 'Error thrown from other script with Secret'
    11171117CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1118 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'GetterErrorName: getter[22] Error thrown from other script with Secret: Error thrown from other script with Secret'
     1118CONSOLE MESSAGE: line 20:       [SyntaxError] e.toString() = 'GetterErrorName: getter[22] Error thrown from other script with Secret: Error thrown from other script with Secret'
    11191119CONSOLE MESSAGE: line 24:    [case 43] throw e;
    11201120CONSOLE MESSAGE: line 67:    [case 43] in 'name' getter[23]: error.message = 'Error thrown from other script with Secret'
    … …  
    11321132CONSOLE MESSAGE: line 36: Error: Error thrown from other script with Secret
    11331133CONSOLE MESSAGE: line 42:
    1134 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    1135 CONSOLE MESSAGE: line 9:    [case 44] var e = new Error('Error thrown from other script with Secret');
    1136 CONSOLE MESSAGE: line 11:    [case 44] e.name = 'OtherScriptError'
     1134CONSOLE MESSAGE: line 43: Test thrown TypeError from a script from another domain
     1135CONSOLE MESSAGE: line 9:    [case 44] var e = new TypeError('Error thrown from other script with Secret');
     1136CONSOLE MESSAGE: line 11:    [case 44] e.name = 'OtherScriptTypeError'
    11371137CONSOLE MESSAGE: line 67:    [case 44] in 'name' getter[24]: error.message = 'Error thrown from other script with Secret'
    11381138CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1139 CONSOLE MESSAGE: line 17:       [Error] e = 'GetterErrorName: getter[24] Error thrown from other script with Secret: Error thrown from other script with Secret'
     1139CONSOLE MESSAGE: line 17:       [TypeError] e = 'GetterErrorName: getter[24] Error thrown from other script with Secret: Error thrown from other script with Secret'
    11401140CONSOLE MESSAGE: line 67:    [case 44] in 'name' getter[25]: error.message = 'Error thrown from other script with Secret'
    11411141CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1142 CONSOLE MESSAGE: line 18:       [Error] e.name = 'GetterErrorName: getter[25] Error thrown from other script with Secret'
    1143 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
     1142CONSOLE MESSAGE: line 18:       [TypeError] e.name = 'GetterErrorName: getter[25] Error thrown from other script with Secret'
     1143CONSOLE MESSAGE: line 19:       [TypeError] e.message = 'Error thrown from other script with Secret'
    11441144CONSOLE MESSAGE: line 67:    [case 44] in 'name' getter[26]: error.message = 'Error thrown from other script with Secret'
    11451145CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1146 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'GetterErrorName: getter[26] Error thrown from other script with Secret: Error thrown from other script with Secret'
     1146CONSOLE MESSAGE: line 20:       [TypeError] e.toString() = 'GetterErrorName: getter[26] Error thrown from other script with Secret: Error thrown from other script with Secret'
    11471147CONSOLE MESSAGE: line 24:    [case 44] throw e;
    11481148CONSOLE MESSAGE: line 67:    [case 44] in 'name' getter[27]: error.message = 'Error thrown from other script with Secret'
    … …  
    11601160CONSOLE MESSAGE: line 36: Error: Error thrown from other script with Secret
    11611161CONSOLE MESSAGE: line 42:
    1162 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    1163 CONSOLE MESSAGE: line 9:    [case 45] var e = new Error('Error thrown from other script with Secret');
    1164 CONSOLE MESSAGE: line 11:    [case 45] e.name = 'OtherScriptError'
     1162CONSOLE MESSAGE: line 43: Test thrown URIError from a script from another domain
     1163CONSOLE MESSAGE: line 9:    [case 45] var e = new URIError('Error thrown from other script with Secret');
     1164CONSOLE MESSAGE: line 11:    [case 45] e.name = 'OtherScriptURIError'
    11651165CONSOLE MESSAGE: line 67:    [case 45] in 'name' getter[28]: error.message = 'Error thrown from other script with Secret'
    11661166CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1167 CONSOLE MESSAGE: line 17:       [Error] e = 'GetterErrorName: getter[28] Error thrown from other script with Secret: Error thrown from other script with Secret'
     1167CONSOLE MESSAGE: line 17:       [URIError] e = 'GetterErrorName: getter[28] Error thrown from other script with Secret: Error thrown from other script with Secret'
    11681168CONSOLE MESSAGE: line 67:    [case 45] in 'name' getter[29]: error.message = 'Error thrown from other script with Secret'
    11691169CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1170 CONSOLE MESSAGE: line 18:       [Error] e.name = 'GetterErrorName: getter[29] Error thrown from other script with Secret'
    1171 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
     1170CONSOLE MESSAGE: line 18:       [URIError] e.name = 'GetterErrorName: getter[29] Error thrown from other script with Secret'
     1171CONSOLE MESSAGE: line 19:       [URIError] e.message = 'Error thrown from other script with Secret'
    11721172CONSOLE MESSAGE: line 67:    [case 45] in 'name' getter[30]: error.message = 'Error thrown from other script with Secret'
    11731173CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1174 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'GetterErrorName: getter[30] Error thrown from other script with Secret: Error thrown from other script with Secret'
     1174CONSOLE MESSAGE: line 20:       [URIError] e.toString() = 'GetterErrorName: getter[30] Error thrown from other script with Secret: Error thrown from other script with Secret'
    11751175CONSOLE MESSAGE: line 24:    [case 45] throw e;
    11761176CONSOLE MESSAGE: line 67:    [case 45] in 'name' getter[31]: error.message = 'Error thrown from other script with Secret'
    … …  
    12141214CONSOLE MESSAGE: line 36: OtherScriptError: Error thrown from other script with Secret
    12151215CONSOLE MESSAGE: line 42:
    1216 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    1217 CONSOLE MESSAGE: line 9:    [case 47] var e = new Error('Error thrown from other script with Secret');
    1218 CONSOLE MESSAGE: line 11:    [case 47] e.name = 'OtherScriptError'
     1216CONSOLE MESSAGE: line 43: Test thrown EvalError from a script from another domain
     1217CONSOLE MESSAGE: line 9:    [case 47] var e = new EvalError('Error thrown from other script with Secret');
     1218CONSOLE MESSAGE: line 11:    [case 47] e.name = 'OtherScriptEvalError'
    12191219CONSOLE MESSAGE: line 95:    [case 47] in 'toString' getter[35]: error.message = 'Error thrown from other script with Secret'
    12201220CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1221 CONSOLE MESSAGE: line 17:       [Error] e = 'GetterErrorToString: getter[35] Error thrown from other script with Secret'
    1222 CONSOLE MESSAGE: line 18:       [Error] e.name = 'OtherScriptError'
    1223 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
     1221CONSOLE MESSAGE: line 17:       [EvalError] e = 'GetterErrorToString: getter[35] Error thrown from other script with Secret'
     1222CONSOLE MESSAGE: line 18:       [EvalError] e.name = 'OtherScriptEvalError'
     1223CONSOLE MESSAGE: line 19:       [EvalError] e.message = 'Error thrown from other script with Secret'
    12241224CONSOLE MESSAGE: line 95:    [case 47] in 'toString' getter[36]: error.message = 'Error thrown from other script with Secret'
    12251225CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1226 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'GetterErrorToString: getter[36] Error thrown from other script with Secret'
     1226CONSOLE MESSAGE: line 20:       [EvalError] e.toString() = 'GetterErrorToString: getter[36] Error thrown from other script with Secret'
    12271227CONSOLE MESSAGE: line 24:    [case 47] throw e;
    12281228CONSOLE MESSAGE: line 95:    [case 47] in 'toString' getter[37]: error.message = 'Error thrown from other script with Secret'
    … …  
    12381238CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    12391239CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1240 CONSOLE MESSAGE: line 36: OtherScriptError: Error thrown from other script with Secret
    1241 CONSOLE MESSAGE: line 42:
    1242 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    1243 CONSOLE MESSAGE: line 9:    [case 48] var e = new Error('Error thrown from other script with Secret');
    1244 CONSOLE MESSAGE: line 11:    [case 48] e.name = 'OtherScriptError'
     1240CONSOLE MESSAGE: line 36: OtherScriptEvalError: Error thrown from other script with Secret
     1241CONSOLE MESSAGE: line 42:
     1242CONSOLE MESSAGE: line 43: Test thrown RangeError from a script from another domain
     1243CONSOLE MESSAGE: line 9:    [case 48] var e = new RangeError('Error thrown from other script with Secret');
     1244CONSOLE MESSAGE: line 11:    [case 48] e.name = 'OtherScriptRangeError'
    12451245CONSOLE MESSAGE: line 95:    [case 48] in 'toString' getter[38]: error.message = 'Error thrown from other script with Secret'
    12461246CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1247 CONSOLE MESSAGE: line 17:       [Error] e = 'GetterErrorToString: getter[38] Error thrown from other script with Secret'
    1248 CONSOLE MESSAGE: line 18:       [Error] e.name = 'OtherScriptError'
    1249 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
     1247CONSOLE MESSAGE: line 17:       [RangeError] e = 'GetterErrorToString: getter[38] Error thrown from other script with Secret'
     1248CONSOLE MESSAGE: line 18:       [RangeError] e.name = 'OtherScriptRangeError'
     1249CONSOLE MESSAGE: line 19:       [RangeError] e.message = 'Error thrown from other script with Secret'
    12501250CONSOLE MESSAGE: line 95:    [case 48] in 'toString' getter[39]: error.message = 'Error thrown from other script with Secret'
    12511251CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1252 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'GetterErrorToString: getter[39] Error thrown from other script with Secret'
     1252CONSOLE MESSAGE: line 20:       [RangeError] e.toString() = 'GetterErrorToString: getter[39] Error thrown from other script with Secret'
    12531253CONSOLE MESSAGE: line 24:    [case 48] throw e;
    12541254CONSOLE MESSAGE: line 95:    [case 48] in 'toString' getter[40]: error.message = 'Error thrown from other script with Secret'
    … …  
    12641264CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    12651265CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1266 CONSOLE MESSAGE: line 36: OtherScriptError: Error thrown from other script with Secret
    1267 CONSOLE MESSAGE: line 42:
    1268 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    1269 CONSOLE MESSAGE: line 9:    [case 49] var e = new Error('Error thrown from other script with Secret');
    1270 CONSOLE MESSAGE: line 11:    [case 49] e.name = 'OtherScriptError'
     1266CONSOLE MESSAGE: line 36: OtherScriptRangeError: Error thrown from other script with Secret
     1267CONSOLE MESSAGE: line 42:
     1268CONSOLE MESSAGE: line 43: Test thrown ReferenceError from a script from another domain
     1269CONSOLE MESSAGE: line 9:    [case 49] var e = new ReferenceError('Error thrown from other script with Secret');
     1270CONSOLE MESSAGE: line 11:    [case 49] e.name = 'OtherScriptReferenceError'
    12711271CONSOLE MESSAGE: line 95:    [case 49] in 'toString' getter[41]: error.message = 'Error thrown from other script with Secret'
    12721272CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1273 CONSOLE MESSAGE: line 17:       [Error] e = 'GetterErrorToString: getter[41] Error thrown from other script with Secret'
    1274 CONSOLE MESSAGE: line 18:       [Error] e.name = 'OtherScriptError'
    1275 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
     1273CONSOLE MESSAGE: line 17:       [ReferenceError] e = 'GetterErrorToString: getter[41] Error thrown from other script with Secret'
     1274CONSOLE MESSAGE: line 18:       [ReferenceError] e.name = 'OtherScriptReferenceError'
     1275CONSOLE MESSAGE: line 19:       [ReferenceError] e.message = 'Error thrown from other script with Secret'
    12761276CONSOLE MESSAGE: line 95:    [case 49] in 'toString' getter[42]: error.message = 'Error thrown from other script with Secret'
    12771277CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1278 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'GetterErrorToString: getter[42] Error thrown from other script with Secret'
     1278CONSOLE MESSAGE: line 20:       [ReferenceError] e.toString() = 'GetterErrorToString: getter[42] Error thrown from other script with Secret'
    12791279CONSOLE MESSAGE: line 24:    [case 49] throw e;
    12801280CONSOLE MESSAGE: line 95:    [case 49] in 'toString' getter[43]: error.message = 'Error thrown from other script with Secret'
    … …  
    12901290CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    12911291CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1292 CONSOLE MESSAGE: line 36: OtherScriptError: Error thrown from other script with Secret
    1293 CONSOLE MESSAGE: line 42:
    1294 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    1295 CONSOLE MESSAGE: line 9:    [case 50] var e = new Error('Error thrown from other script with Secret');
    1296 CONSOLE MESSAGE: line 11:    [case 50] e.name = 'OtherScriptError'
     1292CONSOLE MESSAGE: line 36: OtherScriptReferenceError: Error thrown from other script with Secret
     1293CONSOLE MESSAGE: line 42:
     1294CONSOLE MESSAGE: line 43: Test thrown SyntaxError from a script from another domain
     1295CONSOLE MESSAGE: line 9:    [case 50] var e = new SyntaxError('Error thrown from other script with Secret');
     1296CONSOLE MESSAGE: line 11:    [case 50] e.name = 'OtherScriptSyntaxError'
    12971297CONSOLE MESSAGE: line 95:    [case 50] in 'toString' getter[44]: error.message = 'Error thrown from other script with Secret'
    12981298CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1299 CONSOLE MESSAGE: line 17:       [Error] e = 'GetterErrorToString: getter[44] Error thrown from other script with Secret'
    1300 CONSOLE MESSAGE: line 18:       [Error] e.name = 'OtherScriptError'
    1301 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
     1299CONSOLE MESSAGE: line 17:       [SyntaxError] e = 'GetterErrorToString: getter[44] Error thrown from other script with Secret'
     1300CONSOLE MESSAGE: line 18:       [SyntaxError] e.name = 'OtherScriptSyntaxError'
     1301CONSOLE MESSAGE: line 19:       [SyntaxError] e.message = 'Error thrown from other script with Secret'
    13021302CONSOLE MESSAGE: line 95:    [case 50] in 'toString' getter[45]: error.message = 'Error thrown from other script with Secret'
    13031303CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1304 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'GetterErrorToString: getter[45] Error thrown from other script with Secret'
     1304CONSOLE MESSAGE: line 20:       [SyntaxError] e.toString() = 'GetterErrorToString: getter[45] Error thrown from other script with Secret'
    13051305CONSOLE MESSAGE: line 24:    [case 50] throw e;
    13061306CONSOLE MESSAGE: line 95:    [case 50] in 'toString' getter[46]: error.message = 'Error thrown from other script with Secret'
    … …  
    13161316CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    13171317CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1318 CONSOLE MESSAGE: line 36: OtherScriptError: Error thrown from other script with Secret
    1319 CONSOLE MESSAGE: line 42:
    1320 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    1321 CONSOLE MESSAGE: line 9:    [case 51] var e = new Error('Error thrown from other script with Secret');
    1322 CONSOLE MESSAGE: line 11:    [case 51] e.name = 'OtherScriptError'
     1318CONSOLE MESSAGE: line 36: OtherScriptSyntaxError: Error thrown from other script with Secret
     1319CONSOLE MESSAGE: line 42:
     1320CONSOLE MESSAGE: line 43: Test thrown TypeError from a script from another domain
     1321CONSOLE MESSAGE: line 9:    [case 51] var e = new TypeError('Error thrown from other script with Secret');
     1322CONSOLE MESSAGE: line 11:    [case 51] e.name = 'OtherScriptTypeError'
    13231323CONSOLE MESSAGE: line 95:    [case 51] in 'toString' getter[47]: error.message = 'Error thrown from other script with Secret'
    13241324CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1325 CONSOLE MESSAGE: line 17:       [Error] e = 'GetterErrorToString: getter[47] Error thrown from other script with Secret'
    1326 CONSOLE MESSAGE: line 18:       [Error] e.name = 'OtherScriptError'
    1327 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
     1325CONSOLE MESSAGE: line 17:       [TypeError] e = 'GetterErrorToString: getter[47] Error thrown from other script with Secret'
     1326CONSOLE MESSAGE: line 18:       [TypeError] e.name = 'OtherScriptTypeError'
     1327CONSOLE MESSAGE: line 19:       [TypeError] e.message = 'Error thrown from other script with Secret'
    13281328CONSOLE MESSAGE: line 95:    [case 51] in 'toString' getter[48]: error.message = 'Error thrown from other script with Secret'
    13291329CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1330 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'GetterErrorToString: getter[48] Error thrown from other script with Secret'
     1330CONSOLE MESSAGE: line 20:       [TypeError] e.toString() = 'GetterErrorToString: getter[48] Error thrown from other script with Secret'
    13311331CONSOLE MESSAGE: line 24:    [case 51] throw e;
    13321332CONSOLE MESSAGE: line 95:    [case 51] in 'toString' getter[49]: error.message = 'Error thrown from other script with Secret'
    … …  
    13421342CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    13431343CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1344 CONSOLE MESSAGE: line 36: OtherScriptError: Error thrown from other script with Secret
    1345 CONSOLE MESSAGE: line 42:
    1346 CONSOLE MESSAGE: line 43: Test thrown Error from a script from another domain
    1347 CONSOLE MESSAGE: line 9:    [case 52] var e = new Error('Error thrown from other script with Secret');
    1348 CONSOLE MESSAGE: line 11:    [case 52] e.name = 'OtherScriptError'
     1344CONSOLE MESSAGE: line 36: OtherScriptTypeError: Error thrown from other script with Secret
     1345CONSOLE MESSAGE: line 42:
     1346CONSOLE MESSAGE: line 43: Test thrown URIError from a script from another domain
     1347CONSOLE MESSAGE: line 9:    [case 52] var e = new URIError('Error thrown from other script with Secret');
     1348CONSOLE MESSAGE: line 11:    [case 52] e.name = 'OtherScriptURIError'
    13491349CONSOLE MESSAGE: line 95:    [case 52] in 'toString' getter[50]: error.message = 'Error thrown from other script with Secret'
    13501350CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1351 CONSOLE MESSAGE: line 17:       [Error] e = 'GetterErrorToString: getter[50] Error thrown from other script with Secret'
    1352 CONSOLE MESSAGE: line 18:       [Error] e.name = 'OtherScriptError'
    1353 CONSOLE MESSAGE: line 19:       [Error] e.message = 'Error thrown from other script with Secret'
     1351CONSOLE MESSAGE: line 17:       [URIError] e = 'GetterErrorToString: getter[50] Error thrown from other script with Secret'
     1352CONSOLE MESSAGE: line 18:       [URIError] e.name = 'OtherScriptURIError'
     1353CONSOLE MESSAGE: line 19:       [URIError] e.message = 'Error thrown from other script with Secret'
    13541354CONSOLE MESSAGE: line 95:    [case 52] in 'toString' getter[51]: error.message = 'Error thrown from other script with Secret'
    13551355CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1356 CONSOLE MESSAGE: line 20:       [Error] e.toString() = 'GetterErrorToString: getter[51] Error thrown from other script with Secret'
     1356CONSOLE MESSAGE: line 20:       [URIError] e.toString() = 'GetterErrorToString: getter[51] Error thrown from other script with Secret'
    13571357CONSOLE MESSAGE: line 24:    [case 52] throw e;
    13581358CONSOLE MESSAGE: line 95:    [case 52] in 'toString' getter[52]: error.message = 'Error thrown from other script with Secret'
    … …  
    13681368CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    13691369CONSOLE MESSAGE: line 38: PASSED: Did not see any Secret from another domain
    1370 CONSOLE MESSAGE: line 36: OtherScriptError: Error thrown from other script with Secret
     1370CONSOLE MESSAGE: line 36: OtherScriptURIError: Error thrown from other script with Secret
    13711371Should not be able to read the secret text from another site.
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r227870 r227898  
     12018-01-31  Saam Barati  <sbarati@apple.com>
     2
     3        JSC incorrectly interpreting script, sets Global Property instead of Global Lexical variable (LiteralParser / JSONP path)
     4        https://bugs.webkit.org/show_bug.cgi?id=182074
     5        <rdar://problem/36846261>
     6
     7        Reviewed by Mark Lam.
     8
     9        * web-platform-tests/service-workers/service-worker/import-scripts-updated-flag.https-expected.txt:
     10
    1112018-01-30  Youenn Fablet  <youenn@apple.com> and Oleksandr Skachkov  <gskachkov@gmail.com>
    212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/import-scripts-updated-flag.https-expected.txt

    r224724 r227898  
    1 CONSOLE MESSAGE: line 30: Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'registration.unregister')
    21
    3 FAIL initialize global state assert_unreached: unregister and register should not fail: Error: assert_equals: expected (string) "root" but got (object) null Reached unreachable code
    4 FAIL import script previously imported at worker evaluation time promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'registration.installing')"
    5 FAIL import script previously imported at worker install time promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'registration.installing')"
    6 FAIL import script not previously imported promise_test: Unhandled rejection with value: object "TypeError: undefined is not an object (evaluating 'registration.installing')"
     2PASS initialize global state
     3PASS import script previously imported at worker evaluation time
     4PASS import script previously imported at worker install time
     5FAIL import script not previously imported assert_equals: expected (string) "TypeError" but got (object) null
     6PASS Tests for importScripts: import scripts updated flag
    77
  • trunk/Source/JavaScriptCore/ChangeLog

    r227897 r227898  
     12018-01-31  Saam Barati  <sbarati@apple.com>
     2
     3        JSC incorrectly interpreting script, sets Global Property instead of Global Lexical variable (LiteralParser / JSONP path)
     4        https://bugs.webkit.org/show_bug.cgi?id=182074
     5        <rdar://problem/36846261>
     6
     7        Reviewed by Mark Lam.
     8
     9        This patch teaches the JSONP evaluator about the global lexical environment.
     10        Before, it was using the global object as the global scope, but that's wrong.
     11        The global lexical environment is the first node in the global scope chain.
     12
     13        * interpreter/Interpreter.cpp:
     14        (JSC::Interpreter::executeProgram):
     15        * jsc.cpp:
     16        (GlobalObject::finishCreation):
     17        (shellSupportsRichSourceInfo):
     18        (functionDisableRichSourceInfo):
     19        * runtime/LiteralParser.cpp:
     20        (JSC::LiteralParser<CharType>::tryJSONPParse):
     21        * runtime/LiteralParser.h:
     22
    1232018-01-31  Saam Barati  <sbarati@apple.com>
    224
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r225799 r227898  
    828828            JSONPPath.swap(JSONPData[entry].m_path);
    829829            JSValue JSONPValue = JSONPData[entry].m_value.get();
    830             if (JSONPPath.size() == 1 && JSONPPath[0].m_type == JSONPPathEntryTypeDeclare) {
     830            if (JSONPPath.size() == 1 && JSONPPath[0].m_type == JSONPPathEntryTypeDeclareVar) {
    831831                globalObject->addVar(callFrame, JSONPPath[0].m_pathEntryName);
    832832                RETURN_IF_EXCEPTION(throwScope, { });
    … …  
    839839            JSValue baseObject(globalObject);
    840840            for (unsigned i = 0; i < JSONPPath.size() - 1; i++) {
    841                 ASSERT(JSONPPath[i].m_type != JSONPPathEntryTypeDeclare);
     841                ASSERT(JSONPPath[i].m_type != JSONPPathEntryTypeDeclareVar);
    842842                switch (JSONPPath[i].m_type) {
    843843                case JSONPPathEntryTypeDot: {
    844844                    if (i == 0) {
    845                         PropertySlot slot(globalObject, PropertySlot::InternalMethodType::Get);
    846                         if (!globalObject->getPropertySlot(callFrame, JSONPPath[i].m_pathEntryName, slot)) {
    847                             RETURN_IF_EXCEPTION(throwScope, JSValue());
    848                             if (entry)
    849                                 return throwException(callFrame, throwScope, createUndefinedVariableError(callFrame, JSONPPath[i].m_pathEntryName));
    850                             goto failedJSONP;
     845                        RELEASE_ASSERT(baseObject == globalObject);
     846
     847                        auto doGet = [&] (JSSegmentedVariableObject* scope) {
     848                            PropertySlot slot(scope, PropertySlot::InternalMethodType::Get);
     849                            if (scope->getPropertySlot(callFrame, JSONPPath[i].m_pathEntryName, slot))
     850                                return slot.getValue(callFrame, JSONPPath[i].m_pathEntryName);
     851                            return JSValue();
     852                        };
     853
     854                        JSValue result = doGet(globalObject->globalLexicalEnvironment());
     855                        RETURN_IF_EXCEPTION(throwScope, JSValue());
     856                        if (result) {
     857                            baseObject = result;
     858                            continue;
    851859                        }
    852                         baseObject = slot.getValue(callFrame, JSONPPath[i].m_pathEntryName);
    853                     } else
    854                         baseObject = baseObject.get(callFrame, JSONPPath[i].m_pathEntryName);
     860
     861                        result = doGet(globalObject);
     862                        RETURN_IF_EXCEPTION(throwScope, JSValue());
     863                        if (result) {
     864                            baseObject = result;
     865                            continue;
     866                        }
     867
     868                        if (entry)
     869                            return throwException(callFrame, throwScope, createUndefinedVariableError(callFrame, JSONPPath[i].m_pathEntryName));
     870                        goto failedJSONP;
     871                    }
     872
     873                    baseObject = baseObject.get(callFrame, JSONPPath[i].m_pathEntryName);
    855874                    RETURN_IF_EXCEPTION(throwScope, JSValue());
    856875                    continue;
    … …  
    866885                }
    867886            }
     887
     888            if (JSONPPath.size() == 1 && JSONPPath.last().m_type != JSONPPathEntryTypeLookup) {
     889                RELEASE_ASSERT(baseObject == globalObject);
     890                JSGlobalLexicalEnvironment* scope = globalObject->globalLexicalEnvironment();
     891                if (scope->hasProperty(callFrame, JSONPPath.last().m_pathEntryName))
     892                    baseObject = scope;
     893                RETURN_IF_EXCEPTION(throwScope, JSValue());
     894            }
     895
    868896            PutPropertySlot slot(baseObject);
    869897            switch (JSONPPath.last().m_type) {
    … …  
    878906                jsonArg.append(JSONPValue);
    879907                ASSERT(!jsonArg.hasOverflowed());
    880                 JSValue thisValue = JSONPPath.size() == 1 ? jsUndefined(): baseObject;
     908                JSValue thisValue = JSONPPath.size() == 1 ? jsUndefined() : baseObject;
    881909                JSONPValue = JSC::call(callFrame, function, callType, callData, thisValue, jsonArg);
    882910                RETURN_IF_EXCEPTION(throwScope, JSValue());
    … …  
    895923            default:
    896924                RELEASE_ASSERT_NOT_REACHED();
    897                     return jsUndefined();
     925                return jsUndefined();
    898926            }
    899927            result = JSONPValue;
  • trunk/Source/JavaScriptCore/jsc.cpp

    r226338 r227898  
    342342static EncodedJSValue JSC_HOST_CALL functionHeapCapacity(ExecState*);
    343343static EncodedJSValue JSC_HOST_CALL functionFlashHeapAccess(ExecState*);
     344static EncodedJSValue JSC_HOST_CALL functionDisableRichSourceInfo(ExecState*);
    344345
    345346struct Script {
    … …  
    597598        addFunction(vm, "heapCapacity", functionHeapCapacity, 0);
    598599        addFunction(vm, "flashHeapAccess", functionFlashHeapAccess, 0);
     600
     601        addFunction(vm, "disableRichSourceInfo", functionDisableRichSourceInfo, 0);
    599602    }
    600603   
    … …  
    616619};
    617620
     621static bool supportsRichSourceInfo = true;
     622static bool shellSupportsRichSourceInfo(const JSGlobalObject*)
     623{
     624    return supportsRichSourceInfo;
     625}
     626
    618627const ClassInfo GlobalObject::s_info = { "global", &JSGlobalObject::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(GlobalObject) };
    619628const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = {
    620     &supportsRichSourceInfo,
     629    &shellSupportsRichSourceInfo,
    621630    &shouldInterruptScript,
    622631    &javaScriptRuntimeFlags,
    … …  
    17341743}
    17351744
     1745EncodedJSValue JSC_HOST_CALL functionDisableRichSourceInfo(ExecState*)
     1746{
     1747    supportsRichSourceInfo = false;
     1748    return JSValue::encode(jsUndefined());
     1749}
     1750
    17361751template<typename ValueType>
    17371752typename std::enable_if<!std::is_fundamental<ValueType>::value>::type addOption(VM&, JSObject*, Identifier, ValueType) { }
  • trunk/Source/JavaScriptCore/runtime/LiteralParser.cpp

    r224309 r227898  
    6464            if (m_lexer.next() != TokIdentifier)
    6565                return false;
    66             entry.m_type = JSONPPathEntryTypeDeclare;
     66            entry.m_type = JSONPPathEntryTypeDeclareVar;
    6767            entry.m_pathEntryName = Identifier::fromString(&vm, m_lexer.currentToken()->start, m_lexer.currentToken()->end - m_lexer.currentToken()->start);
    6868            path.append(entry);
    … …  
    7575            return false;
    7676        TokenType tokenType = m_lexer.next();
    77         if (entry.m_type == JSONPPathEntryTypeDeclare && tokenType != TokAssign)
     77        if (entry.m_type == JSONPPathEntryTypeDeclareVar && tokenType != TokAssign)
    7878            return false;
    7979        while (tokenType != TokAssign) {
  • trunk/Source/JavaScriptCore/runtime/LiteralParser.h

    r218794 r227898  
    3737
    3838enum JSONPPathEntryType {
    39     JSONPPathEntryTypeDeclare, // var pathEntryName = JSON
     39    JSONPPathEntryTypeDeclareVar, // var pathEntryName = JSON
    4040    JSONPPathEntryTypeDot, // <prior entries>.pathEntryName = JSON
    4141    JSONPPathEntryTypeLookup, // <prior entries>[pathIndex] = JSON
Note: See TracChangeset for help on using the changeset viewer.