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

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

Issue 1240373002: Revert of [DevTools] Remove edited scripts from debugger agent, move knowledge to frontend. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010-2011 Google Inc. All rights reserved. 3 * Copyright (C) 2010-2011 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 void schedulePauseOnNextStatement(InspectorFrontend::Debugger::Reason::Enum breakReason, PassRefPtr<JSONObject> data); 140 void schedulePauseOnNextStatement(InspectorFrontend::Debugger::Reason::Enum breakReason, PassRefPtr<JSONObject> data);
141 void didFireTimer(); 141 void didFireTimer();
142 void didHandleEvent(); 142 void didHandleEvent();
143 bool canBreakProgram(); 143 bool canBreakProgram();
144 void breakProgram(InspectorFrontend::Debugger::Reason::Enum breakReason, Pas sRefPtr<JSONObject> data); 144 void breakProgram(InspectorFrontend::Debugger::Reason::Enum breakReason, Pas sRefPtr<JSONObject> data);
145 void scriptExecutionBlockedByCSP(const String& directiveText); 145 void scriptExecutionBlockedByCSP(const String& directiveText);
146 void willCallFunction(ExecutionContext*, const DevToolsFunctionInfo&); 146 void willCallFunction(ExecutionContext*, const DevToolsFunctionInfo&);
147 void didCallFunction(); 147 void didCallFunction();
148 void willEvaluateScript(LocalFrame*, const String& url, int lineNumber); 148 void willEvaluateScript(LocalFrame*, const String& url, int lineNumber);
149 void didEvaluateScript(); 149 void didEvaluateScript();
150 bool getEditedScript(const String& url, String* content);
150 151
151 class CORE_EXPORT Listener : public WillBeGarbageCollectedMixin { 152 class CORE_EXPORT Listener : public WillBeGarbageCollectedMixin {
152 public: 153 public:
153 virtual ~Listener() { } 154 virtual ~Listener() { }
154 virtual void debuggerWasEnabled() = 0; 155 virtual void debuggerWasEnabled() = 0;
155 virtual void debuggerWasDisabled() = 0; 156 virtual void debuggerWasDisabled() = 0;
156 virtual bool canPauseOnPromiseEvent() = 0; 157 virtual bool canPauseOnPromiseEvent() = 0;
157 virtual void didCreatePromise() = 0; 158 virtual void didCreatePromise() = 0;
158 virtual void didResolvePromise() = 0; 159 virtual void didResolvePromise() = 0;
159 virtual void didRejectPromise() = 0; 160 virtual void didRejectPromise() = 0;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 virtual void muteConsole() = 0; 197 virtual void muteConsole() = 0;
197 virtual void unmuteConsole() = 0; 198 virtual void unmuteConsole() = 0;
198 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana ger; } 199 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana ger; }
199 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut ionContextId) = 0; 200 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut ionContextId) = 0;
200 201
201 virtual void enable(); 202 virtual void enable();
202 virtual void disable(); 203 virtual void disable();
203 204
204 void didContinue() final; 205 void didContinue() final;
205 void reset(); 206 void reset();
207 void resetModifiedSources();
206 208
207 private: 209 private:
208 bool checkEnabled(ErrorString*); 210 bool checkEnabled(ErrorString*);
209 211
210 SkipPauseRequest didPause(v8::Local<v8::Context>, v8::Local<v8::Object> call Frames, v8::Local<v8::Value> exception, const Vector<String>& hitBreakpoints, bo ol isPromiseRejection) final; 212 SkipPauseRequest didPause(v8::Local<v8::Context>, v8::Local<v8::Object> call Frames, v8::Local<v8::Value> exception, const Vector<String>& hitBreakpoints, bo ol isPromiseRejection) final;
211 213
212 SkipPauseRequest shouldSkipExceptionPause(); 214 SkipPauseRequest shouldSkipExceptionPause();
213 SkipPauseRequest shouldSkipStepPause(); 215 SkipPauseRequest shouldSkipStepPause();
214 216
215 void schedulePauseOnNextStatementIfSteppingInto(); 217 void schedulePauseOnNextStatementIfSteppingInto();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 int m_recursionLevelForStepOut; 286 int m_recursionLevelForStepOut;
285 int m_recursionLevelForStepFrame; 287 int m_recursionLevelForStepFrame;
286 bool m_skipAllPauses; 288 bool m_skipAllPauses;
287 bool m_skipContentScripts; 289 bool m_skipContentScripts;
288 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp; 290 OwnPtr<ScriptRegexp> m_cachedSkipStackRegExp;
289 unsigned m_cachedSkipStackGeneration; 291 unsigned m_cachedSkipStackGeneration;
290 WillBeHeapHashSet<RawPtrWillBeWeakMember<AsyncCallTrackingListener>> m_async CallTrackingListeners; 292 WillBeHeapHashSet<RawPtrWillBeWeakMember<AsyncCallTrackingListener>> m_async CallTrackingListeners;
291 // This field must be destroyed before the listeners set above. 293 // This field must be destroyed before the listeners set above.
292 OwnPtrWillBeMember<V8AsyncCallTracker> m_v8AsyncCallTracker; 294 OwnPtrWillBeMember<V8AsyncCallTracker> m_v8AsyncCallTracker;
293 OwnPtrWillBeMember<PromiseTracker> m_promiseTracker; 295 OwnPtrWillBeMember<PromiseTracker> m_promiseTracker;
296 HashMap<String, String> m_editedScripts;
294 297
295 using AsyncOperationIdToAsyncCallChain = WillBeHeapHashMap<int, RefPtrWillBe Member<AsyncCallChain>>; 298 using AsyncOperationIdToAsyncCallChain = WillBeHeapHashMap<int, RefPtrWillBe Member<AsyncCallChain>>;
296 AsyncOperationIdToAsyncCallChain m_asyncOperations; 299 AsyncOperationIdToAsyncCallChain m_asyncOperations;
297 int m_lastAsyncOperationId; 300 int m_lastAsyncOperationId;
298 ListHashSet<int> m_asyncOperationNotifications; 301 ListHashSet<int> m_asyncOperationNotifications;
299 HashSet<int> m_asyncOperationBreakpoints; 302 HashSet<int> m_asyncOperationBreakpoints;
300 HashSet<int> m_pausingAsyncOperations; 303 HashSet<int> m_pausingAsyncOperations;
301 unsigned m_maxAsyncCallStackDepth; 304 unsigned m_maxAsyncCallStackDepth;
302 RefPtrWillBeMember<AsyncCallChain> m_currentAsyncCallChain; 305 RefPtrWillBeMember<AsyncCallChain> m_currentAsyncCallChain;
303 unsigned m_nestedAsyncCallCount; 306 unsigned m_nestedAsyncCallCount;
304 int m_currentAsyncOperationId; 307 int m_currentAsyncOperationId;
305 bool m_pendingTraceAsyncOperationCompleted; 308 bool m_pendingTraceAsyncOperationCompleted;
306 bool m_startingStepIntoAsync; 309 bool m_startingStepIntoAsync;
307 V8GlobalValueMap<String, v8::Script, v8::kNotWeak> m_compiledScripts; 310 V8GlobalValueMap<String, v8::Script, v8::kNotWeak> m_compiledScripts;
308 }; 311 };
309 312
310 } // namespace blink 313 } // namespace blink
311 314
312 315
313 #endif // InspectorDebuggerAgent_h 316 #endif // InspectorDebuggerAgent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698