Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions lib/Runtime/Library/JavascriptObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ namespace Js
if (type == TypeIds_HostDispatch)
{
RecyclableObject* hostDispatchObject = RecyclableObject::FromVar(thisArg);
DynamicObject* remoteObject = hostDispatchObject->GetRemoteObject();
const DynamicObject* remoteObject = hostDispatchObject->GetRemoteObject();
if (!remoteObject)
{
Var result = nullptr;
Expand Down Expand Up @@ -1726,6 +1726,7 @@ namespace Js

tempVar = JavascriptOperators::GetProperty(props, propId, scriptContext);

AnalysisAssert(descCount < descSize);
if (!JavascriptOperators::ToPropertyDescriptor(tempVar, &descriptors[descCount].descriptor, scriptContext))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_PropertyDescriptor_Invalid, scriptContext->GetPropertyName(propId)->GetBuffer());
Expand Down Expand Up @@ -1900,7 +1901,7 @@ namespace Js
&& _wcsicmp(Js::ScriptFunction::FromVar(descriptor.GetGetter())->GetFunctionProxy()->GetDisplayName(), _u("get")) == 0)
{
// modify to name.get
char16* finalName = ConstructName(propertyRecord, _u(".get"), scriptContext);
const char16* finalName = ConstructName(propertyRecord, _u(".get"), scriptContext);
if (finalName != nullptr)
{
FunctionProxy::SetDisplayNameFlags flags = (FunctionProxy::SetDisplayNameFlags) (FunctionProxy::SetDisplayNameFlagsDontCopy | FunctionProxy::SetDisplayNameFlagsRecyclerAllocated);
Expand All @@ -1915,7 +1916,7 @@ namespace Js
&& _wcsicmp(Js::ScriptFunction::FromVar(descriptor.GetSetter())->GetFunctionProxy()->GetDisplayName(), _u("set")) == 0)
{
// modify to name.set
char16* finalName = ConstructName(propertyRecord, _u(".set"), scriptContext);
const char16* finalName = ConstructName(propertyRecord, _u(".set"), scriptContext);
if (finalName != nullptr)
{
FunctionProxy::SetDisplayNameFlags flags = (FunctionProxy::SetDisplayNameFlags) (FunctionProxy::SetDisplayNameFlagsDontCopy | FunctionProxy::SetDisplayNameFlagsRecyclerAllocated);
Expand All @@ -1932,7 +1933,7 @@ namespace Js
BOOL returnValue;
obj->ThrowIfCannotDefineProperty(propId, descriptor);

Type* oldType = obj->GetType();
const Type* oldType = obj->GetType();
obj->ClearWritableDataOnlyDetectionBit();

// HostDispatch: it doesn't support changing property attributes and default attributes are not per ES5,
Expand Down