Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: test/inspector/inspector-impl.cc

Issue 2372793002: [inspector] added inspector test runner [part 3] (Closed)
Patch Set: added missing header Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/inspector/inspector-impl.h ('k') | test/inspector/inspector-test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « test/inspector/inspector-impl.h ('k') | test/inspector/inspector-test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698