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

Side by Side Diff: Source/bindings/core/v8/PageScriptDebugServer.cpp

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors Created 6 years, 3 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 165
166 void PageScriptDebugServer::setClientMessageLoop(PassOwnPtr<ClientMessageLoop> c lientMessageLoop) 166 void PageScriptDebugServer::setClientMessageLoop(PassOwnPtr<ClientMessageLoop> c lientMessageLoop)
167 { 167 {
168 m_clientMessageLoop = clientMessageLoop; 168 m_clientMessageLoop = clientMessageLoop;
169 } 169 }
170 170
171 void PageScriptDebugServer::compileScript(ScriptState* scriptState, const String & expression, const String& sourceURL, String* scriptId, String* exceptionDetail sText, int* lineNumber, int* columnNumber, RefPtrWillBeRawPtr<ScriptCallStack>* stackTrace) 171 void PageScriptDebugServer::compileScript(ScriptState* scriptState, const String & expression, const String& sourceURL, String* scriptId, String* exceptionDetail sText, int* lineNumber, int* columnNumber, RefPtrWillBeRawPtr<ScriptCallStack>* stackTrace)
172 { 172 {
173 ExecutionContext* executionContext = scriptState->executionContext(); 173 ExecutionContext* executionContext = scriptState->executionContext();
174 RefPtr<LocalFrame> protect = toDocument(executionContext)->frame(); 174 RefPtrWillBeRawPtr<LocalFrame> protect(toDocument(executionContext)->frame() );
175 ScriptDebugServer::compileScript(scriptState, expression, sourceURL, scriptI d, exceptionDetailsText, lineNumber, columnNumber, stackTrace); 175 ScriptDebugServer::compileScript(scriptState, expression, sourceURL, scriptI d, exceptionDetailsText, lineNumber, columnNumber, stackTrace);
176 if (!scriptId->isNull()) 176 if (!scriptId->isNull())
177 m_compiledScriptURLs.set(*scriptId, sourceURL); 177 m_compiledScriptURLs.set(*scriptId, sourceURL);
178 } 178 }
179 179
180 void PageScriptDebugServer::clearCompiledScripts() 180 void PageScriptDebugServer::clearCompiledScripts()
181 { 181 {
182 ScriptDebugServer::clearCompiledScripts(); 182 ScriptDebugServer::clearCompiledScripts();
183 m_compiledScriptURLs.clear(); 183 m_compiledScriptURLs.clear();
184 } 184 }
185 185
186 void PageScriptDebugServer::runScript(ScriptState* scriptState, const String& sc riptId, ScriptValue* result, bool* wasThrown, String* exceptionDetailsText, int* lineNumber, int* columnNumber, RefPtrWillBeRawPtr<ScriptCallStack>* stackTrace) 186 void PageScriptDebugServer::runScript(ScriptState* scriptState, const String& sc riptId, ScriptValue* result, bool* wasThrown, String* exceptionDetailsText, int* lineNumber, int* columnNumber, RefPtrWillBeRawPtr<ScriptCallStack>* stackTrace)
187 { 187 {
188 String sourceURL = m_compiledScriptURLs.take(scriptId); 188 String sourceURL = m_compiledScriptURLs.take(scriptId);
189 189
190 ExecutionContext* executionContext = scriptState->executionContext(); 190 ExecutionContext* executionContext = scriptState->executionContext();
191 LocalFrame* frame = toDocument(executionContext)->frame(); 191 LocalFrame* frame = toDocument(executionContext)->frame();
192 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "EvaluateScript ", "data", InspectorEvaluateScriptEvent::data(frame, sourceURL, TextPosition::mi nimumPosition().m_line.oneBasedInt())); 192 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "EvaluateScript ", "data", InspectorEvaluateScriptEvent::data(frame, sourceURL, TextPosition::mi nimumPosition().m_line.oneBasedInt()));
193 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), " CallStack", "stack", InspectorCallStackEvent::currentCallStack()); 193 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline.stack"), " CallStack", "stack", InspectorCallStackEvent::currentCallStack());
194 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing. 194 // FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeli ne migrates to tracing.
195 InspectorInstrumentationCookie cookie; 195 InspectorInstrumentationCookie cookie;
196 if (frame) 196 if (frame)
197 cookie = InspectorInstrumentation::willEvaluateScript(frame, sourceURL, TextPosition::minimumPosition().m_line.oneBasedInt()); 197 cookie = InspectorInstrumentation::willEvaluateScript(frame, sourceURL, TextPosition::minimumPosition().m_line.oneBasedInt());
198 198
199 RefPtr<LocalFrame> protect = frame; 199 RefPtrWillBeRawPtr<LocalFrame> protect(frame);
200 ScriptDebugServer::runScript(scriptState, scriptId, result, wasThrown, excep tionDetailsText, lineNumber, columnNumber, stackTrace); 200 ScriptDebugServer::runScript(scriptState, scriptId, result, wasThrown, excep tionDetailsText, lineNumber, columnNumber, stackTrace);
201 201
202 if (frame) 202 if (frame)
203 InspectorInstrumentation::didEvaluateScript(cookie); 203 InspectorInstrumentation::didEvaluateScript(cookie);
204 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update Counters", "data", InspectorUpdateCountersEvent::data()); 204 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update Counters", "data", InspectorUpdateCountersEvent::data());
205 } 205 }
206 206
207 ScriptDebugListener* PageScriptDebugServer::getDebugListenerForContext(v8::Handl e<v8::Context> context) 207 ScriptDebugListener* PageScriptDebugServer::getDebugListenerForContext(v8::Handl e<v8::Context> context)
208 { 208 {
209 v8::HandleScope scope(m_isolate); 209 v8::HandleScope scope(m_isolate);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 UseCounter::muteForInspector(); 319 UseCounter::muteForInspector();
320 } 320 }
321 321
322 void PageScriptDebugServer::unmuteWarningsAndDeprecations() 322 void PageScriptDebugServer::unmuteWarningsAndDeprecations()
323 { 323 {
324 FrameConsole::unmute(); 324 FrameConsole::unmute();
325 UseCounter::unmuteForInspector(); 325 UseCounter::unmuteForInspector();
326 } 326 }
327 327
328 } // namespace blink 328 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698