File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -480,6 +480,7 @@ namespace Js
480
480
481
481
inline void JavascriptArray::GenericDirectSetItemAt (const uint32 index, Var newValue)
482
482
{
483
+ newValue = CrossSite::MarshalVar (this ->GetScriptContext (), newValue);
483
484
this ->DirectSetItemAt (index, newValue);
484
485
}
485
486
Original file line number Diff line number Diff line change @@ -221,6 +221,31 @@ var tests = [
221
221
}
222
222
}
223
223
} ,
224
+ {
225
+ name : "CrossSite issue while array concat OS: 18874745" ,
226
+ body : function ( ) {
227
+ function test0 ( ) {
228
+ var IntArr0 = Array ( ) ;
229
+ var sc0Code = `
230
+ Object.defineProperty(Array, Symbol.species, { value : function() {
231
+ return IntArr0;
232
+ }
233
+ }
234
+ );
235
+ test = function(a, list) {
236
+ return [a].concat(list);
237
+ }
238
+ function out() {
239
+ test({}, [1]);
240
+ }
241
+ ` ;
242
+ var sc0 = WScript . LoadScript ( sc0Code , 'samethread' ) ;
243
+ sc0 . IntArr0 = IntArr0 ;
244
+ sc0 . out ( ) ;
245
+ }
246
+ test0 ( ) ;
247
+ }
248
+ } ,
224
249
{
225
250
name : "calling promise's function as constructor should not be allowed" ,
226
251
body : function ( ) {
You can’t perform that action at this time.
0 commit comments