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

Unified Diff: src/inspector/inspected-context.h

Issue 2916803005: [inspector] Create InjectedScript per session in each context (Closed)
Patch Set: rebased Created 3 years, 6 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 | « src/inspector/injected-script.cc ('k') | src/inspector/inspected-context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/inspected-context.h
diff --git a/src/inspector/inspected-context.h b/src/inspector/inspected-context.h
index 04246712c424ad555bf78a0e90ea3f355d63f84a..b32263bc2e70334b6bc6fca971f41428cda73fda 100644
--- a/src/inspector/inspected-context.h
+++ b/src/inspector/inspected-context.h
@@ -5,7 +5,7 @@
#ifndef V8_INSPECTOR_INSPECTEDCONTEXT_H_
#define V8_INSPECTOR_INSPECTEDCONTEXT_H_
-#include <map>
+#include <unordered_map>
#include <unordered_set>
#include "src/base/macros.h"
@@ -39,9 +39,9 @@ class InspectedContext {
v8::Isolate* isolate() const;
V8InspectorImpl* inspector() const { return m_inspector; }
- InjectedScript* getInjectedScript() { return m_injectedScript.get(); }
- bool createInjectedScript();
- void discardInjectedScript();
+ InjectedScript* getInjectedScript(int sessionId);
+ bool createInjectedScript(int sessionId);
+ void discardInjectedScript(int sessionId);
private:
friend class V8InspectorImpl;
@@ -55,7 +55,7 @@ class InspectedContext {
const String16 m_humanReadableName;
const String16 m_auxData;
std::unordered_set<int> m_reportedSessionIds;
- std::unique_ptr<InjectedScript> m_injectedScript;
+ std::unordered_map<int, std::unique_ptr<InjectedScript>> m_injectedScripts;
DISALLOW_COPY_AND_ASSIGN(InspectedContext);
};
« no previous file with comments | « src/inspector/injected-script.cc ('k') | src/inspector/inspected-context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698