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

Side by Side Diff: src/inspector/inspected-context.h

Issue 2413583002: [inspector] added check that context always survives inspected context (Closed)
Patch Set: improve comment 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/inspector/inspected-context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_INSPECTOR_INSPECTEDCONTEXT_H_ 5 #ifndef V8_INSPECTOR_INSPECTEDCONTEXT_H_
6 #define V8_INSPECTOR_INSPECTEDCONTEXT_H_ 6 #define V8_INSPECTOR_INSPECTEDCONTEXT_H_
7 7
8 #include "src/base/macros.h" 8 #include "src/base/macros.h"
9 #include "src/inspector/string-16.h" 9 #include "src/inspector/string-16.h"
10 10
(...skipping 23 matching lines...) Expand all
34 v8::Isolate* isolate() const; 34 v8::Isolate* isolate() const;
35 V8InspectorImpl* inspector() const { return m_inspector; } 35 V8InspectorImpl* inspector() const { return m_inspector; }
36 36
37 InjectedScript* getInjectedScript() { return m_injectedScript.get(); } 37 InjectedScript* getInjectedScript() { return m_injectedScript.get(); }
38 void createInjectedScript(); 38 void createInjectedScript();
39 void discardInjectedScript(); 39 void discardInjectedScript();
40 40
41 private: 41 private:
42 friend class V8InspectorImpl; 42 friend class V8InspectorImpl;
43 InspectedContext(V8InspectorImpl*, const V8ContextInfo&, int contextId); 43 InspectedContext(V8InspectorImpl*, const V8ContextInfo&, int contextId);
44 static void weakCallback(const v8::WeakCallbackInfo<InspectedContext>&);
45 static void consoleWeakCallback(
46 const v8::WeakCallbackInfo<InspectedContext>&);
47 44
48 V8InspectorImpl* m_inspector; 45 V8InspectorImpl* m_inspector;
49 v8::Global<v8::Context> m_context; 46 v8::Global<v8::Context> m_context;
50 int m_contextId; 47 int m_contextId;
51 int m_contextGroupId; 48 int m_contextGroupId;
52 const String16 m_origin; 49 const String16 m_origin;
53 const String16 m_humanReadableName; 50 const String16 m_humanReadableName;
54 const String16 m_auxData; 51 const String16 m_auxData;
55 bool m_reported; 52 bool m_reported;
56 std::unique_ptr<InjectedScript> m_injectedScript; 53 std::unique_ptr<InjectedScript> m_injectedScript;
57 v8::Global<v8::Object> m_console; 54 v8::Global<v8::Object> m_console;
58 55
59 DISALLOW_COPY_AND_ASSIGN(InspectedContext); 56 DISALLOW_COPY_AND_ASSIGN(InspectedContext);
60 }; 57 };
61 58
62 } // namespace v8_inspector 59 } // namespace v8_inspector
63 60
64 #endif // V8_INSPECTOR_INSPECTEDCONTEXT_H_ 61 #endif // V8_INSPECTOR_INSPECTEDCONTEXT_H_
OLDNEW
« no previous file with comments | « no previous file | src/inspector/inspected-context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698