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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 if (consoleMessage->callStack()) { | 298 if (consoleMessage->callStack()) { |
299 jsonObj->setStackTrace(consoleMessage->callStack()->buildInspectorArray(
)); | 299 jsonObj->setStackTrace(consoleMessage->callStack()->buildInspectorArray(
)); |
300 RefPtrWillBeRawPtr<ScriptAsyncCallStack> asyncCallStack = consoleMessage
->callStack()->asyncCallStack(); | 300 RefPtrWillBeRawPtr<ScriptAsyncCallStack> asyncCallStack = consoleMessage
->callStack()->asyncCallStack(); |
301 if (asyncCallStack) | 301 if (asyncCallStack) |
302 jsonObj->setAsyncStackTrace(asyncCallStack->buildInspectorObject()); | 302 jsonObj->setAsyncStackTrace(asyncCallStack->buildInspectorObject()); |
303 } | 303 } |
304 m_frontend->messageAdded(jsonObj); | 304 m_frontend->messageAdded(jsonObj); |
305 m_frontend->flush(); | 305 m_frontend->flush(); |
306 } | 306 } |
307 | 307 |
308 class InspectableHeapObject FINAL : public InjectedScriptHost::InspectableObject
{ | 308 class InspectableHeapObject final : public InjectedScriptHost::InspectableObject
{ |
309 public: | 309 public: |
310 explicit InspectableHeapObject(int heapObjectId) : m_heapObjectId(heapObject
Id) { } | 310 explicit InspectableHeapObject(int heapObjectId) : m_heapObjectId(heapObject
Id) { } |
311 virtual ScriptValue get(ScriptState*) OVERRIDE | 311 virtual ScriptValue get(ScriptState*) override |
312 { | 312 { |
313 return ScriptProfiler::objectByHeapObjectId(m_heapObjectId); | 313 return ScriptProfiler::objectByHeapObjectId(m_heapObjectId); |
314 } | 314 } |
315 private: | 315 private: |
316 int m_heapObjectId; | 316 int m_heapObjectId; |
317 }; | 317 }; |
318 | 318 |
319 void InspectorConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHe
apObjectId) | 319 void InspectorConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHe
apObjectId) |
320 { | 320 { |
321 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n
ew InspectableHeapObject(inspectedHeapObjectId))); | 321 m_injectedScriptManager->injectedScriptHost()->addInspectedObject(adoptPtr(n
ew InspectableHeapObject(inspectedHeapObjectId))); |
322 } | 322 } |
323 | 323 |
324 } // namespace blink | 324 } // namespace blink |
OLD | NEW |