| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 *errorString = "Internal error: original ScriptObject has no value"; | 242 *errorString = "Internal error: original ScriptObject has no value"; |
| 243 return InjectedScriptCanvasModule(); | 243 return InjectedScriptCanvasModule(); |
| 244 } | 244 } |
| 245 return injectedScriptCanvasModule(errorString, scriptObject.scriptState()); | 245 return injectedScriptCanvasModule(errorString, scriptObject.scriptState()); |
| 246 } | 246 } |
| 247 | 247 |
| 248 InjectedScriptCanvasModule InspectorCanvasAgent::injectedScriptCanvasModule(Erro
rString* errorString, const String& objectId) | 248 InjectedScriptCanvasModule InspectorCanvasAgent::injectedScriptCanvasModule(Erro
rString* errorString, const String& objectId) |
| 249 { | 249 { |
| 250 if (!checkIsEnabled(errorString)) | 250 if (!checkIsEnabled(errorString)) |
| 251 return InjectedScriptCanvasModule(); | 251 return InjectedScriptCanvasModule(); |
| 252 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForOb
jectId(objectId); | 252 InjectedScript& injectedScript = m_injectedScriptManager->injectedScriptForO
bjectId(objectId); |
| 253 if (injectedScript.isEmpty()) { | 253 if (injectedScript.isEmpty()) { |
| 254 *errorString = "Inspected frame has gone"; | 254 *errorString = "Inspected frame has gone"; |
| 255 return InjectedScriptCanvasModule(); | 255 return InjectedScriptCanvasModule(); |
| 256 } | 256 } |
| 257 return injectedScriptCanvasModule(errorString, injectedScript.scriptState())
; | 257 return injectedScriptCanvasModule(errorString, injectedScript.scriptState())
; |
| 258 } | 258 } |
| 259 | 259 |
| 260 void InspectorCanvasAgent::findFramesWithUninstrumentedCanvases() | 260 void InspectorCanvasAgent::findFramesWithUninstrumentedCanvases() |
| 261 { | 261 { |
| 262 class NodeVisitor FINAL : public WrappedNodeVisitor { | 262 class NodeVisitor FINAL : public WrappedNodeVisitor { |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 ErrorString error; | 341 ErrorString error; |
| 342 for (FramesWithUninstrumentedCanvases::const_iterator it = m_framesWithUnins
trumentedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it)
{ | 342 for (FramesWithUninstrumentedCanvases::const_iterator it = m_framesWithUnins
trumentedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it)
{ |
| 343 InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, V
8ScriptState::forMainWorld(it->key)); | 343 InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, V
8ScriptState::forMainWorld(it->key)); |
| 344 if (!module.isEmpty()) | 344 if (!module.isEmpty()) |
| 345 module.markFrameEnd(); | 345 module.markFrameEnd(); |
| 346 } | 346 } |
| 347 } | 347 } |
| 348 | 348 |
| 349 } // namespace WebCore | 349 } // namespace WebCore |
| 350 | 350 |
| OLD | NEW |