From d67ed1177827c6c9703801b1ec501efca17beac0 Mon Sep 17 00:00:00 2001 From: Kyle Farnung Date: Mon, 12 Mar 2018 13:35:35 -0700 Subject: [PATCH] chakrashim: fixing build warnings in clang PR-URL: https://github.com/nodejs/node-chakracore/pull/497 Reviewed-By: Jimmy Thomson Reviewed-By: Taylor Woll --- deps/chakrashim/include/libplatform/v8-tracing.h | 16 +++++++++------- deps/chakrashim/include/v8-profiler.h | 4 ++++ .../src/inspector/v8-console-message.cc | 2 -- deps/chakrashim/src/inspector/v8-debugger.cc | 1 - deps/chakrashim/src/inspector/v8-debugger.h | 1 - .../src/inspector/v8-timetravel-agent-impl.cc | 3 +-- .../src/inspector/v8-timetravel-agent-impl.h | 1 - deps/chakrashim/src/jsrtcontextshim.cc | 1 - deps/chakrashim/src/jsrtcontextshim.h | 3 --- deps/chakrashim/src/v8v8.cc | 11 +++++++++++ 10 files changed, 25 insertions(+), 18 deletions(-) diff --git a/deps/chakrashim/include/libplatform/v8-tracing.h b/deps/chakrashim/include/libplatform/v8-tracing.h index 1a7cf16eb83..76e159acff6 100644 --- a/deps/chakrashim/include/libplatform/v8-tracing.h +++ b/deps/chakrashim/include/libplatform/v8-tracing.h @@ -223,15 +223,17 @@ class TracingController TracingController() {} void Initialize(TraceBuffer* trace_buffer); - const uint8_t* GetCategoryGroupEnabled(const char* category_group); + const uint8_t* GetCategoryGroupEnabled(const char* category_group) override; static const char* GetCategoryGroupName(const uint8_t* category_enabled_flag); - uint64_t AddTraceEvent(char phase, const uint8_t* category_enabled_flag, - const char* name, const char* scope, uint64_t id, - uint64_t bind_id, int32_t num_args, - const char** arg_names, const uint8_t* arg_types, - const uint64_t* arg_values, unsigned int flags); + uint64_t AddTraceEvent( + char phase, const uint8_t* category_enabled_flag, const char* name, + const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args, + const char** arg_names, const uint8_t* arg_types, + const uint64_t* arg_values, + std::unique_ptr* arg_convertables, + unsigned int flags) override; void UpdateTraceEventDuration(const uint8_t* category_enabled_flag, - const char* name, uint64_t handle); + const char* name, uint64_t handle) override; void StartTracing(TraceConfig* trace_config); void StopTracing(); diff --git a/deps/chakrashim/include/v8-profiler.h b/deps/chakrashim/include/v8-profiler.h index 1b929b3f926..f703733172e 100644 --- a/deps/chakrashim/include/v8-profiler.h +++ b/deps/chakrashim/include/v8-profiler.h @@ -115,6 +115,10 @@ class V8_EXPORT RetainedObjectInfo { virtual const char *GetGroupLabel() { return nullptr; } virtual intptr_t GetElementCount() { return 0; } virtual intptr_t GetSizeInBytes() { return 0; } + + protected: + RetainedObjectInfo() {} + virtual ~RetainedObjectInfo() {} }; struct HeapStatsUpdate { diff --git a/deps/chakrashim/src/inspector/v8-console-message.cc b/deps/chakrashim/src/inspector/v8-console-message.cc index c184b80b0a1..167470c6164 100644 --- a/deps/chakrashim/src/inspector/v8-console-message.cc +++ b/deps/chakrashim/src/inspector/v8-console-message.cc @@ -236,7 +236,6 @@ V8ConsoleMessage::wrapArguments(V8InspectorSessionImpl* session, v8::Isolate* isolate = inspectedContext->isolate(); v8::HandleScope handles(isolate); - v8::Local context = inspectedContext->context(); std::unique_ptr> args = protocol::Array::create(); @@ -247,7 +246,6 @@ V8ConsoleMessage::wrapArguments(V8InspectorSessionImpl* session, } else { for (size_t i = 0; i < m_arguments.size(); ++i) { // CHAKRA-TODO - Figure out what to do here. - v8::Local arg = m_arguments[i]->Get(isolate); std::unique_ptr wrapped = nullptr; if (!wrapped) { args = nullptr; diff --git a/deps/chakrashim/src/inspector/v8-debugger.cc b/deps/chakrashim/src/inspector/v8-debugger.cc index 877dd5c70a4..de7625c3415 100644 --- a/deps/chakrashim/src/inspector/v8-debugger.cc +++ b/deps/chakrashim/src/inspector/v8-debugger.cc @@ -24,7 +24,6 @@ V8Debugger::V8Debugger(v8::Isolate* isolate, V8InspectorImpl* inspector) m_enableCount(0), m_breakpointsActivated(true), m_runningNestedMessageLoop(false), - m_ignoreScriptParsedEventsCounter(0), m_maxAsyncCallStackDepth(0), m_pauseOnNextStatement(false) {} diff --git a/deps/chakrashim/src/inspector/v8-debugger.h b/deps/chakrashim/src/inspector/v8-debugger.h index bcf479d0e64..3f85ccea092 100644 --- a/deps/chakrashim/src/inspector/v8-debugger.h +++ b/deps/chakrashim/src/inspector/v8-debugger.h @@ -130,7 +130,6 @@ class V8Debugger { v8::Global m_debuggerContext; v8::Local m_pausedContext; bool m_runningNestedMessageLoop; - int m_ignoreScriptParsedEventsCounter; int m_maxAsyncCallStackDepth; bool m_pauseOnNextStatement; diff --git a/deps/chakrashim/src/inspector/v8-timetravel-agent-impl.cc b/deps/chakrashim/src/inspector/v8-timetravel-agent-impl.cc index 538a069abf6..26d6423b5bc 100644 --- a/deps/chakrashim/src/inspector/v8-timetravel-agent-impl.cc +++ b/deps/chakrashim/src/inspector/v8-timetravel-agent-impl.cc @@ -13,8 +13,7 @@ V8TimeTravelAgentImpl::V8TimeTravelAgentImpl( V8InspectorSessionImpl* session, protocol::FrontendChannel* frontendChannel, protocol::DictionaryValue* state) : m_session(session), - m_frontend(frontendChannel), - m_state(state) {} + m_frontend(frontendChannel) {} V8TimeTravelAgentImpl::~V8TimeTravelAgentImpl() {} diff --git a/deps/chakrashim/src/inspector/v8-timetravel-agent-impl.h b/deps/chakrashim/src/inspector/v8-timetravel-agent-impl.h index 7ebf516b716..0d867daa683 100644 --- a/deps/chakrashim/src/inspector/v8-timetravel-agent-impl.h +++ b/deps/chakrashim/src/inspector/v8-timetravel-agent-impl.h @@ -37,7 +37,6 @@ class V8TimeTravelAgentImpl : public protocol::TimeTravel::Backend { V8InspectorSessionImpl* m_session; protocol::TimeTravel::Frontend m_frontend; - protocol::DictionaryValue* m_state; DISALLOW_COPY_AND_ASSIGN(V8TimeTravelAgentImpl); }; diff --git a/deps/chakrashim/src/jsrtcontextshim.cc b/deps/chakrashim/src/jsrtcontextshim.cc index 5b7331741d8..69feed079ab 100644 --- a/deps/chakrashim/src/jsrtcontextshim.cc +++ b/deps/chakrashim/src/jsrtcontextshim.cc @@ -80,7 +80,6 @@ ContextShim::ContextShim(IsolateShim * isolateShim, zero(JS_INVALID_REFERENCE), globalObject(JS_INVALID_REFERENCE), proxyOfGlobal(JS_INVALID_REFERENCE), - promiseContinuationFunction(JS_INVALID_REFERENCE), #include "jsrtcachedpropertyidref.inc" #undef DEF_IS_TYPE cloneObjectFunction(JS_INVALID_REFERENCE), diff --git a/deps/chakrashim/src/jsrtcontextshim.h b/deps/chakrashim/src/jsrtcontextshim.h index 81f11cfce8e..d79093943cf 100644 --- a/deps/chakrashim/src/jsrtcontextshim.h +++ b/deps/chakrashim/src/jsrtcontextshim.h @@ -137,9 +137,6 @@ class ContextShim { JsValueRef proxyOfGlobal; JsValueRef globalPrototypeFunction[GlobalPrototypeFunction::_FunctionCount]; - JsValueRef getOwnPropertyDescriptorFunction; - - JsValueRef promiseContinuationFunction; std::vector embedderData; #define DECLARE_CHAKRASHIM_FUNCTION_GETTER(F) \ diff --git a/deps/chakrashim/src/v8v8.cc b/deps/chakrashim/src/v8v8.cc index 17f5e499738..7df600518cc 100644 --- a/deps/chakrashim/src/v8v8.cc +++ b/deps/chakrashim/src/v8v8.cc @@ -247,6 +247,17 @@ namespace tracing { return nullptr; } + uint64_t TracingController::AddTraceEvent( + char phase, const uint8_t* category_enabled_flag, const char* name, + const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args, + const char** arg_names, const uint8_t* arg_types, + const uint64_t* arg_values, + std::unique_ptr* arg_convertables, + unsigned int flags) { + jsrt::Unimplemented("TracingController"); + return 0; + } + void TracingController::UpdateTraceEventDuration( const uint8_t* category_enabled_flag, const char* name, uint64_t handle) { jsrt::Unimplemented("TracingController");