| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 } | 168 } |
| 169 | 169 |
| 170 void PageDebuggerAgent::didClearDocumentOfWindowObject(LocalFrame* frame) | 170 void PageDebuggerAgent::didClearDocumentOfWindowObject(LocalFrame* frame) |
| 171 { | 171 { |
| 172 // FIXME: what about nested objects? | 172 // FIXME: what about nested objects? |
| 173 if (frame != m_pageAgent->inspectedFrame()) | 173 if (frame != m_pageAgent->inspectedFrame()) |
| 174 return; | 174 return; |
| 175 reset(); | 175 reset(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 void PageDebuggerAgent::didCommitLoadForLocalFrame(LocalFrame*) | |
| 179 { | |
| 180 resetModifiedSources(); | |
| 181 } | |
| 182 | |
| 183 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) | 178 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) |
| 184 { | 179 { |
| 185 InjectedScript injectedScript = injectedScriptForEval(errorString, execution
ContextId); | 180 InjectedScript injectedScript = injectedScriptForEval(errorString, execution
ContextId); |
| 186 if (injectedScript.isEmpty()) { | 181 if (injectedScript.isEmpty()) { |
| 187 *errorString = "Inspected frame has gone"; | 182 *errorString = "Inspected frame has gone"; |
| 188 return; | 183 return; |
| 189 } | 184 } |
| 190 ExecutionContext* executionContext = injectedScript.scriptState()->execution
Context(); | 185 ExecutionContext* executionContext = injectedScript.scriptState()->execution
Context(); |
| 191 RefPtrWillBeRawPtr<LocalFrame> protect(toDocument(executionContext)->frame()
); | 186 RefPtrWillBeRawPtr<LocalFrame> protect(toDocument(executionContext)->frame()
); |
| 192 InspectorDebuggerAgent::compileScript(errorString, expression, sourceURL, pe
rsistScript, executionContextId, scriptId, exceptionDetails); | 187 InspectorDebuggerAgent::compileScript(errorString, expression, sourceURL, pe
rsistScript, executionContextId, scriptId, exceptionDetails); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 217 RefPtrWillBeRawPtr<LocalFrame> protect(frame); | 212 RefPtrWillBeRawPtr<LocalFrame> protect(frame); |
| 218 InspectorDebuggerAgent::runScript(errorString, scriptId, executionContextId,
objectGroup, doNotPauseOnExceptionsAndMuteConsole, result, exceptionDetails); | 213 InspectorDebuggerAgent::runScript(errorString, scriptId, executionContextId,
objectGroup, doNotPauseOnExceptionsAndMuteConsole, result, exceptionDetails); |
| 219 | 214 |
| 220 if (frame) | 215 if (frame) |
| 221 InspectorInstrumentation::didEvaluateScript(cookie); | 216 InspectorInstrumentation::didEvaluateScript(cookie); |
| 222 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update
Counters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data(
)); | 217 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "Update
Counters", TRACE_EVENT_SCOPE_THREAD, "data", InspectorUpdateCountersEvent::data(
)); |
| 223 | 218 |
| 224 } | 219 } |
| 225 | 220 |
| 226 } // namespace blink | 221 } // namespace blink |
| OLD | NEW |