jsrtHelper.h 979 B

1234567891011121314151617181920212223
  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. #pragma once
  6. class JsrtCallbackState
  7. {
  8. public:
  9. JsrtCallbackState(ThreadContext* currentThreadContext);
  10. ~JsrtCallbackState();
  11. static void ObjectBeforeCallectCallbackWrapper(JsObjectBeforeCollectCallback callback, void* object, void* callbackState, void* threadContext);
  12. private:
  13. ThreadContext* originalThreadContext;
  14. JsrtContext* originalJsrtContext;
  15. };
  16. #if defined(CHAKRA_STATIC_LIBRARY) || !defined(_WIN32)
  17. _NOINLINE void VALIDATE_ENTER_CURRENT_THREAD();
  18. #else
  19. // Windows Shared Library: DllMain is responsible from handling all these stuff
  20. #define VALIDATE_ENTER_CURRENT_THREAD()
  21. #endif