Skip to content

Commit d05bc11

Browse files
committed
Fix build after Windows 1809 October Update merge
1 parent 878e8cb commit d05bc11

File tree

4 files changed

+4
-24
lines changed

4 files changed

+4
-24
lines changed

lib/Runtime/Base/CrossSite.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ namespace Js
128128
for (uint16 i = 0; i < length; i++)
129129
{
130130
Var value = display->GetItem(i);
131-
if (UnscopablesWrapperObject::Is(value))
131+
if (Js::VarIs<UnscopablesWrapperObject>(value))
132132
{
133133
// Here we are marshalling the wrappedObject and then ReWrapping th object in the new context.
134-
RecyclableObject* wrappedObject = UnscopablesWrapperObject::FromVar(value)->GetWrappedObject();
134+
RecyclableObject* wrappedObject = Js::VarTo<UnscopablesWrapperObject>(value)->GetWrappedObject();
135135
ScriptContext* wrappedObjectScriptContext = wrappedObject->GetScriptContext();
136136
value = JavascriptOperators::ToUnscopablesWrapperObject(CrossSite::MarshalVar(scriptContext,
137137
wrappedObject, wrappedObjectScriptContext), scriptContext);

lib/Runtime/Library/JavascriptError.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,8 +773,8 @@ namespace Js
773773
// two error codes is morally equivalent in typeof scenario. Special case this here
774774
// because we do not want typeof to leak these exceptions.
775775
&& !(errorObject != nullptr
776-
&& Js::JavascriptError::Is(errorObject)
777-
&& Js::JavascriptError::FromVar(errorObject)->GetErrorType() == kjstWinRTError
776+
&& Js::VarIs<Js::JavascriptError>(errorObject)
777+
&& Js::VarTo<Js::JavascriptError>(errorObject)->GetErrorType() == kjstWinRTError
778778
&& hr == TYPE_E_ELEMENTNOTFOUND)
779779
#endif
780780
;

lib/Runtime/Types/UnscopablesWrapperObject.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,6 @@
66

77
namespace Js
88
{
9-
bool UnscopablesWrapperObject::Is(Var aValue)
10-
{
11-
return JavascriptOperators::GetTypeId(aValue) == TypeIds_UnscopablesWrapperObject;
12-
}
13-
14-
UnscopablesWrapperObject* UnscopablesWrapperObject::FromVar(Var aValue)
15-
{
16-
AssertOrFailFast(UnscopablesWrapperObject::Is(aValue));
17-
return static_cast<UnscopablesWrapperObject*>(aValue);
18-
}
19-
20-
UnscopablesWrapperObject* UnscopablesWrapperObject::UnsafeFromVar(Var aValue)
21-
{
22-
Assert(UnscopablesWrapperObject::Is(aValue));
23-
return static_cast<UnscopablesWrapperObject*>(aValue);
24-
}
25-
269
PropertyQueryFlags UnscopablesWrapperObject::HasPropertyQuery(PropertyId propertyId, _Inout_opt_ PropertyValueInfo* info)
2710
{
2811
return JavascriptConversion::BooleanToPropertyQueryFlags(JavascriptOperators::HasPropertyUnscopables(wrappedObject, propertyId));

lib/Runtime/Types/UnscopablesWrapperObject.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ namespace Js
2525

2626
public:
2727
UnscopablesWrapperObject(RecyclableObject *wrappedObject, StaticType * type) : RecyclableObject(type), wrappedObject(wrappedObject) {}
28-
static bool Is(Var aValue);
29-
static UnscopablesWrapperObject* FromVar(Var value);
30-
static UnscopablesWrapperObject* UnsafeFromVar(Var value);
3128
RecyclableObject *GetWrappedObject() { return wrappedObject; }
3229
virtual PropertyQueryFlags HasPropertyQuery(PropertyId propertyId, _Inout_opt_ PropertyValueInfo* info) override;
3330
virtual BOOL HasOwnProperty(PropertyId propertyId) override;

0 commit comments

Comments
 (0)