Skip to content

Commit

Permalink
Fix build after Windows 1809 October Update merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Cellule committed Oct 23, 2018
1 parent 878e8cb commit d05bc11
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 24 deletions.
4 changes: 2 additions & 2 deletions lib/Runtime/Base/CrossSite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ namespace Js
for (uint16 i = 0; i < length; i++)
{
Var value = display->GetItem(i);
if (UnscopablesWrapperObject::Is(value))
if (Js::VarIs<UnscopablesWrapperObject>(value))
{
// Here we are marshalling the wrappedObject and then ReWrapping th object in the new context.
RecyclableObject* wrappedObject = UnscopablesWrapperObject::FromVar(value)->GetWrappedObject();
RecyclableObject* wrappedObject = Js::VarTo<UnscopablesWrapperObject>(value)->GetWrappedObject();
ScriptContext* wrappedObjectScriptContext = wrappedObject->GetScriptContext();
value = JavascriptOperators::ToUnscopablesWrapperObject(CrossSite::MarshalVar(scriptContext,
wrappedObject, wrappedObjectScriptContext), scriptContext);
Expand Down
4 changes: 2 additions & 2 deletions lib/Runtime/Library/JavascriptError.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,8 +773,8 @@ namespace Js
// two error codes is morally equivalent in typeof scenario. Special case this here
// because we do not want typeof to leak these exceptions.
&& !(errorObject != nullptr
&& Js::JavascriptError::Is(errorObject)
&& Js::JavascriptError::FromVar(errorObject)->GetErrorType() == kjstWinRTError
&& Js::VarIs<Js::JavascriptError>(errorObject)
&& Js::VarTo<Js::JavascriptError>(errorObject)->GetErrorType() == kjstWinRTError
&& hr == TYPE_E_ELEMENTNOTFOUND)
#endif
;
Expand Down
17 changes: 0 additions & 17 deletions lib/Runtime/Types/UnscopablesWrapperObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,6 @@

namespace Js
{
bool UnscopablesWrapperObject::Is(Var aValue)
{
return JavascriptOperators::GetTypeId(aValue) == TypeIds_UnscopablesWrapperObject;
}

UnscopablesWrapperObject* UnscopablesWrapperObject::FromVar(Var aValue)
{
AssertOrFailFast(UnscopablesWrapperObject::Is(aValue));
return static_cast<UnscopablesWrapperObject*>(aValue);
}

UnscopablesWrapperObject* UnscopablesWrapperObject::UnsafeFromVar(Var aValue)
{
Assert(UnscopablesWrapperObject::Is(aValue));
return static_cast<UnscopablesWrapperObject*>(aValue);
}

PropertyQueryFlags UnscopablesWrapperObject::HasPropertyQuery(PropertyId propertyId, _Inout_opt_ PropertyValueInfo* info)
{
return JavascriptConversion::BooleanToPropertyQueryFlags(JavascriptOperators::HasPropertyUnscopables(wrappedObject, propertyId));
Expand Down
3 changes: 0 additions & 3 deletions lib/Runtime/Types/UnscopablesWrapperObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ namespace Js

public:
UnscopablesWrapperObject(RecyclableObject *wrappedObject, StaticType * type) : RecyclableObject(type), wrappedObject(wrappedObject) {}
static bool Is(Var aValue);
static UnscopablesWrapperObject* FromVar(Var value);
static UnscopablesWrapperObject* UnsafeFromVar(Var value);
RecyclableObject *GetWrappedObject() { return wrappedObject; }
virtual PropertyQueryFlags HasPropertyQuery(PropertyId propertyId, _Inout_opt_ PropertyValueInfo* info) override;
virtual BOOL HasOwnProperty(PropertyId propertyId) override;
Expand Down

0 comments on commit d05bc11

Please sign in to comment.