Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp

Issue 2226863003: [DevTools] Reduce API surface of String16. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 } 300 }
301 return object; 301 return object;
302 } 302 }
303 return v8::Undefined(m_context->isolate()); 303 return v8::Undefined(m_context->isolate());
304 } 304 }
305 305
306 std::unique_ptr<protocol::Runtime::ExceptionDetails> InjectedScript::createExcep tionDetails(v8::Local<v8::Message> message) 306 std::unique_ptr<protocol::Runtime::ExceptionDetails> InjectedScript::createExcep tionDetails(v8::Local<v8::Message> message)
307 { 307 {
308 std::unique_ptr<protocol::Runtime::ExceptionDetails> exceptionDetailsObject = protocol::Runtime::ExceptionDetails::create() 308 std::unique_ptr<protocol::Runtime::ExceptionDetails> exceptionDetailsObject = protocol::Runtime::ExceptionDetails::create()
309 .setText(toProtocolString(message->Get())) 309 .setText(toProtocolString(message->Get()))
310 .setScriptId(String16::fromInteger(message->GetScriptOrigin().ScriptID() ->Value())) 310 .setScriptId(protocol::string16FromInteger(message->GetScriptOrigin().Sc riptID()->Value()))
311 .setLineNumber(message->GetLineNumber(m_context->context()).FromMaybe(1) - 1) 311 .setLineNumber(message->GetLineNumber(m_context->context()).FromMaybe(1) - 1)
312 .setColumnNumber(message->GetStartColumn(m_context->context()).FromMaybe (0)) 312 .setColumnNumber(message->GetStartColumn(m_context->context()).FromMaybe (0))
313 .build(); 313 .build();
314 314
315 v8::Local<v8::StackTrace> stackTrace = message->GetStackTrace(); 315 v8::Local<v8::StackTrace> stackTrace = message->GetStackTrace();
316 if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0) 316 if (!stackTrace.IsEmpty() && stackTrace->GetFrameCount() > 0)
317 exceptionDetailsObject->setStackTrace(m_context->inspector()->debugger() ->createStackTrace(stackTrace)->buildInspectorObjectImpl()); 317 exceptionDetailsObject->setStackTrace(m_context->inspector()->debugger() ->createStackTrace(stackTrace)->buildInspectorObjectImpl());
318 return exceptionDetailsObject; 318 return exceptionDetailsObject;
319 } 319 }
320 320
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 void InjectedScript::CallFrameScope::findInjectedScript(V8InspectorSessionImpl* session) 488 void InjectedScript::CallFrameScope::findInjectedScript(V8InspectorSessionImpl* session)
489 { 489 {
490 std::unique_ptr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(m_err orString, m_remoteCallFrameId); 490 std::unique_ptr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(m_err orString, m_remoteCallFrameId);
491 if (!remoteId) 491 if (!remoteId)
492 return; 492 return;
493 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); 493 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal());
494 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get() ); 494 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get() );
495 } 495 }
496 496
497 } // namespace blink 497 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698