1 // Copyright 2020 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef V8_TOOLS_V8WINDBG_SRC_CUR_ISOLATE_H_ 6 #define V8_TOOLS_V8WINDBG_SRC_CUR_ISOLATE_H_ 7 8 #include <crtdbg.h> 9 #include <wrl/implements.h> 10 11 #include <string> 12 #include <vector> 13 14 #include "tools/v8windbg/base/utilities.h" 15 #include "tools/v8windbg/src/v8-debug-helper-interop.h" 16 #include "tools/v8windbg/src/v8windbg-extension.h" 17 18 HRESULT GetCurrentIsolate(WRL::ComPtr<IModelObject>& sp_result); 19 20 constexpr wchar_t kIsolateKey[] = L"v8::internal::Isolate::isolate_key_"; 21 constexpr wchar_t kIsolate[] = L"v8::internal::Isolate"; 22 23 class CurrIsolateAlias 24 : public WRL::RuntimeClass< 25 WRL::RuntimeClassFlags<WRL::RuntimeClassType::ClassicCom>, 26 IModelMethod> { 27 public: 28 IFACEMETHOD(Call) 29 (IModelObject* p_context_object, ULONG64 arg_count, 30 _In_reads_(arg_count) IModelObject** pp_arguments, IModelObject** pp_result, 31 IKeyStore** pp_metadata); 32 }; 33 34 #endif // V8_TOOLS_V8WINDBG_SRC_CUR_ISOLATE_H_ 35