[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [bug #47354] `Function.call(null)` and `Function.call(und
From: |
Nutchanon Wetchasit |
Subject: |
[Gnash-commit] [bug #47354] `Function.call(null)` and `Function.call(undefined)` provided an incorrect `this` instance |
Date: |
Mon, 07 Mar 2016 14:16:37 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:25.8) Gecko/20151123 Firefox/31.9 PaleMoon/25.8.1 |
Follow-up Comment #1, bug #47354 (project gnash):
Gnash's implementation of `Function.apply()` is also affected by the
same problem. I have made a variant of `fncall-nothis.zip` test which uses
`Function.apply()` instead of `Function.call()`; attached as
`fnapply-nothis.zip`.
This is a trace output of `fnapply-nothis-v7.swf` under Flash Player:
PASSED: _global object should be an object type
Warning: valueOf is not a function
PASSED: _global object should be equal to undefined value
Warning: valueOf is not a function
PASSED: _global object should be equal to null value
Warning: valueOf is not a function
PASSED: Appending _global object to empty string should give "undefined"
string
PASSED: _global object should not be strictly equal to undefined value
PASSED: _global object should not be strictly equal to null value
PASSED: this pointer inside fn_nullthis should be an object type
Warning: valueOf is not a function
PASSED: this pointer inside fn_nullthis should be equal to undefined value
Warning: valueOf is not a function
PASSED: this pointer inside fn_nullthis should be equal to null value
Warning: valueOf is not a function
PASSED: Appending this pointer inside fn_nullthis to empty string should give
"undefined" string
PASSED: this pointer inside fn_nullthis should not be strictly equal to
undefined value
PASSED: this pointer inside fn_nullthis should not be strictly equal to null
value
PASSED: this pointer inside fn_nullthis should be strictly equal to _global
object
PASSED: this pointer inside fn_undefinedthis should be an object type
Warning: valueOf is not a function
PASSED: this pointer inside fn_undefinedthis should be equal to undefined
value
Warning: valueOf is not a function
PASSED: this pointer inside fn_undefinedthis should be equal to null value
Warning: valueOf is not a function
PASSED: Appending this pointer inside fn_undefinedthis to empty string should
give "undefined" string
PASSED: this pointer inside fn_undefinedthis should not be strictly equal to
undefined value
PASSED: this pointer inside fn_undefinedthis should not be strictly equal to
null value
PASSED: this pointer inside fn_undefinedthis should be strictly equal to
_global object
PASSED: _global.nullthis_value should be set to the correct value
PASSED: _global.undefinedthis_value should be set to the correct value
PASSED: There should be 22 tests run
You'd see that all tests were passed.
This is a debug output (verbosity 1) of `fnapply-nothis-v7.swf` under Gnash:
102 SECURITY: Checking security of URL
'file:///mnt/gnashdev/fncall-nothis/fnapply-nothis/fnapply-nothis-v7.swf'
102 SECURITY: Load of file
/mnt/gnashdev/fncall-nothis/fnapply-nothis/fnapply-nothis-v7.swf granted
(under local sandbox /mnt/gnashdev/fncall-nothis/fnapply-nothis/)
131 SECURITY: Extensions disabled
132 TRACE: PASSED: _global object should be an object type
132 TRACE: PASSED: _global object should be equal to undefined value
132 TRACE: PASSED: _global object should be equal to null value
132 TRACE: PASSED: Appending _global object to empty string should give
"undefined" string
132 TRACE: PASSED: _global object should not be strictly equal to undefined
value
132 TRACE: PASSED: _global object should not be strictly equal to null value
133 TRACE: PASSED: this pointer inside fn_nullthis should be an object type
133 TRACE: PASSED: this pointer inside fn_nullthis should be equal to
undefined value
133 TRACE: PASSED: this pointer inside fn_nullthis should be equal to null
value
133 TRACE: PASSED: Appending this pointer inside fn_nullthis to empty string
should give "undefined" string
133 TRACE: PASSED: this pointer inside fn_nullthis should not be strictly
equal to undefined value
133 TRACE: PASSED: this pointer inside fn_nullthis should not be strictly
equal to null value
133 TRACE: FAILED: this pointer inside fn_nullthis should be strictly equal to
_global object
133 TRACE: PASSED: this pointer inside fn_undefinedthis should be an object
type
133 TRACE: PASSED: this pointer inside fn_undefinedthis should be equal to
undefined value
133 TRACE: PASSED: this pointer inside fn_undefinedthis should be equal to
null value
133 TRACE: PASSED: Appending this pointer inside fn_undefinedthis to empty
string should give "undefined" string
133 TRACE: PASSED: this pointer inside fn_undefinedthis should not be strictly
equal to undefined value
133 TRACE: PASSED: this pointer inside fn_undefinedthis should not be strictly
equal to null value
133 TRACE: FAILED: this pointer inside fn_undefinedthis should be strictly
equal to _global object
134 ACTIONSCRIPT ERROR: Reference to undefined member [string:nullthis_value]
of object [object(gnash::Global_as):0xb8af5290]
134 TRACE: FAILED: _global.nullthis_value should be set to the correct value
("undefined" != "fn_nullthis")
134 ACTIONSCRIPT ERROR: Reference to undefined member
[string:undefinedthis_value] of object [object(gnash::Global_as):0xb8af5290]
134 TRACE: FAILED: _global.undefinedthis_value should be set to the correct
value ("undefined" != "fn_undefinedthis")
134 TRACE: PASSED: There should be 22 tests run
You'd see that tests were failed in the same way as `Function.call()`.
Gnash: 0.8.11dev (git 8b33692 7-Mar-2016)
Flash Player: 11.2 r202 (11.2.202.491) Standalone
System: Debian GNU/Linux 7.0 Wheezy i386
(file #36566)
_______________________________________________________
Additional Item Attachment:
File name: fnapply-nothis.zip Size:11 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?47354>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/