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

Side by Side Diff: Source/modules/filesystem/DOMFileSystem.h

Issue 915703002: Add task location information to ExecutionContext (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/workers/WorkerThread.cpp ('k') | Source/modules/filesystem/LocalFileSystem.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 20 matching lines...) Expand all
31 #ifndef DOMFileSystem_h 31 #ifndef DOMFileSystem_h
32 #define DOMFileSystem_h 32 #define DOMFileSystem_h
33 33
34 #include "bindings/core/v8/ScriptWrappable.h" 34 #include "bindings/core/v8/ScriptWrappable.h"
35 #include "core/dom/ActiveDOMObject.h" 35 #include "core/dom/ActiveDOMObject.h"
36 #include "core/dom/ExecutionContext.h" 36 #include "core/dom/ExecutionContext.h"
37 #include "core/dom/ExecutionContextTask.h" 37 #include "core/dom/ExecutionContextTask.h"
38 #include "modules/filesystem/DOMFileSystemBase.h" 38 #include "modules/filesystem/DOMFileSystemBase.h"
39 #include "modules/filesystem/EntriesCallback.h" 39 #include "modules/filesystem/EntriesCallback.h"
40 #include "platform/heap/Handle.h" 40 #include "platform/heap/Handle.h"
41 #include "public/platform/WebTraceLocation.h"
41 42
42 namespace blink { 43 namespace blink {
43 44
44 class DirectoryEntry; 45 class DirectoryEntry;
45 class FileCallback; 46 class FileCallback;
46 class FileEntry; 47 class FileEntry;
47 class FileWriterCallback; 48 class FileWriterCallback;
48 49
49 class DOMFileSystem final : public DOMFileSystemBase, public ScriptWrappable, pu blic ActiveDOMObject { 50 class DOMFileSystem final : public DOMFileSystemBase, public ScriptWrappable, pu blic ActiveDOMObject {
50 DEFINE_WRAPPERTYPEINFO(); 51 DEFINE_WRAPPERTYPEINFO();
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 }; 196 };
196 197
197 int m_numberOfPendingCallbacks; 198 int m_numberOfPendingCallbacks;
198 }; 199 };
199 200
200 template <typename CB, typename CBArg> 201 template <typename CB, typename CBArg>
201 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal lback, PassRefPtrWillBeRawPtr<CBArg> arg) 202 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal lback, PassRefPtrWillBeRawPtr<CBArg> arg)
202 { 203 {
203 ASSERT(executionContext->isContextThread()); 204 ASSERT(executionContext->isContextThread());
204 if (callback) 205 if (callback)
205 executionContext->postTask(adoptPtr(new DispatchCallbackRefPtrArgTask<CB , CBArg>(callback, arg))); 206 executionContext->postTask(FROM_HERE, adoptPtr(new DispatchCallbackRefPt rArgTask<CB, CBArg>(callback, arg)));
206 } 207 }
207 208
208 template <typename CB, typename CBArg> 209 template <typename CB, typename CBArg>
209 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal lback, CBArg* arg) 210 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal lback, CBArg* arg)
210 { 211 {
211 ASSERT(executionContext->isContextThread()); 212 ASSERT(executionContext->isContextThread());
212 if (callback) 213 if (callback)
213 executionContext->postTask(adoptPtr(new DispatchCallbackPtrArgTask<CB, C BArg>(callback, arg))); 214 executionContext->postTask(FROM_HERE, adoptPtr(new DispatchCallbackPtrAr gTask<CB, CBArg>(callback, arg)));
214 } 215 }
215 216
216 template <typename CB, typename CBArg> 217 template <typename CB, typename CBArg>
217 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal lback, const HeapVector<CBArg>& arg) 218 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal lback, const HeapVector<CBArg>& arg)
218 { 219 {
219 ASSERT(executionContext->isContextThread()); 220 ASSERT(executionContext->isContextThread());
220 if (callback) 221 if (callback)
221 executionContext->postTask(adoptPtr(new DispatchCallbackNonPtrArgTask<CB , PersistentHeapVector<CBArg>>(callback, arg))); 222 executionContext->postTask(FROM_HERE, adoptPtr(new DispatchCallbackNonPt rArgTask<CB, PersistentHeapVector<CBArg>>(callback, arg)));
222 } 223 }
223 224
224 template <typename CB, typename CBArg> 225 template <typename CB, typename CBArg>
225 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal lback, const CBArg& arg) 226 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal lback, const CBArg& arg)
226 { 227 {
227 ASSERT(executionContext->isContextThread()); 228 ASSERT(executionContext->isContextThread());
228 if (callback) 229 if (callback)
229 executionContext->postTask(adoptPtr(new DispatchCallbackNonPtrArgTask<CB , CBArg>(callback, arg))); 230 executionContext->postTask(FROM_HERE, adoptPtr(new DispatchCallbackNonPt rArgTask<CB, CBArg>(callback, arg)));
230 } 231 }
231 232
232 template <typename CB, typename CBArg> 233 template <typename CB, typename CBArg>
233 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal lback, const Member<CBArg>& arg) 234 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal lback, const Member<CBArg>& arg)
234 { 235 {
235 ASSERT(executionContext->isContextThread()); 236 ASSERT(executionContext->isContextThread());
236 if (callback) 237 if (callback)
237 executionContext->postTask(adoptPtr(new DispatchCallbackNonPtrArgTask<CB , Persistent<CBArg>>(callback, arg))); 238 executionContext->postTask(FROM_HERE, adoptPtr(new DispatchCallbackNonPt rArgTask<CB, Persistent<CBArg>>(callback, arg)));
238 } 239 }
239 240
240 template <typename CB> 241 template <typename CB>
241 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal lback) 242 void DOMFileSystem::scheduleCallback(ExecutionContext* executionContext, CB* cal lback)
242 { 243 {
243 ASSERT(executionContext->isContextThread()); 244 ASSERT(executionContext->isContextThread());
244 if (callback) 245 if (callback)
245 executionContext->postTask(adoptPtr(new DispatchCallbackNoArgTask<CB>(ca llback))); 246 executionContext->postTask(FROM_HERE, adoptPtr(new DispatchCallbackNoArg Task<CB>(callback)));
246 } 247 }
247 248
248 } // namespace blink 249 } // namespace blink
249 250
250 #endif // DOMFileSystem_h 251 #endif // DOMFileSystem_h
OLDNEW
« no previous file with comments | « Source/core/workers/WorkerThread.cpp ('k') | Source/modules/filesystem/LocalFileSystem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698