OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 2012 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 | 53 |
54 template<> struct CrossThreadCopierBase<false, false, WebKit::WebFileInfo> { | 54 template<> struct CrossThreadCopierBase<false, false, WebKit::WebFileInfo> { |
55 typedef WebKit::WebFileInfo Type; | 55 typedef WebKit::WebFileInfo Type; |
56 static Type copy(const WebKit::WebFileInfo& info) | 56 static Type copy(const WebKit::WebFileInfo& info) |
57 { | 57 { |
58 // Perform per-field copy to make sure we don't do any (unexpected) non- thread safe copy here. | 58 // Perform per-field copy to make sure we don't do any (unexpected) non- thread safe copy here. |
59 struct WebKit::WebFileInfo newInfo; | 59 struct WebKit::WebFileInfo newInfo; |
60 newInfo.modificationTime = info.modificationTime; | 60 newInfo.modificationTime = info.modificationTime; |
61 newInfo.length = info.length; | 61 newInfo.length = info.length; |
62 newInfo.type = info.type; | 62 newInfo.type = info.type; |
63 newInfo.platformPath.assign(info.platformPath.data(), info.platformPath. length()); | 63 newInfo.platformPath.assign(String(info.platformPath)); |
darin (slow to review)
2013/05/24 06:12:53
nit: there's an implicit casting operator to WTF::
abarth-chromium
2013/05/24 06:17:44
I'll try it without the explicit String. It's an
| |
64 return newInfo; | 64 return newInfo; |
65 } | 65 } |
66 }; | 66 }; |
67 | 67 |
68 template<> struct CrossThreadCopierBase<false, false, WebKit::WebVector<WebKit:: WebFileSystemEntry> > { | 68 template<> struct CrossThreadCopierBase<false, false, WebKit::WebVector<WebKit:: WebFileSystemEntry> > { |
69 typedef WebKit::WebVector<WebKit::WebFileSystemEntry> Type; | 69 typedef WebKit::WebVector<WebKit::WebFileSystemEntry> Type; |
70 static Type copy(const WebKit::WebVector<WebKit::WebFileSystemEntry>& entrie s) | 70 static Type copy(const WebKit::WebVector<WebKit::WebFileSystemEntry>& entrie s) |
71 { | 71 { |
72 WebKit::WebVector<WebKit::WebFileSystemEntry> newEntries(entries.size()) ; | 72 WebKit::WebVector<WebKit::WebFileSystemEntry> newEntries(entries.size()) ; |
73 for (size_t i = 0; i < entries.size(); ++i) { | 73 for (size_t i = 0; i < entries.size(); ++i) { |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
480 { | 480 { |
481 // Relies on its caller (MainThreadFileSystemCallbacks:did*) to keep WorkerF ileSystemCallbacksBridge alive. | 481 // Relies on its caller (MainThreadFileSystemCallbacks:did*) to keep WorkerF ileSystemCallbacksBridge alive. |
482 ASSERT(isMainThread()); | 482 ASSERT(isMainThread()); |
483 | 483 |
484 MutexLocker locker(m_loaderProxyMutex); | 484 MutexLocker locker(m_loaderProxyMutex); |
485 if (m_workerLoaderProxy) | 485 if (m_workerLoaderProxy) |
486 m_workerLoaderProxy->postTaskForModeToWorkerContext(createCallbackTask(& runTaskOnWorkerThread, this, task), mode); | 486 m_workerLoaderProxy->postTaskForModeToWorkerContext(createCallbackTask(& runTaskOnWorkerThread, this, task), mode); |
487 } | 487 } |
488 | 488 |
489 } // namespace WebCore | 489 } // namespace WebCore |
OLD | NEW |