fixed issues/1971 caller is undefined,but it's not undefined in broswer. #1303
Annotations
10 errors
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.language.generated.cs#L2632
language/expressions/arrow-function/forbidden-ext/b1/arrow-function-forbidden-ext-direct-access-prop-caller.js
Jint.Runtime.JavaScriptException: Expected SameValue(«true», «false») to be true
---> Error: Expected SameValue(«true», «false») to be true
at assert.sameValue (actual, expected, message) harness/assert.js:49:9
at f () language/expressions/arrow-function/forbidden-ext/b1/arrow-function-forbidden-ext-direct-access-prop-caller.js:29:3
at language/expressions/arrow-function/forbidden-ext/b1/arrow-function-forbidden-ext-direct-access-prop-caller.js:34:3
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.<>c__DisplayClass99_0.<Execute>b__0() in /home/runner/work/jint/jint/Jint/Engine.cs:line 412
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Engine.Execute(Prepared`1& preparedScript) in /home/runner/work/jint/jint/Jint/Engine.cs:line 412
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: // This file was procedurally generated from the following sources:
02: // - src/function-forms/forbidden-ext-direct-access-prop-caller.case
03: // - src/function-forms/forbidden-extensions/bullet-one/arrow-function.template
04: /*---
05: description: Forbidden extension, o.caller (arrow function expression)
06: esid: sec-arrow-function-definitions-runtime-semantics-evaluation
07: features: [arrow-function]
08: flags: [generated, noStrict]
09: info: |
10: ArrowFunction : ArrowParameters => ConciseBody
11:
12:
13: ECMAScript function objects defined using syntactic constructors in strict mode code must
14: not be created with own properties named "caller" or "arguments". Such own properties also
15: must not be created for function objects defined using an ArrowFunction, MethodDefinition,
16: GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression,
17: ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or
18: AsyncArrowFunction regardless of whether the definition is contained in strict mode code.
19: Built-in functions, strict functions created using the Function constructor, generator functions
20: created using the Generator constructor, async functions created using the AsyncFunction
21: constructor, and functions created using the bind method also must not be created with such own
22: properties.
23:
24: ---*/
25:
26: var callCount = 0;
27: var f;
28: f = () => {
29: assert.sameValue(f.hasOwnProperty("caller"), false);
30: callCount++;
31: };
32:
33:
34: f();
35: assert.sameValue(callCount, 1, 'arrow function body evaluated');
36:
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.language.generated.cs#L2640
language/expressions/arrow-function/forbidden-ext/b2/arrow-function-forbidden-ext-indirect-access-own-prop-caller-get.js
Jint.Runtime.JavaScriptException: If this test defined an own "caller" property on the inner function, then it should be accessible and should return the value it was set to. Expected SameValue(«function f() { [native code] }», «1») to be true
---> Error: If this test defined an own "caller" property on the inner function, then it should be accessible and should return the value it was set to. Expected SameValue(«function f() { [native code] }», «1») to be true
at assert.sameValue (actual, expected, message) harness/assert.js:49:9
at f () language/expressions/arrow-function/forbidden-ext/b2/arrow-function-forbidden-ext-indirect-access-own-prop-caller-get.js:42:5
at language/expressions/arrow-function/forbidden-ext/b2/arrow-function-forbidden-ext-indirect-access-own-prop-caller-get.js:59:1
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.<>c__DisplayClass99_0.<Execute>b__0() in /home/runner/work/jint/jint/Jint/Engine.cs:line 412
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Engine.Execute(Prepared`1& preparedScript) in /home/runner/work/jint/jint/Jint/Engine.cs:line 412
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: // This file was procedurally generated from the following sources:
02: // - src/function-forms/forbidden-ext-indirect-access-own-prop-caller-get.case
03: // - src/function-forms/forbidden-extensions/bullet-two/arrow-function.template
04: /*---
05: description: Forbidden extension, o.caller (arrow function expression)
06: esid: sec-arrow-definitions-runtime-semantics-evaluation
07: features: [arrow-function]
08: flags: [generated, noStrict]
09: info: |
10: ArrowFunction : ArrowParameters => ConciseBody
11:
12:
13: If an implementation extends any function object with an own property named "caller" the value of
14: that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function
15: object. If it is an accessor property, the function that is the value of the property's [[Get]]
16: attribute must never return a strict function when called.
17:
18: ---*/
19: var CALLER_OWN_PROPERTY_DOES_NOT_EXIST = Symbol();
20: function inner() {
21: // This property may exist, but is forbidden from having a value that is a strict function object
22: return inner.hasOwnProperty("caller")
23: ? inner.caller
24: : CALLER_OWN_PROPERTY_DOES_NOT_EXIST;
25: }
26:
27: var callCount = 0;
28: var f;
29: f = () => {
30: "use strict";
31: // This and the following conditional value is set in the test's .case file.
32: // For every test that has a "true" value here, there is a
33: // corresponding test that has a "false" value here.
34: // They are generated from two different case files, which use
35: // the same templates.
36: let descriptor = Object.getOwnPropertyDescriptor(inner, "caller");
37: if (descriptor && descriptor.configurable && true) {
38: Object.defineProperty(inner, "caller", {get(){return 1}});
39: }
40: var result = inner();
41: if (descriptor && descriptor.configurable && true) {
42: assert.sameValue(result, 1, 'If this test defined an own "caller" property on the inner function, then it should be accessible and should return the value it was set to.');
43: }
44: // "CALLER_OWN_PROPERTY_DOES_NOT_EXIST" is from
45: // forbidden-ext-indirect-access-prop-caller.case
46: //
47: // If the function object "inner" has an own property
48: // named
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.language.generated.cs#L2640
language/expressions/arrow-function/forbidden-ext/b2/arrow-function-forbidden-ext-indirect-access-own-prop-caller-value.js
Jint.Runtime.JavaScriptException: If this test defined an own "caller" property on the inner function, then it should be accessible and should return the value it was set to. Expected SameValue(«function f() { [native code] }», «1») to be true
---> Error: If this test defined an own "caller" property on the inner function, then it should be accessible and should return the value it was set to. Expected SameValue(«function f() { [native code] }», «1») to be true
at assert.sameValue (actual, expected, message) harness/assert.js:49:9
at f () language/expressions/arrow-function/forbidden-ext/b2/arrow-function-forbidden-ext-indirect-access-own-prop-caller-value.js:42:5
at language/expressions/arrow-function/forbidden-ext/b2/arrow-function-forbidden-ext-indirect-access-own-prop-caller-value.js:59:1
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.<>c__DisplayClass99_0.<Execute>b__0() in /home/runner/work/jint/jint/Jint/Engine.cs:line 412
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Engine.Execute(Prepared`1& preparedScript) in /home/runner/work/jint/jint/Jint/Engine.cs:line 412
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: // This file was procedurally generated from the following sources:
02: // - src/function-forms/forbidden-ext-indirect-access-own-prop-caller-value.case
03: // - src/function-forms/forbidden-extensions/bullet-two/arrow-function.template
04: /*---
05: description: Forbidden extension, o.caller (arrow function expression)
06: esid: sec-arrow-definitions-runtime-semantics-evaluation
07: features: [arrow-function]
08: flags: [generated, noStrict]
09: info: |
10: ArrowFunction : ArrowParameters => ConciseBody
11:
12:
13: If an implementation extends any function object with an own property named "caller" the value of
14: that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function
15: object. If it is an accessor property, the function that is the value of the property's [[Get]]
16: attribute must never return a strict function when called.
17:
18: ---*/
19: var CALLER_OWN_PROPERTY_DOES_NOT_EXIST = Symbol();
20: function inner() {
21: // This property may exist, but is forbidden from having a value that is a strict function object
22: return inner.hasOwnProperty("caller")
23: ? inner.caller
24: : CALLER_OWN_PROPERTY_DOES_NOT_EXIST;
25: }
26:
27: var callCount = 0;
28: var f;
29: f = () => {
30: "use strict";
31: // This and the following conditional value is set in the test's .case file.
32: // For every test that has a "true" value here, there is a
33: // corresponding test that has a "false" value here.
34: // They are generated from two different case files, which use
35: // the same templates.
36: let descriptor = Object.getOwnPropertyDescriptor(inner, "caller");
37: if (descriptor && descriptor.configurable && true) {
38: Object.defineProperty(inner, "caller", {value: 1});
39: }
40: var result = inner();
41: if (descriptor && descriptor.configurable && true) {
42: assert.sameValue(result, 1, 'If this test defined an own "caller" property on the inner function, then it should be accessible and should return the value it was set to.');
43: }
44: // "CALLER_OWN_PROPERTY_DOES_NOT_EXIST" is from
45: // forbidden-ext-indirect-access-prop-caller.case
46: //
47: // If the function object "inner" has an own property
48: // name
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.language.generated.cs#L2640
language/expressions/arrow-function/forbidden-ext/b2/arrow-function-forbidden-ext-indirect-access-prop-caller.js
Jint.Runtime.JavaScriptException: Expected SameValue(«function f() { [native code] }», «function f() { [native code] }») to be false
---> Error: Expected SameValue(«function f() { [native code] }», «function f() { [native code] }») to be false
at assert.notSameValue (actual, unexpected, message) harness/assert.js:65:9
at f () language/expressions/arrow-function/forbidden-ext/b2/arrow-function-forbidden-ext-indirect-access-prop-caller.js:54:5
at language/expressions/arrow-function/forbidden-ext/b2/arrow-function-forbidden-ext-indirect-access-prop-caller.js:59:1
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.<>c__DisplayClass99_0.<Execute>b__0() in /home/runner/work/jint/jint/Jint/Engine.cs:line 412
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Engine.Execute(Prepared`1& preparedScript) in /home/runner/work/jint/jint/Jint/Engine.cs:line 412
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: // This file was procedurally generated from the following sources:
02: // - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
03: // - src/function-forms/forbidden-extensions/bullet-two/arrow-function.template
04: /*---
05: description: Forbidden extension, o.caller (arrow function expression)
06: esid: sec-arrow-definitions-runtime-semantics-evaluation
07: features: [arrow-function]
08: flags: [generated, noStrict]
09: info: |
10: ArrowFunction : ArrowParameters => ConciseBody
11:
12:
13: If an implementation extends any function object with an own property named "caller" the value of
14: that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function
15: object. If it is an accessor property, the function that is the value of the property's [[Get]]
16: attribute must never return a strict function when called.
17:
18: ---*/
19: var CALLER_OWN_PROPERTY_DOES_NOT_EXIST = Symbol();
20: function inner() {
21: // This property may exist, but is forbidden from having a value that is a strict function object
22: return inner.hasOwnProperty("caller")
23: ? inner.caller
24: : CALLER_OWN_PROPERTY_DOES_NOT_EXIST;
25: }
26:
27: var callCount = 0;
28: var f;
29: f = () => {
30: "use strict";
31: // This and the following conditional value is set in the test's .case file.
32: // For every test that has a "true" value here, there is a
33: // corresponding test that has a "false" value here.
34: // They are generated from two different case files, which use
35: // the same templates.
36: let descriptor = Object.getOwnPropertyDescriptor(inner, "caller");
37: if (descriptor && descriptor.configurable && false) {
38: Object.defineProperty(inner, "caller", {});
39: }
40: var result = inner();
41: if (descriptor && descriptor.configurable && false) {
42: assert.sameValue(result, 1, 'If this test defined an own "caller" property on the inner function, then it should be accessible and should return the value it was set to.');
43: }
44: // "CALLER_OWN_PROPERTY_DOES_NOT_EXIST" is from
45: // forbidden-ext-indirect-access-prop-caller.case
46: //
47: // If the function object "inner" has an own property
48: // named "caller", then its value will be returned.
49: //
50: // If the function object "inner" DOES NOT have an
51: // own property named "caller", then the symbol
52: // CALLER_OWN_PROPERTY_DOES_NOT_EXIST will be returned.
53: if (result !== CALLER_OWN_PROP
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.language.generated.cs#L12741
language/expressions/class/gen-method/forbidden-ext/b1/cls-expr-gen-meth-forbidden-ext-direct-access-prop-caller.js
Jint.Runtime.JavaScriptException: Expected SameValue(«true», «false») to be true
---> Error: Expected SameValue(«true», «false») to be true
at assert.sameValue (actual, expected, message) harness/assert.js:49:9
at next language/expressions/class/gen-method/forbidden-ext/b1/cls-expr-gen-meth-forbidden-ext-direct-access-prop-caller.js:29:5
at language/expressions/class/gen-method/forbidden-ext/b1/cls-expr-gen-meth-forbidden-ext-direct-access-prop-caller.js:34:1
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: // This file was procedurally generated from the following sources:
02: // - src/function-forms/forbidden-ext-direct-access-prop-caller.case
03: // - src/function-forms/forbidden-extensions/bullet-one/cls-expr-gen-meth.template
04: /*---
05: description: Forbidden extension, o.caller (class expression method)
06: esid: sec-class-definitions-runtime-semantics-evaluation
07: features: [class, generators]
08: flags: [generated, noStrict]
09: info: |
10: ClassExpression : class BindingIdentifieropt ClassTail
11:
12:
13: ECMAScript function objects defined using syntactic constructors in strict mode code must
14: not be created with own properties named "caller" or "arguments". Such own properties also
15: must not be created for function objects defined using an ArrowFunction, MethodDefinition,
16: GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression,
17: ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or
18: AsyncArrowFunction regardless of whether the definition is contained in strict mode code.
19: Built-in functions, strict functions created using the Function constructor, generator functions
20: created using the Generator constructor, async functions created using the AsyncFunction
21: constructor, and functions created using the bind method also must not be created with such own
22: properties.
23:
24: ---*/
25:
26: var callCount = 0;
27: var C = class {
28: *method() {
29: assert.sameValue(this.method.hasOwnProperty("caller"), false);
30: callCount++;
31: }
32: };
33:
34: C.prototype.method().next();
35: assert.sameValue(callCount, 1, 'method body evaluated');
36:
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.language.generated.cs#L12749
language/expressions/class/gen-method/forbidden-ext/b2/cls-expr-gen-meth-forbidden-ext-indirect-access-prop-caller.js
Jint.Runtime.JavaScriptException: Expected SameValue(«function method() { [native code] }», «function method() { [native code] }») to be false
---> Error: Expected SameValue(«function method() { [native code] }», «function method() { [native code] }») to be false
at assert.notSameValue (actual, unexpected, message) harness/assert.js:65:9
at next language/expressions/class/gen-method/forbidden-ext/b2/cls-expr-gen-meth-forbidden-ext-indirect-access-prop-caller.js:54:7
at language/expressions/class/gen-method/forbidden-ext/b2/cls-expr-gen-meth-forbidden-ext-indirect-access-prop-caller.js:61:1
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: // This file was procedurally generated from the following sources:
02: // - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
03: // - src/function-forms/forbidden-extensions/bullet-two/cls-expr-gen-meth.template
04: /*---
05: description: Forbidden extension, o.caller (class expression method)
06: esid: sec-class-definitions-runtime-semantics-evaluation
07: features: [class, generators]
08: flags: [generated, noStrict]
09: info: |
10: ClassExpression : class BindingIdentifieropt ClassTail
11:
12:
13: If an implementation extends any function object with an own property named "caller" the value of
14: that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function
15: object. If it is an accessor property, the function that is the value of the property's [[Get]]
16: attribute must never return a strict function when called.
17:
18: ---*/
19: var CALLER_OWN_PROPERTY_DOES_NOT_EXIST = Symbol();
20: function inner() {
21: // This property may exist, but is forbidden from having a value that is a strict function object
22: return inner.hasOwnProperty("caller")
23: ? inner.caller
24: : CALLER_OWN_PROPERTY_DOES_NOT_EXIST;
25: }
26:
27: var callCount = 0;
28: var C = class {
29: *method() {
30: /* implicit strict */
31: // This and the following conditional value is set in the test's .case file.
32: // For every test that has a "true" value here, there is a
33: // corresponding test that has a "false" value here.
34: // They are generated from two different case files, which use
35: let descriptor = Object.getOwnPropertyDescriptor(inner, "caller");
36: if (descriptor && descriptor.configurable && false) {
37: Object.defineProperty(inner, "caller", {});
38: }
39: var result = inner();
40: if (descriptor && descriptor.configurable && false) {
41: assert.sameValue(result, 1, 'If this test defined an own "caller" property on the inner function, then it should be accessible and should return the value it was set to.');
42: }
43:
44: // "CALLER_OWN_PROPERTY_DOES_NOT_EXIST" is from
45: // forbidden-ext-indirect-access-prop-caller.case
46: //
47: // If the function object "inner" has an own property
48: // named "caller", then its value will be returned.
49: //
50: // If the function object "inner" DOES NOT have an
51: // own property named "caller", then the symbol
52: // CALLER_OWN_PROPERTY_DOES_NOT_EXIST will be returned.
53: if (result !== CALLER_OWN_PROPERTY_DOES_NOT_EXIST) {
54: assert.notSameValue(result, this.method);
55: }
56:
57: callCount++;
58: }
59: };
60:
6
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.language.generated.cs#L12749
language/expressions/class/gen-method/forbidden-ext/b2/cls-expr-gen-meth-forbidden-ext-indirect-access-own-prop-caller-get.js
Jint.Runtime.JavaScriptException: If this test defined an own "caller" property on the inner function, then it should be accessible and should return the value it was set to. Expected SameValue(«function method() { [native code] }», «1») to be true
---> Error: If this test defined an own "caller" property on the inner function, then it should be accessible and should return the value it was set to. Expected SameValue(«function method() { [native code] }», «1») to be true
at assert.sameValue (actual, expected, message) harness/assert.js:49:9
at next language/expressions/class/gen-method/forbidden-ext/b2/cls-expr-gen-meth-forbidden-ext-indirect-access-own-prop-caller-get.js:41:7
at language/expressions/class/gen-method/forbidden-ext/b2/cls-expr-gen-meth-forbidden-ext-indirect-access-own-prop-caller-get.js:61:1
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: // This file was procedurally generated from the following sources:
02: // - src/function-forms/forbidden-ext-indirect-access-own-prop-caller-get.case
03: // - src/function-forms/forbidden-extensions/bullet-two/cls-expr-gen-meth.template
04: /*---
05: description: Forbidden extension, o.caller (class expression method)
06: esid: sec-class-definitions-runtime-semantics-evaluation
07: features: [class, generators]
08: flags: [generated, noStrict]
09: info: |
10: ClassExpression : class BindingIdentifieropt ClassTail
11:
12:
13: If an implementation extends any function object with an own property named "caller" the value of
14: that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function
15: object. If it is an accessor property, the function that is the value of the property's [[Get]]
16: attribute must never return a strict function when called.
17:
18: ---*/
19: var CALLER_OWN_PROPERTY_DOES_NOT_EXIST = Symbol();
20: function inner() {
21: // This property may exist, but is forbidden from having a value that is a strict function object
22: return inner.hasOwnProperty("caller")
23: ? inner.caller
24: : CALLER_OWN_PROPERTY_DOES_NOT_EXIST;
25: }
26:
27: var callCount = 0;
28: var C = class {
29: *method() {
30: /* implicit strict */
31: // This and the following conditional value is set in the test's .case file.
32: // For every test that has a "true" value here, there is a
33: // corresponding test that has a "false" value here.
34: // They are generated from two different case files, which use
35: let descriptor = Object.getOwnPropertyDescriptor(inner, "caller");
36: if (descriptor && descriptor.configurable && true) {
37: Object.defineProperty(inner, "caller", {get(){return 1}});
38: }
39: var result = inner();
40: if (descriptor && descriptor.configurable && true) {
41: assert.sameValue(result, 1, 'If this test defined an own "caller" property on the inner function, then it should be accessible and should return the value it was set to.');
42: }
43:
44: // "CALLER_OWN_PROPERTY_DOES_NOT_EXIST" is from
45: // forbidden-ext-indirect-access-prop-caller.case
46: //
47: // If the function object "inner" has an own property
48: // named "caller", then its value will be returned.
49: //
50: // If the function object "inner" DOES NOT have an
51: // own property named "caller"
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.language.generated.cs#L12749
language/expressions/class/gen-method/forbidden-ext/b2/cls-expr-gen-meth-forbidden-ext-indirect-access-own-prop-caller-value.js
Jint.Runtime.JavaScriptException: If this test defined an own "caller" property on the inner function, then it should be accessible and should return the value it was set to. Expected SameValue(«function method() { [native code] }», «1») to be true
---> Error: If this test defined an own "caller" property on the inner function, then it should be accessible and should return the value it was set to. Expected SameValue(«function method() { [native code] }», «1») to be true
at assert.sameValue (actual, expected, message) harness/assert.js:49:9
at next language/expressions/class/gen-method/forbidden-ext/b2/cls-expr-gen-meth-forbidden-ext-indirect-access-own-prop-caller-value.js:41:7
at language/expressions/class/gen-method/forbidden-ext/b2/cls-expr-gen-meth-forbidden-ext-indirect-access-own-prop-caller-value.js:61:1
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: // This file was procedurally generated from the following sources:
02: // - src/function-forms/forbidden-ext-indirect-access-own-prop-caller-value.case
03: // - src/function-forms/forbidden-extensions/bullet-two/cls-expr-gen-meth.template
04: /*---
05: description: Forbidden extension, o.caller (class expression method)
06: esid: sec-class-definitions-runtime-semantics-evaluation
07: features: [class, generators]
08: flags: [generated, noStrict]
09: info: |
10: ClassExpression : class BindingIdentifieropt ClassTail
11:
12:
13: If an implementation extends any function object with an own property named "caller" the value of
14: that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function
15: object. If it is an accessor property, the function that is the value of the property's [[Get]]
16: attribute must never return a strict function when called.
17:
18: ---*/
19: var CALLER_OWN_PROPERTY_DOES_NOT_EXIST = Symbol();
20: function inner() {
21: // This property may exist, but is forbidden from having a value that is a strict function object
22: return inner.hasOwnProperty("caller")
23: ? inner.caller
24: : CALLER_OWN_PROPERTY_DOES_NOT_EXIST;
25: }
26:
27: var callCount = 0;
28: var C = class {
29: *method() {
30: /* implicit strict */
31: // This and the following conditional value is set in the test's .case file.
32: // For every test that has a "true" value here, there is a
33: // corresponding test that has a "false" value here.
34: // They are generated from two different case files, which use
35: let descriptor = Object.getOwnPropertyDescriptor(inner, "caller");
36: if (descriptor && descriptor.configurable && true) {
37: Object.defineProperty(inner, "caller", {value: 1});
38: }
39: var result = inner();
40: if (descriptor && descriptor.configurable && true) {
41: assert.sameValue(result, 1, 'If this test defined an own "caller" property on the inner function, then it should be accessible and should return the value it was set to.');
42: }
43:
44: // "CALLER_OWN_PROPERTY_DOES_NOT_EXIST" is from
45: // forbidden-ext-indirect-access-prop-caller.case
46: //
47: // If the function object "inner" has an own property
48: // named "caller", then its value will be returned.
49: //
50: // If the function object "inner" DOES NOT have an
51: // own property named "caller
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.language.generated.cs#L12811
language/expressions/class/gen-method-static/forbidden-ext/b1/cls-expr-gen-meth-static-forbidden-ext-direct-access-prop-caller.js
Jint.Runtime.JavaScriptException: Expected SameValue(«true», «false») to be true
---> Error: Expected SameValue(«true», «false») to be true
at assert.sameValue (actual, expected, message) harness/assert.js:49:9
at next language/expressions/class/gen-method-static/forbidden-ext/b1/cls-expr-gen-meth-static-forbidden-ext-direct-access-prop-caller.js:29:5
at language/expressions/class/gen-method-static/forbidden-ext/b1/cls-expr-gen-meth-static-forbidden-ext-direct-access-prop-caller.js:34:1
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: // This file was procedurally generated from the following sources:
02: // - src/function-forms/forbidden-ext-direct-access-prop-caller.case
03: // - src/function-forms/forbidden-extensions/bullet-one/cls-expr-gen-meth-static.template
04: /*---
05: description: Forbidden extension, o.caller (static class expression generator method)
06: esid: sec-class-definitions-runtime-semantics-evaluation
07: features: [class, generators]
08: flags: [generated, noStrict]
09: info: |
10: ClassExpression : class BindingIdentifieropt ClassTail
11:
12:
13: ECMAScript function objects defined using syntactic constructors in strict mode code must
14: not be created with own properties named "caller" or "arguments". Such own properties also
15: must not be created for function objects defined using an ArrowFunction, MethodDefinition,
16: GeneratorDeclaration, GeneratorExpression, AsyncGeneratorDeclaration, AsyncGeneratorExpression,
17: ClassDeclaration, ClassExpression, AsyncFunctionDeclaration, AsyncFunctionExpression, or
18: AsyncArrowFunction regardless of whether the definition is contained in strict mode code.
19: Built-in functions, strict functions created using the Function constructor, generator functions
20: created using the Generator constructor, async functions created using the AsyncFunction
21: constructor, and functions created using the bind method also must not be created with such own
22: properties.
23:
24: ---*/
25:
26: var callCount = 0;
27: var C = class {
28: static *method() {
29: assert.sameValue(this.method.hasOwnProperty("caller"), false);
30: callCount++;
31: }
32: };
33:
34: C.method().next();
35: assert.sameValue(callCount, 1, 'method body evaluated');
36:
|
Test:
Jint.Tests.Test262/Generated/Tests262Harness.Tests.language.generated.cs#L12819
language/expressions/class/gen-method-static/forbidden-ext/b2/cls-expr-gen-meth-static-forbidden-ext-indirect-access-prop-caller.js
Jint.Runtime.JavaScriptException: Expected SameValue(«function method() { [native code] }», «function method() { [native code] }») to be false
---> Error: Expected SameValue(«function method() { [native code] }», «function method() { [native code] }») to be false
at assert.notSameValue (actual, unexpected, message) harness/assert.js:65:9
at next language/expressions/class/gen-method-static/forbidden-ext/b2/cls-expr-gen-meth-static-forbidden-ext-indirect-access-prop-caller.js:54:7
at language/expressions/class/gen-method-static/forbidden-ext/b2/cls-expr-gen-meth-static-forbidden-ext-indirect-access-prop-caller.js:60:1
--- End of inner exception stack trace ---
at Jint.Engine.ScriptEvaluation(ScriptRecord scriptRecord, ParserOptions parserOptions) in /home/runner/work/jint/jint/Jint/Engine.cs:line 458
at Jint.Engine.ExecuteWithConstraints[T](Boolean strict, Func`1 callback) in /home/runner/work/jint/jint/Jint/Engine.cs:line 818
at Jint.Tests.Test262.Test262Test.ExecuteTest(Engine engine, Test262File file) in /home/runner/work/jint/jint/Jint.Tests.Test262/Test262Test.cs:line 102
at Jint.Tests.Test262.Test262Test.RunTestCode(String test, Boolean strict) in /home/runner/work/jint/jint/Jint.Tests.Test262/Generated/Tests262Harness.Test262Test.generated.cs:line 77
01: // This file was procedurally generated from the following sources:
02: // - src/function-forms/forbidden-ext-indirect-access-prop-caller.case
03: // - src/function-forms/forbidden-extensions/bullet-two/cls-expr-gen-meth-static.template
04: /*---
05: description: Forbidden extension, o.caller (static class expression generator method)
06: esid: sec-class-definitions-runtime-semantics-evaluation
07: features: [class, generators]
08: flags: [generated, noStrict]
09: info: |
10: ClassExpression : class BindingIdentifieropt ClassTail
11:
12:
13: If an implementation extends any function object with an own property named "caller" the value of
14: that property, as observed using [[Get]] or [[GetOwnProperty]], must not be a strict function
15: object. If it is an accessor property, the function that is the value of the property's [[Get]]
16: attribute must never return a strict function when called.
17:
18: ---*/
19: var CALLER_OWN_PROPERTY_DOES_NOT_EXIST = Symbol();
20: function inner() {
21: // This property may exist, but is forbidden from having a value that is a strict function object
22: return inner.hasOwnProperty("caller")
23: ? inner.caller
24: : CALLER_OWN_PROPERTY_DOES_NOT_EXIST;
25: }
26:
27: var callCount = 0;
28: var C = class {
29: static *method() {
30: /* implicit strict */
31: // This and the following conditional value is set in the test's .case file.
32: // For every test that has a "true" value here, there is a
33: // corresponding test that has a "false" value here.
34: // They are generated from two different case files, which use
35: let descriptor = Object.getOwnPropertyDescriptor(inner, "caller");
36: if (descriptor && descriptor.configurable && false) {
37: Object.defineProperty(inner, "caller", {});
38: }
39: var result = inner();
40: if (descriptor && descriptor.configurable && false) {
41: assert.sameValue(result, 1, 'If this test defined an own "caller" property on the inner function, then it should be accessible and should return the value it was set to.');
42: }
43:
44: // "CALLER_OWN_PROPERTY_DOES_NOT_EXIST" is from
45: // forbidden-ext-indirect-access-prop-caller.case
46: //
47: // If the function object "inner" has an own property
48: // named "caller", then its value will be returned.
49: //
50: // If the function object "inner" DOES NOT have an
51: // own property named "caller", then the symbol
52: // CALLER_OWN_PROPERTY_DOES_NOT_EXIST will be returned.
53: if (result !== CALLER_OWN_PROPERTY_DOES_NOT_EXIST) {
54: assert.notSameValue(result
|
Loading