| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 bool success = parsedObjectId->asObject()->getNumber("asyncOrdinal", &asyncO
rdinal); | 892 bool success = parsedObjectId->asObject()->getNumber("asyncOrdinal", &asyncO
rdinal); |
| 893 if (!success || !asyncOrdinal) { | 893 if (!success || !asyncOrdinal) { |
| 894 *callStack = m_currentCallStack; | 894 *callStack = m_currentCallStack; |
| 895 *isAsync = false; | 895 *isAsync = false; |
| 896 return true; | 896 return true; |
| 897 } | 897 } |
| 898 if (!m_currentAsyncCallChain || asyncOrdinal < 1 || asyncOrdinal >= m_curren
tAsyncCallChain->callStacks().size()) { | 898 if (!m_currentAsyncCallChain || asyncOrdinal < 1 || asyncOrdinal >= m_curren
tAsyncCallChain->callStacks().size()) { |
| 899 *errorString = "Async call stack not found"; | 899 *errorString = "Async call stack not found"; |
| 900 return false; | 900 return false; |
| 901 } | 901 } |
| 902 RefPtr<AsyncCallStack> asyncStack = m_currentAsyncCallChain->callStacks()[as
yncOrdinal - 1]; | 902 RefPtrWillBeRawPtr<AsyncCallStack> asyncStack = m_currentAsyncCallChain->cal
lStacks()[asyncOrdinal - 1]; |
| 903 *callStack = asyncStack->callFrames(); | 903 *callStack = asyncStack->callFrames(); |
| 904 *isAsync = true; | 904 *isAsync = true; |
| 905 return true; | 905 return true; |
| 906 } | 906 } |
| 907 | 907 |
| 908 void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString* errorString, const
String& callFrameId, const String& expression, const String* const objectGroup,
const bool* const includeCommandLineAPI, const bool* const doNotPauseOnExceptio
nsAndMuteConsole, const bool* const returnByValue, const bool* generatePreview,
RefPtr<RemoteObject>& result, TypeBuilder::OptOutput<bool>* wasThrown, RefPtr<Ty
peBuilder::Debugger::ExceptionDetails>& exceptionDetails) | 908 void InspectorDebuggerAgent::evaluateOnCallFrame(ErrorString* errorString, const
String& callFrameId, const String& expression, const String* const objectGroup,
const bool* const includeCommandLineAPI, const bool* const doNotPauseOnExceptio
nsAndMuteConsole, const bool* const returnByValue, const bool* generatePreview,
RefPtr<RemoteObject>& result, TypeBuilder::OptOutput<bool>* wasThrown, RefPtr<Ty
peBuilder::Debugger::ExceptionDetails>& exceptionDetails) |
| 909 { | 909 { |
| 910 if (!isPaused() || m_currentCallStack.isEmpty()) { | 910 if (!isPaused() || m_currentCallStack.isEmpty()) { |
| 911 *errorString = "Attempt to access callframe when debugger is not on paus
e"; | 911 *errorString = "Attempt to access callframe when debugger is not on paus
e"; |
| 912 return; | 912 return; |
| (...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1742 RefPtr<ExceptionDetails> exceptionDetails = ExceptionDetails::create().setTe
xt(toCoreStringWithUndefinedOrNullCheck(message->Get())); | 1742 RefPtr<ExceptionDetails> exceptionDetails = ExceptionDetails::create().setTe
xt(toCoreStringWithUndefinedOrNullCheck(message->Get())); |
| 1743 exceptionDetails->setLine(message->GetLineNumber()); | 1743 exceptionDetails->setLine(message->GetLineNumber()); |
| 1744 exceptionDetails->setColumn(message->GetStartColumn()); | 1744 exceptionDetails->setColumn(message->GetStartColumn()); |
| 1745 v8::Local<v8::StackTrace> messageStackTrace = message->GetStackTrace(); | 1745 v8::Local<v8::StackTrace> messageStackTrace = message->GetStackTrace(); |
| 1746 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount() > 0) | 1746 if (!messageStackTrace.IsEmpty() && messageStackTrace->GetFrameCount() > 0) |
| 1747 exceptionDetails->setStackTrace(createScriptCallStack(isolate, messageSt
ackTrace, messageStackTrace->GetFrameCount())->buildInspectorArray()); | 1747 exceptionDetails->setStackTrace(createScriptCallStack(isolate, messageSt
ackTrace, messageStackTrace->GetFrameCount())->buildInspectorArray()); |
| 1748 return exceptionDetails.release(); | 1748 return exceptionDetails.release(); |
| 1749 } | 1749 } |
| 1750 | 1750 |
| 1751 } // namespace blink | 1751 } // namespace blink |
| OLD | NEW |