forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjsrtHelper.h
More file actions
23 lines (21 loc) · 979 Bytes
/
jsrtHelper.h
File metadata and controls
23 lines (21 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
#pragma once
class JsrtCallbackState
{
public:
JsrtCallbackState(ThreadContext* currentThreadContext);
~JsrtCallbackState();
static void ObjectBeforeCallectCallbackWrapper(JsObjectBeforeCollectCallback callback, void* object, void* callbackState, void* threadContext);
private:
ThreadContext* originalThreadContext;
JsrtContext* originalJsrtContext;
};
#if defined(CHAKRA_STATIC_LIBRARY) || !defined(_WIN32)
_NOINLINE void VALIDATE_ENTER_CURRENT_THREAD();
#else
// Windows Shared Library: DllMain is responsible from handling all these stuff
#define VALIDATE_ENTER_CURRENT_THREAD()
#endif