| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 { | 308 { |
| 309 std::unique_ptr<protocol::Runtime::ExceptionDetails> exceptionDetailsObject
= protocol::Runtime::ExceptionDetails::create() | 309 std::unique_ptr<protocol::Runtime::ExceptionDetails> exceptionDetailsObject
= protocol::Runtime::ExceptionDetails::create() |
| 310 .setText(toProtocolString(message->Get())) | 310 .setText(toProtocolString(message->Get())) |
| 311 .setScriptId(String16::fromInteger(message->GetScriptOrigin().ScriptID()
->Value())) | 311 .setScriptId(String16::fromInteger(message->GetScriptOrigin().ScriptID()
->Value())) |
| 312 .setLineNumber(message->GetLineNumber(m_context->context()).FromMaybe(1)
- 1) | 312 .setLineNumber(message->GetLineNumber(m_context->context()).FromMaybe(1)
- 1) |
| 313 .setColumnNumber(message->GetStartColumn(m_context->context()).FromMaybe
(0)) | 313 .setColumnNumber(message->GetStartColumn(m_context->context()).FromMaybe
(0)) |
| 314 .build(); | 314 .build(); |
| 315 | 315 |
| 316 v8::Local<v8::StackTrace> stackTrace = message->GetStackTrace(); | 316 v8::Local<v8::StackTrace> stackTrace = message->GetStackTrace(); |
| 317 if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0) | 317 if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0) |
| 318 exceptionDetailsObject->setStackTrace(m_context->debugger()->createStack
Trace(stackTrace)->buildInspectorObject()); | 318 exceptionDetailsObject->setStackTrace(m_context->debugger()->createStack
TraceImpl(stackTrace)->buildInspectorObjectImpl()); |
| 319 return exceptionDetailsObject; | 319 return exceptionDetailsObject; |
| 320 } | 320 } |
| 321 | 321 |
| 322 void InjectedScript::wrapEvaluateResult(ErrorString* errorString, v8::MaybeLocal
<v8::Value> maybeResultValue, const v8::TryCatch& tryCatch, const String16& obje
ctGroup, bool returnByValue, bool generatePreview, std::unique_ptr<protocol::Run
time::RemoteObject>* result, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::Ex
ceptionDetails>* exceptionDetails) | 322 void InjectedScript::wrapEvaluateResult(ErrorString* errorString, v8::MaybeLocal
<v8::Value> maybeResultValue, const v8::TryCatch& tryCatch, const String16& obje
ctGroup, bool returnByValue, bool generatePreview, std::unique_ptr<protocol::Run
time::RemoteObject>* result, Maybe<bool>* wasThrown, Maybe<protocol::Runtime::Ex
ceptionDetails>* exceptionDetails) |
| 323 { | 323 { |
| 324 v8::Local<v8::Value> resultValue; | 324 v8::Local<v8::Value> resultValue; |
| 325 if (!tryCatch.HasCaught()) { | 325 if (!tryCatch.HasCaught()) { |
| 326 if (hasInternalError(errorString, !maybeResultValue.ToLocal(&resultValue
))) | 326 if (hasInternalError(errorString, !maybeResultValue.ToLocal(&resultValue
))) |
| 327 return; | 327 return; |
| 328 std::unique_ptr<RemoteObject> remoteObject = wrapObject(errorString, res
ultValue, objectGroup, returnByValue, generatePreview); | 328 std::unique_ptr<RemoteObject> remoteObject = wrapObject(errorString, res
ultValue, objectGroup, returnByValue, generatePreview); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 void InjectedScript::CallFrameScope::findInjectedScript(V8InspectorSessionImpl*
session) | 487 void InjectedScript::CallFrameScope::findInjectedScript(V8InspectorSessionImpl*
session) |
| 488 { | 488 { |
| 489 std::unique_ptr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(m_err
orString, m_remoteCallFrameId); | 489 std::unique_ptr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(m_err
orString, m_remoteCallFrameId); |
| 490 if (!remoteId) | 490 if (!remoteId) |
| 491 return; | 491 return; |
| 492 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); | 492 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); |
| 493 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get()
); | 493 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get()
); |
| 494 } | 494 } |
| 495 | 495 |
| 496 } // namespace blink | 496 } // namespace blink |
| OLD | NEW |