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

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

Issue 13575004: Apply script preprocessor to Web page scripts only. (Closed) Base URL: https://chromium.googlesource.com/external/WebKit_trimmed.git@master
Patch Set: rebase Created 7 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
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 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "core/inspector/PageDebuggerAgent.h" 32 #include "core/inspector/PageDebuggerAgent.h"
33 33
34 #include "bindings/v8/DOMWrapperWorld.h" 34 #include "bindings/v8/DOMWrapperWorld.h"
35 #include "bindings/v8/PageScriptDebugServer.h" 35 #include "bindings/v8/PageScriptDebugServer.h"
36 #include "bindings/v8/ScriptController.h"
36 #include "core/inspector/InspectorOverlay.h" 37 #include "core/inspector/InspectorOverlay.h"
37 #include "core/inspector/InspectorPageAgent.h" 38 #include "core/inspector/InspectorPageAgent.h"
38 #include "core/inspector/InstrumentingAgents.h" 39 #include "core/inspector/InstrumentingAgents.h"
40 #include "core/page/Frame.h"
39 #include "core/page/Page.h" 41 #include "core/page/Page.h"
40 #include "core/page/PageConsole.h" 42 #include "core/page/PageConsole.h"
41 43
42 namespace WebCore { 44 namespace WebCore {
43 45
44 PassOwnPtr<PageDebuggerAgent> PageDebuggerAgent::create(InstrumentingAgents* ins trumentingAgents, InspectorCompositeState* inspectorState, PageScriptDebugServer * pageScriptDebugServer, InspectorPageAgent* pageAgent, InjectedScriptManager* i njectedScriptManager, InspectorOverlay* overlay) 46 PassOwnPtr<PageDebuggerAgent> PageDebuggerAgent::create(InstrumentingAgents* ins trumentingAgents, InspectorCompositeState* inspectorState, PageScriptDebugServer * pageScriptDebugServer, InspectorPageAgent* pageAgent, InjectedScriptManager* i njectedScriptManager, InspectorOverlay* overlay)
45 { 47 {
46 return adoptPtr(new PageDebuggerAgent(instrumentingAgents, inspectorState, p ageScriptDebugServer, pageAgent, injectedScriptManager, overlay)); 48 return adoptPtr(new PageDebuggerAgent(instrumentingAgents, inspectorState, p ageScriptDebugServer, pageAgent, injectedScriptManager, overlay));
47 } 49 }
48 50
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 { 131 {
130 m_overlay->setPausedInDebuggerMessage(message); 132 m_overlay->setPausedInDebuggerMessage(message);
131 } 133 }
132 134
133 void PageDebuggerAgent::didClearWindowObjectInWorld(Frame* frame, DOMWrapperWorl d* world) 135 void PageDebuggerAgent::didClearWindowObjectInWorld(Frame* frame, DOMWrapperWorl d* world)
134 { 136 {
135 if (world != mainThreadNormalWorld() || frame != m_pageAgent->mainFrame()) 137 if (world != mainThreadNormalWorld() || frame != m_pageAgent->mainFrame())
136 return; 138 return;
137 139
138 reset(); 140 reset();
139 scriptDebugServer().setScriptPreprocessor(m_pageAgent->scriptPreprocessor()) ; 141 frame->script()->setScriptPreprocessor(m_pageAgent->scriptPreprocessor());
abarth-chromium 2013/07/08 23:57:08 Ah, we do clear it each time the Frame navigates.
johnjbarton 2013/07/09 22:44:54 I'll need to check with Pavel Feldman, but I belie
140 } 142 }
141 143
142 } // namespace WebCore 144 } // namespace WebCore
143 145
OLDNEW
« Source/bindings/v8/ScriptDebugServer.cpp ('K') | « Source/bindings/v8/V8LazyEventListener.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698