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

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

Issue 2010603002: Use SourceLocation when reporting runtime exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2004243002
Patch Set: test fixes Created 4 years, 6 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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 v8::True(m_isolate), // internal 718 v8::True(m_isolate), // internal
719 toV8String(m_isolate, String16()), // sourceMap 719 toV8String(m_isolate, String16()), // sourceMap
720 v8::True(m_isolate)); // opaqueresource 720 v8::True(m_isolate)); // opaqueresource
721 v8::ScriptCompiler::Source source(code, origin); 721 v8::ScriptCompiler::Source source(code, origin);
722 v8::Local<v8::Script> script; 722 v8::Local<v8::Script> script;
723 if (!v8::ScriptCompiler::Compile(context, &source, v8::ScriptCompiler::kNoCo mpileOptions).ToLocal(&script)) 723 if (!v8::ScriptCompiler::Compile(context, &source, v8::ScriptCompiler::kNoCo mpileOptions).ToLocal(&script))
724 return v8::Local<v8::Script>(); 724 return v8::Local<v8::Script>();
725 return script; 725 return script;
726 } 726 }
727 727
728 std::unique_ptr<V8StackTrace> V8DebuggerImpl::createStackTrace(v8::Local<v8::Sta ckTrace> stackTrace, size_t maxStackSize) 728 std::unique_ptr<V8StackTrace> V8DebuggerImpl::createStackTrace(v8::Local<v8::Sta ckTrace> stackTrace)
729 { 729 {
730 V8DebuggerAgentImpl* agent = findEnabledDebuggerAgent(m_isolate->GetCurrentC ontext()); 730 V8DebuggerAgentImpl* agent = findEnabledDebuggerAgent(m_isolate->GetCurrentC ontext());
731 return V8StackTraceImpl::create(agent, stackTrace, maxStackSize); 731 return V8StackTraceImpl::create(agent, stackTrace, V8StackTrace::maxCallStac kSizeToCapture);
732 } 732 }
733 733
734 std::unique_ptr<V8InspectorSession> V8DebuggerImpl::connect(int contextGroupId, V8InspectorSessionClient* client, const String16* state) 734 std::unique_ptr<V8InspectorSession> V8DebuggerImpl::connect(int contextGroupId, V8InspectorSessionClient* client, const String16* state)
735 { 735 {
736 DCHECK(!m_sessions.contains(contextGroupId)); 736 DCHECK(!m_sessions.contains(contextGroupId));
737 std::unique_ptr<V8InspectorSessionImpl> session = V8InspectorSessionImpl::cr eate(this, contextGroupId, client, state); 737 std::unique_ptr<V8InspectorSessionImpl> session = V8InspectorSessionImpl::cr eate(this, contextGroupId, client, state);
738 m_sessions.set(contextGroupId, session.get()); 738 m_sessions.set(contextGroupId, session.get());
739 return std::move(session); 739 return std::move(session);
740 } 740 }
741 741
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 return nullptr; 840 return nullptr;
841 return m_contexts.get(contextGroupId); 841 return m_contexts.get(contextGroupId);
842 } 842 }
843 843
844 V8InspectorSessionImpl* V8DebuggerImpl::sessionForContextGroup(int contextGroupI d) 844 V8InspectorSessionImpl* V8DebuggerImpl::sessionForContextGroup(int contextGroupI d)
845 { 845 {
846 return contextGroupId ? m_sessions.get(contextGroupId) : nullptr; 846 return contextGroupId ? m_sessions.get(contextGroupId) : nullptr;
847 } 847 }
848 848
849 } // namespace blink 849 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698