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

Side by Side Diff: Source/WebCore/dom/ScriptExecutionContext.h

Issue 6482007: Merge 76652 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 10 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 class DatabaseTaskSynchronizer; 53 class DatabaseTaskSynchronizer;
54 class DatabaseThread; 54 class DatabaseThread;
55 #endif 55 #endif
56 class DOMTimer; 56 class DOMTimer;
57 class EventListener; 57 class EventListener;
58 class EventTarget; 58 class EventTarget;
59 #if ENABLE(BLOB) || ENABLE(FILE_SYSTEM) 59 #if ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
60 class FileThread; 60 class FileThread;
61 #endif 61 #endif
62 class MessagePort; 62 class MessagePort;
63 class DOMURL;
63 class SecurityOrigin; 64 class SecurityOrigin;
64 class ScriptCallStack; 65 class ScriptCallStack;
65 66
66 class ScriptExecutionContext { 67 class ScriptExecutionContext {
67 public: 68 public:
68 ScriptExecutionContext(); 69 ScriptExecutionContext();
69 virtual ~ScriptExecutionContext(); 70 virtual ~ScriptExecutionContext();
70 71
71 virtual bool isDocument() const { return false; } 72 virtual bool isDocument() const { return false; }
72 virtual bool isWorkerContext() const { return false; } 73 virtual bool isWorkerContext() const { return false; }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 typedef const HashMap<ActiveDOMObject*, void*> ActiveDOMObjectsMap; 106 typedef const HashMap<ActiveDOMObject*, void*> ActiveDOMObjectsMap;
106 ActiveDOMObjectsMap& activeDOMObjects() const { return m_activeDOMObject s; } 107 ActiveDOMObjectsMap& activeDOMObjects() const { return m_activeDOMObject s; }
107 108
108 // MessagePort is conceptually a kind of ActiveDOMObject, but it needs t o be tracked separately for message dispatch. 109 // MessagePort is conceptually a kind of ActiveDOMObject, but it needs t o be tracked separately for message dispatch.
109 void processMessagePortMessagesSoon(); 110 void processMessagePortMessagesSoon();
110 void dispatchMessagePortEvents(); 111 void dispatchMessagePortEvents();
111 void createdMessagePort(MessagePort*); 112 void createdMessagePort(MessagePort*);
112 void destroyedMessagePort(MessagePort*); 113 void destroyedMessagePort(MessagePort*);
113 const HashSet<MessagePort*>& messagePorts() const { return m_messagePort s; } 114 const HashSet<MessagePort*>& messagePorts() const { return m_messagePort s; }
114 115
116 #if ENABLE(BLOB)
117 void createdDomUrl(DOMURL*);
118 void destroyedDomUrl(DOMURL*);
119 const HashSet<DOMURL*>& domUrls() const { return m_domUrls; }
120 #endif
115 void ref() { refScriptExecutionContext(); } 121 void ref() { refScriptExecutionContext(); }
116 void deref() { derefScriptExecutionContext(); } 122 void deref() { derefScriptExecutionContext(); }
117 123
118 class Task { 124 class Task {
119 WTF_MAKE_NONCOPYABLE(Task); WTF_MAKE_FAST_ALLOCATED; 125 WTF_MAKE_NONCOPYABLE(Task); WTF_MAKE_FAST_ALLOCATED;
120 public: 126 public:
121 Task() { } 127 Task() { }
122 virtual ~Task(); 128 virtual ~Task();
123 virtual void performTask(ScriptExecutionContext*) = 0; 129 virtual void performTask(ScriptExecutionContext*) = 0;
124 // Certain tasks get marked specially so that they aren't discarded, and are executed, when the context is shutting down its message queue. 130 // Certain tasks get marked specially so that they aren't discarded, and are executed, when the context is shutting down its message queue.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 RefPtr<SecurityOrigin> m_securityOrigin; 170 RefPtr<SecurityOrigin> m_securityOrigin;
165 171
166 HashSet<MessagePort*> m_messagePorts; 172 HashSet<MessagePort*> m_messagePorts;
167 173
168 HashMap<ActiveDOMObject*, void*> m_activeDOMObjects; 174 HashMap<ActiveDOMObject*, void*> m_activeDOMObjects;
169 175
170 HashMap<int, DOMTimer*> m_timeouts; 176 HashMap<int, DOMTimer*> m_timeouts;
171 177
172 #if ENABLE(BLOB) 178 #if ENABLE(BLOB)
173 HashSet<String> m_publicBlobURLs; 179 HashSet<String> m_publicBlobURLs;
180 HashSet<DOMURL*> m_domUrls;
174 #endif 181 #endif
175 182
176 virtual void refScriptExecutionContext() = 0; 183 virtual void refScriptExecutionContext() = 0;
177 virtual void derefScriptExecutionContext() = 0; 184 virtual void derefScriptExecutionContext() = 0;
178 185
179 bool m_inDispatchErrorEvent; 186 bool m_inDispatchErrorEvent;
180 class PendingException; 187 class PendingException;
181 OwnPtr<Vector<OwnPtr<PendingException> > > m_pendingExceptions; 188 OwnPtr<Vector<OwnPtr<PendingException> > > m_pendingExceptions;
182 189
183 #if ENABLE(DATABASE) 190 #if ENABLE(DATABASE)
184 RefPtr<DatabaseThread> m_databaseThread; 191 RefPtr<DatabaseThread> m_databaseThread;
185 bool m_hasOpenDatabases; // This never changes back to false, even after the database thread is closed. 192 bool m_hasOpenDatabases; // This never changes back to false, even after the database thread is closed.
186 #endif 193 #endif
187 194
188 #if ENABLE(BLOB) || ENABLE(FILE_SYSTEM) 195 #if ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
189 RefPtr<FileThread> m_fileThread; 196 RefPtr<FileThread> m_fileThread;
190 #endif 197 #endif
191 }; 198 };
192 199
193 } // namespace WebCore 200 } // namespace WebCore
194 201
195 202
196 #endif // ScriptExecutionContext_h 203 #endif // ScriptExecutionContext_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/window-domurl-crash-expected.txt ('k') | Source/WebCore/dom/ScriptExecutionContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698