Skip to content

Commit

Permalink
Modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
yullin-ms committed Oct 4, 2018
1 parent 54b0bba commit 540a95d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions lib/Runtime/Library/EngineInterfaceObjectBuiltIns.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ GlobalBuiltIn(JavascriptString, Substring)
GlobalBuiltIn(JavascriptString, Repeat)
GlobalBuiltIn(JavascriptString, IndexOf)

GlobalBuiltIn(JavascriptNumber, IsNaN)

GlobalBuiltIn(GlobalObject, IsFinite) // TODO(jahorto): consider switching to Number.isFinite
GlobalBuiltIn(GlobalObject, IsNaN) // TODO(jahorto): consider switching to Number.isNaN
GlobalBuiltIn(GlobalObject, Eval) // TODO(jahorto): consider deleting (currently used by WinRT Promises)
Expand Down
3 changes: 1 addition & 2 deletions lib/Runtime/Library/JsBuiltIn/JsBuiltIn.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
__chakraLibrary.raiseFunctionArgument_NeedFunction = platform.raiseFunctionArgument_NeedFunction;
__chakraLibrary.functionBind = platform.builtInJavascriptFunctionEntryBind;
__chakraLibrary.objectDefineProperty = _objectDefineProperty;
__chakraLibrary.isNaN = platform.builtInJavascriptNumberEntryIsNaN;

_objectDefineProperty(__chakraLibrary.ArrayIterator.prototype, 'next',
// Object's getter and setter can get overriden on the prototype, in that case while setting the value attributes, we will end up with TypeError
Expand Down Expand Up @@ -492,7 +491,7 @@
//Let elementK be the result of ? Get(O, ! ToString(k)).
let elementK = o[k];
//If SameValueZero(searchElement, elementK) is true, return true.
if ((searchElement === elementK) || (__chakraLibrary.isNaN(searchElement) && __chakraLibrary.isNaN(elementK))) {
if ((searchElement === elementK) || (searchElement !== searchElement && elementK !== elementK)) { // check for isNaN
return true;
}
//Increase k by 1.
Expand Down

0 comments on commit 540a95d

Please sign in to comment.