OLD | NEW |
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 double timeOrigin() const { return m_timeOrigin; } | 118 double timeOrigin() const { return m_timeOrigin; } |
119 | 119 |
120 WorkerClients* clients() { return m_workerClients.get(); } | 120 WorkerClients* clients() { return m_workerClients.get(); } |
121 | 121 |
122 using SecurityContext::securityOrigin; | 122 using SecurityContext::securityOrigin; |
123 using SecurityContext::contentSecurityPolicy; | 123 using SecurityContext::contentSecurityPolicy; |
124 | 124 |
125 virtual void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) overr
ide final; | 125 virtual void addConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) overr
ide final; |
126 ConsoleMessageStorage* messageStorage(); | 126 ConsoleMessageStorage* messageStorage(); |
127 | 127 |
| 128 void exceptionHandled(int exceptionId, bool isHandled); |
| 129 |
128 virtual void trace(Visitor*) override; | 130 virtual void trace(Visitor*) override; |
129 | 131 |
130 protected: | 132 protected: |
131 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, doubl
e timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<WorkerClients>); | 133 WorkerGlobalScope(const KURL&, const String& userAgent, WorkerThread*, doubl
e timeOrigin, const SecurityOrigin*, PassOwnPtrWillBeRawPtr<WorkerClients>); |
132 void applyContentSecurityPolicyFromString(const String& contentSecurityPolic
y, ContentSecurityPolicyHeaderType); | 134 void applyContentSecurityPolicyFromString(const String& contentSecurityPolic
y, ContentSecurityPolicyHeaderType); |
133 | 135 |
134 virtual void logExceptionToConsole(const String& errorMessage, int scriptId,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP
tr<ScriptCallStack>) override; | 136 virtual void logExceptionToConsole(const String& errorMessage, int scriptId,
const String& sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawP
tr<ScriptCallStack>) override; |
135 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>); | 137 void addMessageToWorkerConsole(PassRefPtrWillBeRawPtr<ConsoleMessage>); |
136 | 138 |
137 private: | 139 private: |
(...skipping 23 matching lines...) Expand all Loading... |
161 RefPtrWillBeMember<WorkerInspectorController> m_workerInspectorController; | 163 RefPtrWillBeMember<WorkerInspectorController> m_workerInspectorController; |
162 bool m_closing; | 164 bool m_closing; |
163 | 165 |
164 OwnPtrWillBeMember<WorkerEventQueue> m_eventQueue; | 166 OwnPtrWillBeMember<WorkerEventQueue> m_eventQueue; |
165 | 167 |
166 OwnPtrWillBeMember<WorkerClients> m_workerClients; | 168 OwnPtrWillBeMember<WorkerClients> m_workerClients; |
167 | 169 |
168 double m_timeOrigin; | 170 double m_timeOrigin; |
169 | 171 |
170 OwnPtrWillBeMember<ConsoleMessageStorage> m_messageStorage; | 172 OwnPtrWillBeMember<ConsoleMessageStorage> m_messageStorage; |
| 173 |
| 174 HashMap<unsigned long, RefPtr<ConsoleMessage> > m_pendingMessages; |
171 }; | 175 }; |
172 | 176 |
173 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); | 177 DEFINE_TYPE_CASTS(WorkerGlobalScope, ExecutionContext, context, context->isWorke
rGlobalScope(), context.isWorkerGlobalScope()); |
174 | 178 |
175 } // namespace blink | 179 } // namespace blink |
176 | 180 |
177 #endif // WorkerGlobalScope_h | 181 #endif // WorkerGlobalScope_h |
OLD | NEW |