| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 jsonObj->setUrl(consoleMessage->url()); | 237 jsonObj->setUrl(consoleMessage->url()); |
| 238 ScriptState* scriptState = consoleMessage->scriptState(); | 238 ScriptState* scriptState = consoleMessage->scriptState(); |
| 239 if (scriptState) | 239 if (scriptState) |
| 240 jsonObj->setExecutionContextId(m_injectedScriptManager->injectedScriptId
For(scriptState)); | 240 jsonObj->setExecutionContextId(m_injectedScriptManager->injectedScriptId
For(scriptState)); |
| 241 if (consoleMessage->source() == NetworkMessageSource && consoleMessage->requ
estIdentifier()) | 241 if (consoleMessage->source() == NetworkMessageSource && consoleMessage->requ
estIdentifier()) |
| 242 jsonObj->setNetworkRequestId(IdentifiersFactory::requestId(consoleMessag
e->requestIdentifier())); | 242 jsonObj->setNetworkRequestId(IdentifiersFactory::requestId(consoleMessag
e->requestIdentifier())); |
| 243 RefPtrWillBeRawPtr<ScriptArguments> arguments = consoleMessage->scriptArgume
nts(); | 243 RefPtrWillBeRawPtr<ScriptArguments> arguments = consoleMessage->scriptArgume
nts(); |
| 244 if (arguments && arguments->argumentCount()) { | 244 if (arguments && arguments->argumentCount()) { |
| 245 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptF
or(arguments->scriptState()); | 245 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptF
or(arguments->scriptState()); |
| 246 if (!injectedScript.isEmpty()) { | 246 if (!injectedScript.isEmpty()) { |
| 247 RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::RemoteObject> > json
Args = TypeBuilder::Array<TypeBuilder::Runtime::RemoteObject>::create(); | 247 RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::RemoteObject>> jsonA
rgs = TypeBuilder::Array<TypeBuilder::Runtime::RemoteObject>::create(); |
| 248 if (consoleMessage->type() == TableMessageType && generatePreview &&
arguments->argumentCount()) { | 248 if (consoleMessage->type() == TableMessageType && generatePreview &&
arguments->argumentCount()) { |
| 249 ScriptValue table = arguments->argumentAt(0); | 249 ScriptValue table = arguments->argumentAt(0); |
| 250 ScriptValue columns = arguments->argumentCount() > 1 ? arguments
->argumentAt(1) : ScriptValue(); | 250 ScriptValue columns = arguments->argumentCount() > 1 ? arguments
->argumentAt(1) : ScriptValue(); |
| 251 RefPtr<TypeBuilder::Runtime::RemoteObject> inspectorValue = inje
ctedScript.wrapTable(table, columns); | 251 RefPtr<TypeBuilder::Runtime::RemoteObject> inspectorValue = inje
ctedScript.wrapTable(table, columns); |
| 252 if (!inspectorValue) { | 252 if (!inspectorValue) { |
| 253 ASSERT_NOT_REACHED(); | 253 ASSERT_NOT_REACHED(); |
| 254 return; | 254 return; |
| 255 } | 255 } |
| 256 jsonArgs->addItem(inspectorValue); | 256 jsonArgs->addItem(inspectorValue); |
| 257 } else { | 257 } else { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 { | 297 { |
| 298 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForOb
jectId(objectId); | 298 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForOb
jectId(objectId); |
| 299 if (injectedScript.isEmpty()) { | 299 if (injectedScript.isEmpty()) { |
| 300 *errorString = "Inspected frame has gone"; | 300 *errorString = "Inspected frame has gone"; |
| 301 return; | 301 return; |
| 302 } | 302 } |
| 303 injectedScript.setLastEvaluationResult(objectId); | 303 injectedScript.setLastEvaluationResult(objectId); |
| 304 } | 304 } |
| 305 | 305 |
| 306 } // namespace blink | 306 } // namespace blink |
| OLD | NEW |