Skip to content

Commit

Permalink
address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sethbrenith committed Oct 2, 2018
1 parent 3826779 commit 03b79f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Runtime/Language/JavascriptOperators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ using namespace Js;
JavascriptArray* JavascriptOperators::GetOwnPropertyNames(Var instance, ScriptContext *scriptContext)
{
RecyclableObject *object = ToObject(instance, scriptContext);
AssertOrFailFast(VarIsCorrectType(object));
AssertOrFailFast(VarIsCorrectType(object)); // Consider moving this check into ToObject
JavascriptProxy * proxy = JavascriptOperators::TryFromVar<JavascriptProxy>(instance);
if (proxy)
{
Expand Down
9 changes: 9 additions & 0 deletions lib/Runtime/Language/i386/AsmJsJitTemplate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,20 @@ namespace Js
JavascriptArrayBuffer* arrayBuffer = asmJsFunc->GetAsmJsArrayBuffer();
int arraySize = 0;
BYTE* arrayPtr = nullptr;

if (VarIsCorrectType<ArrayBuffer>(arrayBuffer))
{
arrayPtr = arrayBuffer->GetBuffer();
arraySize = arrayBuffer->GetByteLength();
}
else
{
// Null should be the only way to fail VarIsCorrectType
// TODO: just check for null above
Assert(arrayBuffer == nullptr);
arrayBuffer = nullptr;
}

Var* m_localSlots;
int* m_localIntSlots;
double* m_localDoubleSlots;
Expand Down

0 comments on commit 03b79f7

Please sign in to comment.