OLD | NEW |
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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 } | 151 } |
152 | 152 |
153 void PageDebuggerAgent::didClearDocumentOfWindowObject(LocalFrame* frame) | 153 void PageDebuggerAgent::didClearDocumentOfWindowObject(LocalFrame* frame) |
154 { | 154 { |
155 // FIXME: what about nested objects? | 155 // FIXME: what about nested objects? |
156 if (frame != m_pageAgent->inspectedFrame()) | 156 if (frame != m_pageAgent->inspectedFrame()) |
157 return; | 157 return; |
158 reset(); | 158 reset(); |
159 } | 159 } |
160 | 160 |
161 void PageDebuggerAgent::didCommitLoadForLocalFrame(LocalFrame*) | |
162 { | |
163 resetModifiedSources(); | |
164 } | |
165 | |
166 void PageDebuggerAgent::compileScript(ErrorString* errorString, const String& ex
pression, const String& sourceURL, bool persistScript, const int* executionConte
xtId, TypeBuilder::OptOutput<ScriptId>* scriptId, RefPtr<ExceptionDetails>& exce
ptionDetails) | 161 void PageDebuggerAgent::compileScript(ErrorString* errorString, const String& ex
pression, const String& sourceURL, bool persistScript, const int* executionConte
xtId, TypeBuilder::OptOutput<ScriptId>* scriptId, RefPtr<ExceptionDetails>& exce
ptionDetails) |
167 { | 162 { |
168 InjectedScript injectedScript = injectedScriptForEval(errorString, execution
ContextId); | 163 InjectedScript injectedScript = injectedScriptForEval(errorString, execution
ContextId); |
169 if (injectedScript.isEmpty()) { | 164 if (injectedScript.isEmpty()) { |
170 *errorString = "Inspected frame has gone"; | 165 *errorString = "Inspected frame has gone"; |
171 return; | 166 return; |
172 } | 167 } |
173 ExecutionContext* executionContext = injectedScript.scriptState()->execution
Context(); | 168 ExecutionContext* executionContext = injectedScript.scriptState()->execution
Context(); |
174 RefPtrWillBeRawPtr<LocalFrame> protect(toDocument(executionContext)->frame()
); | 169 RefPtrWillBeRawPtr<LocalFrame> protect(toDocument(executionContext)->frame()
); |
175 InspectorDebuggerAgent::compileScript(errorString, expression, sourceURL, pe
rsistScript, executionContextId, scriptId, exceptionDetails); | 170 InspectorDebuggerAgent::compileScript(errorString, expression, sourceURL, pe
rsistScript, executionContextId, scriptId, exceptionDetails); |
(...skipping 24 matching lines...) Expand all Loading... |
200 RefPtrWillBeRawPtr<LocalFrame> protect(frame); | 195 RefPtrWillBeRawPtr<LocalFrame> protect(frame); |
201 InspectorDebuggerAgent::runScript(errorString, scriptId, executionContextId,
objectGroup, doNotPauseOnExceptionsAndMuteConsole, result, exceptionDetails); | 196 InspectorDebuggerAgent::runScript(errorString, scriptId, executionContextId,
objectGroup, doNotPauseOnExceptionsAndMuteConsole, result, exceptionDetails); |
202 | 197 |
203 if (frame) | 198 if (frame) |
204 InspectorInstrumentation::didEvaluateScript(cookie); | 199 InspectorInstrumentation::didEvaluateScript(cookie); |
205 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update
Counters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data(
)); | 200 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update
Counters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data(
)); |
206 | 201 |
207 } | 202 } |
208 | 203 |
209 } // namespace blink | 204 } // namespace blink |
OLD | NEW |