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

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

Issue 2249743006: [DevTools] Fill ExceptionDetails with more details, unify usage across protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: browser test 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) 2010-2011 Google Inc. All rights reserved. 2 * Copyright (c) 2010-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 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 { 264 {
265 m_isolate->GetCpuProfiler()->SetIdle(false); 265 m_isolate->GetCpuProfiler()->SetIdle(false);
266 } 266 }
267 267
268 unsigned V8InspectorImpl::exceptionThrown(v8::Local<v8::Context> context, const String16& message, v8::Local<v8::Value> exception, const String16& detailedMessa ge, const String16& url, unsigned lineNumber, unsigned columnNumber, std::unique _ptr<V8StackTrace> stackTrace, int scriptId) 268 unsigned V8InspectorImpl::exceptionThrown(v8::Local<v8::Context> context, const String16& message, v8::Local<v8::Value> exception, const String16& detailedMessa ge, const String16& url, unsigned lineNumber, unsigned columnNumber, std::unique _ptr<V8StackTrace> stackTrace, int scriptId)
269 { 269 {
270 int contextGroupId = V8Debugger::getGroupId(context); 270 int contextGroupId = V8Debugger::getGroupId(context);
271 if (!contextGroupId || m_muteExceptionsMap[contextGroupId]) 271 if (!contextGroupId || m_muteExceptionsMap[contextGroupId])
272 return 0; 272 return 0;
273 std::unique_ptr<V8StackTraceImpl> stackTraceImpl = wrapUnique(static_cast<V8 StackTraceImpl*>(stackTrace.release())); 273 std::unique_ptr<V8StackTraceImpl> stackTraceImpl = wrapUnique(static_cast<V8 StackTraceImpl*>(stackTrace.release()));
274 unsigned exceptionId = ++m_lastExceptionId; 274 unsigned exceptionId = nextExceptionId();
275 std::unique_ptr<V8ConsoleMessage> consoleMessage = V8ConsoleMessage::createF orException(m_client->currentTimeMS(), detailedMessage, url, lineNumber, columnN umber, std::move(stackTraceImpl), scriptId, m_isolate, message, V8Debugger::cont extId(context), exception, exceptionId); 275 std::unique_ptr<V8ConsoleMessage> consoleMessage = V8ConsoleMessage::createF orException(m_client->currentTimeMS(), detailedMessage, url, lineNumber, columnN umber, std::move(stackTraceImpl), scriptId, m_isolate, message, V8Debugger::cont extId(context), exception, exceptionId);
276 ensureConsoleMessageStorage(contextGroupId)->addMessage(std::move(consoleMes sage)); 276 ensureConsoleMessageStorage(contextGroupId)->addMessage(std::move(consoleMes sage));
277 return exceptionId; 277 return exceptionId;
278 } 278 }
279 279
280 void V8InspectorImpl::exceptionRevoked(v8::Local<v8::Context> context, unsigned exceptionId, const String16& message) 280 void V8InspectorImpl::exceptionRevoked(v8::Local<v8::Context> context, unsigned exceptionId, const String16& message)
281 { 281 {
282 int contextGroupId = V8Debugger::getGroupId(context); 282 int contextGroupId = V8Debugger::getGroupId(context);
283 if (!contextGroupId) 283 if (!contextGroupId)
284 return; 284 return;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 V8InspectorSessionImpl* V8InspectorImpl::sessionForContextGroup(int contextGroup Id) 342 V8InspectorSessionImpl* V8InspectorImpl::sessionForContextGroup(int contextGroup Id)
343 { 343 {
344 if (!contextGroupId) 344 if (!contextGroupId)
345 return nullptr; 345 return nullptr;
346 SessionMap::iterator iter = m_sessions.find(contextGroupId); 346 SessionMap::iterator iter = m_sessions.find(contextGroupId);
347 return iter == m_sessions.end() ? nullptr : iter->second; 347 return iter == m_sessions.end() ? nullptr : iter->second;
348 } 348 }
349 349
350 } // namespace v8_inspector 350 } // namespace v8_inspector
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698