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

Side by Side Diff: Source/bindings/v8/PageScriptDebugServer.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: respond to haraken comment #35 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 if (global.IsEmpty()) 57 if (global.IsEmpty())
58 return 0; 58 return 0;
59 59
60 global = global->FindInstanceInPrototypeChain(V8Window::GetTemplate(context- >GetIsolate(), worldTypeInMainThread(context->GetIsolate()))); 60 global = global->FindInstanceInPrototypeChain(V8Window::GetTemplate(context- >GetIsolate(), worldTypeInMainThread(context->GetIsolate())));
61 if (global.IsEmpty()) 61 if (global.IsEmpty())
62 return 0; 62 return 0;
63 63
64 return toFrameIfNotDetached(context); 64 return toFrameIfNotDetached(context);
65 } 65 }
66 66
67 ScriptController* PageScriptDebugServer::scriptController(v8::Handle<v8::Context > context)
68 {
69 Frame* frame = retrieveFrameWithGlobalObjectCheck(context);
70 if (frame)
71 return frame->script();
72 }
73
67 PageScriptDebugServer& PageScriptDebugServer::shared() 74 PageScriptDebugServer& PageScriptDebugServer::shared()
68 { 75 {
69 DEFINE_STATIC_LOCAL(PageScriptDebugServer, server, ()); 76 DEFINE_STATIC_LOCAL(PageScriptDebugServer, server, ());
70 return server; 77 return server;
71 } 78 }
72 79
73 PageScriptDebugServer::PageScriptDebugServer() 80 PageScriptDebugServer::PageScriptDebugServer()
74 : ScriptDebugServer(v8::Isolate::GetCurrent()) 81 : ScriptDebugServer(v8::Isolate::GetCurrent())
75 , m_pausedPage(0) 82 , m_pausedPage(0)
76 { 83 {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 v8::HandleScope scope; 182 v8::HandleScope scope;
176 Frame* frame = retrieveFrameWithGlobalObjectCheck(context); 183 Frame* frame = retrieveFrameWithGlobalObjectCheck(context);
177 m_pausedPage = frame->page(); 184 m_pausedPage = frame->page();
178 185
179 // Wait for continue or step command. 186 // Wait for continue or step command.
180 m_clientMessageLoop->run(m_pausedPage); 187 m_clientMessageLoop->run(m_pausedPage);
181 188
182 // The listener may have been removed in the nested loop. 189 // The listener may have been removed in the nested loop.
183 if (ScriptDebugListener* listener = m_listenersMap.get(m_pausedPage)) 190 if (ScriptDebugListener* listener = m_listenersMap.get(m_pausedPage))
184 listener->didContinue(); 191 listener->didContinue();
185 192
186 m_pausedPage = 0; 193 m_pausedPage = 0;
187 } 194 }
188 195
189 void PageScriptDebugServer::quitMessageLoopOnPause() 196 void PageScriptDebugServer::quitMessageLoopOnPause()
190 { 197 {
191 m_clientMessageLoop->quitNow(); 198 m_clientMessageLoop->quitNow();
192 } 199 }
193 200
194 } // namespace WebCore 201 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698