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

Side by Side Diff: Source/core/inspector/MainThreadDebugger.cpp

Issue 1217773007: [DevTools] Replace reportCompiledScripts with explicit [get]compiledScripts. (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) 2011 Google Inc. All rights reserved. 2 * Copyright (c) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 ASSERT(localFrameRoot == localFrameRoot->localFrameRoot()); 108 ASSERT(localFrameRoot == localFrameRoot->localFrameRoot());
109 109
110 ScriptController& scriptController = localFrameRoot->script(); 110 ScriptController& scriptController = localFrameRoot->script();
111 if (!scriptController.canExecuteScripts(NotAboutToExecuteScript)) 111 if (!scriptController.canExecuteScripts(NotAboutToExecuteScript))
112 return; 112 return;
113 113
114 if (m_listenersMap.isEmpty()) 114 if (m_listenersMap.isEmpty())
115 debugger()->enable(); 115 debugger()->enable();
116 m_listenersMap.set(localFrameRoot, listener); 116 m_listenersMap.set(localFrameRoot, listener);
117 String contextDataSubstring = "," + String::number(contextDebugId) + "]"; 117 String contextDataSubstring = "," + String::number(contextDebugId) + "]";
118 debugger()->reportCompiledScripts(contextDataSubstring, listener); 118 Vector<ScriptDebugListener::ParsedScript> compiledScripts;
119 debugger()->compiledScripts(contextDataSubstring, compiledScripts);
120 for (size_t i = 0; i < compiledScripts.size(); i++)
yurys 2015/07/07 06:44:54 This logic is now duplicated in 2 places. What's t
dgozman 2015/07/07 07:29:47 It's: 1) more straitforward, 2) allows V8Debugger
121 listener->didParseSource(compiledScripts[i]);
119 } 122 }
120 123
121 void MainThreadDebugger::removeListener(ScriptDebugListener* listener, LocalFram e* localFrame) 124 void MainThreadDebugger::removeListener(ScriptDebugListener* listener, LocalFram e* localFrame)
122 { 125 {
123 if (!m_listenersMap.contains(localFrame)) 126 if (!m_listenersMap.contains(localFrame))
124 return; 127 return;
125 128
126 if (m_pausedFrame == localFrame) 129 if (m_pausedFrame == localFrame)
127 debugger()->continueProgram(); 130 debugger()->continueProgram();
128 131
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 172
170 m_pausedFrame = 0; 173 m_pausedFrame = 0;
171 } 174 }
172 175
173 void MainThreadDebugger::quitMessageLoopOnPause() 176 void MainThreadDebugger::quitMessageLoopOnPause()
174 { 177 {
175 m_clientMessageLoop->quitNow(); 178 m_clientMessageLoop->quitNow();
176 } 179 }
177 180
178 } // namespace blink 181 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698