File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,18 @@ namespace Js
210
210
return nullptr ;
211
211
}
212
212
213
+ // Ignore special properties (ex: Array.length)
214
+ uint specialPropertyCount = this ->shadowData ->currentObject ->GetSpecialPropertyCount ();
215
+ if (specialPropertyCount > 0 )
216
+ {
217
+ PropertyId const * specialPropertyIds = this ->shadowData ->currentObject ->GetSpecialPropertyIds ();
218
+ Assert (specialPropertyIds != nullptr );
219
+ for (uint i = 0 ; i < specialPropertyCount; i++)
220
+ {
221
+ TestAndSetEnumerated (specialPropertyIds[i]);
222
+ }
223
+ }
224
+
213
225
RecyclableObject * object;
214
226
if (!this ->enumeratingPrototype )
215
227
{
Original file line number Diff line number Diff line change
1
+ //-------------------------------------------------------------------------------------------------------
2
+ // Copyright (C) Microsoft. All rights reserved.
3
+ // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
4
+ //-------------------------------------------------------------------------------------------------------
5
+
6
+ Object . prototype . length = undefined ;
7
+ var ary = Array ( ) ;
8
+ ary . prop1 = 1 ;
9
+ Object . defineProperty ( ary , "prop2" , {
10
+ value : 1 ,
11
+ enumerable : false
12
+ } ) ;
13
+ for ( var prop in ary ) {
14
+ if ( prop !== "prop1" ) {
15
+ console . log ( `Fail: ${ prop } property should not show in for-in` ) ;
16
+ }
17
+ }
18
+ console . log ( "pass" ) ;
Original file line number Diff line number Diff line change 501
501
<files >withSplitScope.js</files >
502
502
</default >
503
503
</test >
504
+ <test >
505
+ <default >
506
+ <files >bug_OS17614914.js</files >
507
+ </default >
508
+ </test >
504
509
</regress-exe >
You can’t perform that action at this time.
0 commit comments