File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1855,7 +1855,7 @@ namespace Js
18551855 {
18561856 if (propertyDescriptor.ValueSpecified ())
18571857 {
1858- return propertyDescriptor.GetValue ();
1858+ return CrossSite::MarshalVar (requestContext, propertyDescriptor.GetValue () );
18591859 }
18601860 if (propertyDescriptor.GetterSpecified ())
18611861 {
Original file line number Diff line number Diff line change 22// Copyright (C) Microsoft. All rights reserved.
33// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
44//-------------------------------------------------------------------------------------------------------
5+
6+ var passed ;
7+
58var func3 = function ( )
69{
710 var sc4 = WScript . LoadScript ( 'function test(){ obj2.prop4 = {needMarshal:true}; }' , 'samethread' ) ;
@@ -17,8 +20,36 @@ func3();
1720
1821var bug = new Proxy ( new Array ( 1 ) , { has : ( ) => true } ) ;
1922var a = bug . concat ( ) ;
20- if ( a [ 0 ] !== undefined || a . length !== 1 ) {
21- print ( "failed" ) ;
23+ if ( a [ 0 ] !== undefined || a . length !== 1 ) {
24+ passed = "failed" ;
2225} else {
23- print ( "passed" ) ;
26+ passed = "passed" ;
27+ }
28+
29+ function test0 ( ) {
30+ var obj1 = { } ;
31+ var arrObj0 = { } ;
32+ var x = 1
33+ var proxyHandler = { } ;
34+ proxyHandler [ 'get' ] = function ( ) { } ;
35+ proxyHandler [ 'defineProperty' ] = function ( target , property , descriptor ) {
36+ return Reflect . defineProperty ( target , property , descriptor ) ;
37+ } ;
38+ proxyHandler [ 'isExtensible' ] = function ( target ) {
39+ arrObj0 . prop0 ;
40+ arrObj0 = new Proxy ( arrObj0 , proxyHandler ) ;
41+ return Reflect . isExtensible ( target ) ;
42+ } ;
43+ arrObj0 = new Proxy ( arrObj0 , proxyHandler ) ;
44+ arrObj0 = new Proxy ( arrObj0 , proxyHandler ) ;
45+ do {
46+ var sc3 = WScript . LoadScript ( 'function test(){arrObj0.length = arrObj0[obj1];}' , 'samethread' ) ;
47+ sc3 . obj1 = obj1 ;
48+ sc3 . arrObj0 = arrObj0 ;
49+ sc3 . test ( ) ;
50+ } while ( x -- ) ;
2451}
52+ test0 ( ) ;
53+
54+
55+ print ( passed ) ;
You can’t perform that action at this time.
0 commit comments