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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 | 328 |
329 v8::Maybe<int> lineNumber = message->GetLineNumber(m_context->context()); | 329 v8::Maybe<int> lineNumber = message->GetLineNumber(m_context->context()); |
330 if (lineNumber.IsJust()) | 330 if (lineNumber.IsJust()) |
331 exceptionDetailsObject->setLine(lineNumber.FromJust()); | 331 exceptionDetailsObject->setLine(lineNumber.FromJust()); |
332 v8::Maybe<int> columnNumber = message->GetStartColumn(m_context->context()); | 332 v8::Maybe<int> columnNumber = message->GetStartColumn(m_context->context()); |
333 if (columnNumber.IsJust()) | 333 if (columnNumber.IsJust()) |
334 exceptionDetailsObject->setColumn(columnNumber.FromJust()); | 334 exceptionDetailsObject->setColumn(columnNumber.FromJust()); |
335 | 335 |
336 v8::Local<v8::StackTrace> stackTrace = message->GetStackTrace(); | 336 v8::Local<v8::StackTrace> stackTrace = message->GetStackTrace(); |
337 if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0) | 337 if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0) |
338 exceptionDetailsObject->setStack(m_context->debugger()->createStackTrace
(stackTrace, stackTrace->GetFrameCount())->buildInspectorObject()); | 338 exceptionDetailsObject->setStack(m_context->debugger()->createStackTrace
(stackTrace)->buildInspectorObject()); |
339 return exceptionDetailsObject; | 339 return exceptionDetailsObject; |
340 } | 340 } |
341 | 341 |
342 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) | 342 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) |
343 { | 343 { |
344 v8::Local<v8::Value> resultValue; | 344 v8::Local<v8::Value> resultValue; |
345 if (!tryCatch.HasCaught()) { | 345 if (!tryCatch.HasCaught()) { |
346 if (hasInternalError(errorString, !maybeResultValue.ToLocal(&resultValue
))) | 346 if (hasInternalError(errorString, !maybeResultValue.ToLocal(&resultValue
))) |
347 return; | 347 return; |
348 std::unique_ptr<RemoteObject> remoteObject = wrapObject(errorString, res
ultValue, objectGroup, returnByValue, generatePreview); | 348 std::unique_ptr<RemoteObject> remoteObject = wrapObject(errorString, res
ultValue, objectGroup, returnByValue, generatePreview); |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 void InjectedScript::CallFrameScope::findInjectedScript(V8InspectorSessionImpl*
session) | 518 void InjectedScript::CallFrameScope::findInjectedScript(V8InspectorSessionImpl*
session) |
519 { | 519 { |
520 std::unique_ptr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(m_err
orString, m_remoteCallFrameId); | 520 std::unique_ptr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(m_err
orString, m_remoteCallFrameId); |
521 if (!remoteId) | 521 if (!remoteId) |
522 return; | 522 return; |
523 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); | 523 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); |
524 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get()
); | 524 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get()
); |
525 } | 525 } |
526 | 526 |
527 } // namespace blink | 527 } // namespace blink |
OLD | NEW |