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

Side by Side Diff: Source/core/workers/WorkerGlobalScope.h

Issue 743153002: [DevTools] Show stack trace for exceptions in dedicated workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@worker-capture-stack
Patch Set: Created 6 years, 1 month 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) 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 double timeOrigin() const { return m_timeOrigin; } 120 double timeOrigin() const { return m_timeOrigin; }
121 121
122 WorkerClients* clients() { return m_workerClients.get(); } 122 WorkerClients* clients() { return m_workerClients.get(); }
123 123
124 using SecurityContext::securityOrigin; 124 using SecurityContext::securityOrigin;
125 using SecurityContext::contentSecurityPolicy; 125 using SecurityContext::contentSecurityPolicy;
126 126
127 virtual void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) overr ide final; 127 virtual void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) overr ide final;
128 ConsoleMessageStorage* messageStorage(); 128 ConsoleMessageStorage* messageStorage();
129 129
130 void exceptionHandled(int exceptionId, bool isHandled);
131
130 virtual void trace(Visitor*) override; 132 virtual void trace(Visitor*) override;
131 133
132 protected: 134 protected:
133 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, doubl e timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<WorkerClients>); 135 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, doubl e timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<WorkerClients>);
134 void applyContentSecurityPolicyFromString(const String& contentSecurityPolic y, ContentSecurityPolicyHeaderType); 136 void applyContentSecurityPolicyFromString(const String& contentSecurityPolic y, ContentSecurityPolicyHeaderType);
135 137
136 virtual void logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP tr<ScriptCallStack>) override; 138 virtual void logExceptionToConsole(const String& errorMessage, int scriptId, const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP tr<ScriptCallStack>) override;
137 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>); 139 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>);
138 140
139 private: 141 private:
(...skipping 23 matching lines...) Expand all
163 RefPtrWillBeMember<WorkerInspectorController> m_workerInspectorController; 165 RefPtrWillBeMember<WorkerInspectorController> m_workerInspectorController;
164 bool m_closing; 166 bool m_closing;
165 167
166 OwnPtrWillBeMember<WorkerEventQueue> m_eventQueue; 168 OwnPtrWillBeMember<WorkerEventQueue> m_eventQueue;
167 169
168 OwnPtrWillBeMember<WorkerClients> m_workerClients; 170 OwnPtrWillBeMember<WorkerClients> m_workerClients;
169 171
170 double m_timeOrigin; 172 double m_timeOrigin;
171 173
172 OwnPtrWillBeMember<ConsoleMessageStorage> m_messageStorage; 174 OwnPtrWillBeMember<ConsoleMessageStorage> m_messageStorage;
175
176 HashMap<unsigned long, RefPtr<ConsoleMessage> > m_pendingMessages;
173 }; 177 };
174 178
175 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope()); 179 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke rGlobalScope(), context.isWorkerGlobalScope());
176 180
177 } // namespace blink 181 } // namespace blink
178 182
179 #endif // WorkerGlobalScope_h 183 #endif // WorkerGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698