NullEnumerator.cpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #include "RuntimeLibraryPch.h"
  6. #include "Library/NullEnumerator.h"
  7. namespace Js
  8. {
  9. Var NullEnumerator::GetCurrentIndex()
  10. {
  11. // This function may be called without calling MoveNext to verify element availability
  12. // by JavascriptDispatch::GetNextDispIDWithScriptEnter which call
  13. // GetEnumeratorCurrentPropertyId to resume an enumeration
  14. return this->GetLibrary()->GetUndefined();
  15. }
  16. Var NullEnumerator::GetCurrentValue()
  17. {
  18. Assert(false);
  19. return this->GetLibrary()->GetUndefined();
  20. }
  21. BOOL NullEnumerator::MoveNext(PropertyAttributes* attributes)
  22. {
  23. return FALSE;
  24. }
  25. void NullEnumerator::Reset()
  26. {
  27. }
  28. Var NullEnumerator::GetCurrentAndMoveNext(PropertyId& propertyId, PropertyAttributes* attributes)
  29. {
  30. return NULL;
  31. }
  32. bool NullEnumerator::GetCurrentPropertyId(PropertyId *propertyId)
  33. {
  34. return false;
  35. }
  36. };