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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/V8RuntimeAgentImpl.h

Issue 2116563003: [DevTools] Report unhandled exceptions and promise rejections through Runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after ExceptionDetails change Created 4 years, 5 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 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 24 matching lines...) Expand all
35 #include "platform/inspector_protocol/String16.h" 35 #include "platform/inspector_protocol/String16.h"
36 #include "platform/v8_inspector/protocol/Runtime.h" 36 #include "platform/v8_inspector/protocol/Runtime.h"
37 37
38 #include <v8.h> 38 #include <v8.h>
39 39
40 namespace blink { 40 namespace blink {
41 41
42 class InjectedScript; 42 class InjectedScript;
43 class InspectedContext; 43 class InspectedContext;
44 class RemoteObjectIdBase; 44 class RemoteObjectIdBase;
45 class V8ConsoleMessage;
45 class V8DebuggerImpl; 46 class V8DebuggerImpl;
46 class V8InspectorSessionImpl; 47 class V8InspectorSessionImpl;
47 48
48 namespace protocol { 49 namespace protocol {
49 class DictionaryValue; 50 class DictionaryValue;
50 } 51 }
51 52
52 using protocol::Maybe; 53 using protocol::Maybe;
53 54
54 class V8RuntimeAgentImpl : public protocol::Runtime::Backend { 55 class V8RuntimeAgentImpl : public protocol::Runtime::Backend {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 const Maybe<String16>& objectGroup, 109 const Maybe<String16>& objectGroup,
109 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole, 110 const Maybe<bool>& doNotPauseOnExceptionsAndMuteConsole,
110 const Maybe<bool>& includeCommandLineAPI, 111 const Maybe<bool>& includeCommandLineAPI,
111 std::unique_ptr<protocol::Runtime::RemoteObject>* result, 112 std::unique_ptr<protocol::Runtime::RemoteObject>* result,
112 Maybe<protocol::Runtime::ExceptionDetails>*) override; 113 Maybe<protocol::Runtime::ExceptionDetails>*) override;
113 114
114 void reset(); 115 void reset();
115 void reportExecutionContextCreated(InspectedContext*); 116 void reportExecutionContextCreated(InspectedContext*);
116 void reportExecutionContextDestroyed(InspectedContext*); 117 void reportExecutionContextDestroyed(InspectedContext*);
117 void inspect(std::unique_ptr<protocol::Runtime::RemoteObject> objectToInspec t, std::unique_ptr<protocol::DictionaryValue> hints); 118 void inspect(std::unique_ptr<protocol::Runtime::RemoteObject> objectToInspec t, std::unique_ptr<protocol::DictionaryValue> hints);
119 void exceptionMessageAdded(V8ConsoleMessage*);
118 120
119 private: 121 private:
122 void reportMessage(V8ConsoleMessage*, bool generatePreview);
123
120 V8InspectorSessionImpl* m_session; 124 V8InspectorSessionImpl* m_session;
121 protocol::DictionaryValue* m_state; 125 protocol::DictionaryValue* m_state;
122 protocol::Runtime::Frontend m_frontend; 126 protocol::Runtime::Frontend m_frontend;
123 V8DebuggerImpl* m_debugger; 127 V8DebuggerImpl* m_debugger;
124 bool m_enabled; 128 bool m_enabled;
125 protocol::HashMap<String16, std::unique_ptr<v8::Global<v8::Script>>> m_compi ledScripts; 129 protocol::HashMap<String16, std::unique_ptr<v8::Global<v8::Script>>> m_compi ledScripts;
126 }; 130 };
127 131
128 } // namespace blink 132 } // namespace blink
129 133
130 #endif // V8RuntimeAgentImpl_h 134 #endif // V8RuntimeAgentImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698