Skip to content

Commit 82cd6ae

Browse files
committed
[MERGE #2300 @ThomsonTan] Marshal value when traversing property keys via proxy
Merge pull request #2300 from ThomsonTan:MarshalScriptContextForEnumeratingKeysOnProxy We missed to marshal property key string when traversing (Object.keys()) an object via a proxy on it. Marshal is necessary because the object underlying the proxy could be from a difference script context.
2 parents d160d49 + 8b331b8 commit 82cd6ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Runtime/Language/JavascriptOperators.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ namespace Js
11761176
{
11771177
if (propertyDescriptor.IsEnumerable())
11781178
{
1179-
proxyResultToReturn->DirectSetItemAt(index++, element);
1179+
proxyResultToReturn->DirectSetItemAt(index++, CrossSite::MarshalVar(scriptContext, element));
11801180
}
11811181
}
11821182
}

0 commit comments

Comments
 (0)