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

Side by Side Diff: Source/core/inspector/InjectedScriptHost.h

Issue 306053010: Tried using CrossThreadPersistent for workerDebuggerAgents (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/DOMEditor.cpp ('k') | Source/core/inspector/InjectedScriptHost.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class ScriptValue; 49 class ScriptValue;
50 class Storage; 50 class Storage;
51 51
52 struct EventListenerInfo; 52 struct EventListenerInfo;
53 53
54 // SECURITY NOTE: Although the InjectedScriptHost is intended for use solely by the inspector, 54 // SECURITY NOTE: Although the InjectedScriptHost is intended for use solely by the inspector,
55 // a reference to the InjectedScriptHost may be leaked to the page being inspect ed. Thus, the 55 // a reference to the InjectedScriptHost may be leaked to the page being inspect ed. Thus, the
56 // InjectedScriptHost must never implemment methods that have more power over th e page than the 56 // InjectedScriptHost must never implemment methods that have more power over th e page than the
57 // page already has itself (e.g. origin restriction bypasses). 57 // page already has itself (e.g. origin restriction bypasses).
58 58
59 class InjectedScriptHost : public RefCounted<InjectedScriptHost>, public ScriptW rappable { 59 class InjectedScriptHost : public RefCountedWillBeGarbageCollectedFinalized<Inje ctedScriptHost>, public ScriptWrappable {
60 public: 60 public:
61 static PassRefPtr<InjectedScriptHost> create(); 61 static PassRefPtrWillBeRawPtr<InjectedScriptHost> create();
62 ~InjectedScriptHost(); 62 ~InjectedScriptHost();
63 void trace(Visitor*);
63 64
64 void init(InstrumentingAgents* instrumentingAgents, ScriptDebugServer* scrip tDebugServer) 65 void init(InstrumentingAgents* instrumentingAgents, ScriptDebugServer* scrip tDebugServer)
65 { 66 {
66 m_instrumentingAgents = instrumentingAgents; 67 m_instrumentingAgents = instrumentingAgents;
67 m_scriptDebugServer = scriptDebugServer; 68 m_scriptDebugServer = scriptDebugServer;
68 } 69 }
69 70
70 static Node* scriptValueAsNode(ScriptValue); 71 static Node* scriptValueAsNode(ScriptValue);
71 static ScriptValue nodeAsScriptValue(ScriptState*, Node*); 72 static ScriptValue nodeAsScriptValue(ScriptState*, Node*);
72 73
(...skipping 16 matching lines...) Expand all
89 void debugFunction(const String& scriptId, int lineNumber, int columnNumber) ; 90 void debugFunction(const String& scriptId, int lineNumber, int columnNumber) ;
90 void undebugFunction(const String& scriptId, int lineNumber, int columnNumbe r); 91 void undebugFunction(const String& scriptId, int lineNumber, int columnNumbe r);
91 void monitorFunction(const String& scriptId, int lineNumber, int columnNumbe r, const String& functionName); 92 void monitorFunction(const String& scriptId, int lineNumber, int columnNumbe r, const String& functionName);
92 void unmonitorFunction(const String& scriptId, int lineNumber, int columnNum ber); 93 void unmonitorFunction(const String& scriptId, int lineNumber, int columnNum ber);
93 94
94 ScriptDebugServer& scriptDebugServer() { return *m_scriptDebugServer; } 95 ScriptDebugServer& scriptDebugServer() { return *m_scriptDebugServer; }
95 96
96 private: 97 private:
97 InjectedScriptHost(); 98 InjectedScriptHost();
98 99
99 InstrumentingAgents* m_instrumentingAgents; 100 RawPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents;
100 ScriptDebugServer* m_scriptDebugServer; 101 ScriptDebugServer* m_scriptDebugServer;
101 Vector<OwnPtr<InspectableObject> > m_inspectedObjects; 102 Vector<OwnPtr<InspectableObject> > m_inspectedObjects;
102 OwnPtr<InspectableObject> m_defaultInspectableObject; 103 OwnPtr<InspectableObject> m_defaultInspectableObject;
103 }; 104 };
104 105
105 } // namespace WebCore 106 } // namespace WebCore
106 107
107 #endif // !defined(InjectedScriptHost_h) 108 #endif // !defined(InjectedScriptHost_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/DOMEditor.cpp ('k') | Source/core/inspector/InjectedScriptHost.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698