Index: test/inspector/inspector-impl.cc |
diff --git a/test/inspector/inspector-impl.cc b/test/inspector/inspector-impl.cc |
index 37aa27473b536a64444fdd9effd9ea48ce7b6ab0..956227695393d4c3abf59c822f799c21b5053f40 100644 |
--- a/test/inspector/inspector-impl.cc |
+++ b/test/inspector/inspector-impl.cc |
@@ -32,6 +32,14 @@ class ChannelImpl final : public v8_inspector::V8Inspector::Channel { |
DISALLOW_COPY_AND_ASSIGN(ChannelImpl); |
}; |
+InspectorClientImpl* InspectorClientFromContext( |
+ v8::Local<v8::Context> context) { |
+ InspectorClientImpl* inspector_client = static_cast<InspectorClientImpl*>( |
+ context->GetAlignedPointerFromEmbedderData(kInspectorClientIndex)); |
+ CHECK(inspector_client); |
+ return inspector_client; |
+} |
+ |
} // namespace |
class ConnectTask : public TaskRunner::Task { |
@@ -96,12 +104,14 @@ void InspectorClientImpl::quitMessageLoopOnPause() { |
task_runner_->QuitMessageLoop(); |
} |
+v8_inspector::V8Inspector* InspectorClientImpl::InspectorFromContext( |
+ v8::Local<v8::Context> context) { |
+ return InspectorClientFromContext(context)->inspector_.get(); |
+} |
+ |
v8_inspector::V8InspectorSession* InspectorClientImpl::SessionFromContext( |
v8::Local<v8::Context> context) { |
- InspectorClientImpl* inspector_client = static_cast<InspectorClientImpl*>( |
- context->GetAlignedPointerFromEmbedderData(kInspectorClientIndex)); |
- CHECK(inspector_client); |
- return inspector_client->session_.get(); |
+ return InspectorClientFromContext(context)->session_.get(); |
} |
class SendMessageToBackendTask : public TaskRunner::Task { |