Skip to content

Commit 3cf6f94

Browse files
committed
add marshalling for getters
1 parent 3b290cd commit 3cf6f94

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/Runtime/Library/JavascriptMap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ Var JavascriptMap::EntryGet(RecyclableObject* function, CallInfo callInfo, ...)
223223

224224
if (map->Get(key, &value))
225225
{
226-
return value;
226+
return CrossSite::MarshalVar(scriptContext, value);
227227
}
228228

229229
return scriptContext->GetLibrary()->GetUndefined();

lib/Runtime/Library/JavascriptWeakMap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ namespace Js
238238
}
239239
#endif
240240

241-
return loaded ? value : scriptContext->GetLibrary()->GetUndefined();
241+
return loaded ? CrossSite::MarshalVar(scriptContext, value) : scriptContext->GetLibrary()->GetUndefined();
242242
}
243243

244244
Var JavascriptWeakMap::EntryHas(RecyclableObject* function, CallInfo callInfo, ...)

lib/Runtime/Library/WebAssemblyTable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ WebAssemblyTable::EntryGet(RecyclableObject* function, CallInfo callInfo, ...)
172172
return scriptContext->GetLibrary()->GetNull();
173173
}
174174

175-
return table->m_values[index];
175+
return CrossSite::MarshalVar(scriptContext, table->m_values[index]);
176176
}
177177

178178
Var

0 commit comments

Comments
 (0)