| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 events.append(loaderDone.get()); | 75 events.append(loaderDone.get()); |
| 76 | 76 |
| 77 RefPtr<ThreadableLoaderClientWrapper> clientWrapper(ThreadableLoaderClientWr
apper::create(&client)); | 77 RefPtr<ThreadableLoaderClientWrapper> clientWrapper(ThreadableLoaderClientWr
apper::create(&client)); |
| 78 OwnPtr<WorkerLoaderClientBridgeSyncHelper> clientBridge(WorkerLoaderClientBr
idgeSyncHelper::create(client, loaderDone.release())); | 78 OwnPtr<WorkerLoaderClientBridgeSyncHelper> clientBridge(WorkerLoaderClientBr
idgeSyncHelper::create(client, loaderDone.release())); |
| 79 | 79 |
| 80 // This must be valid while loader is around. | 80 // This must be valid while loader is around. |
| 81 WorkerLoaderClientBridgeSyncHelper* clientBridgePtr = clientBridge.get(); | 81 WorkerLoaderClientBridgeSyncHelper* clientBridgePtr = clientBridge.get(); |
| 82 | 82 |
| 83 RefPtr<WorkerThreadableLoader> loader = WorkerThreadableLoader::create(worke
rGlobalScope, clientWrapper, clientBridge.release(), request, options); | 83 RefPtr<WorkerThreadableLoader> loader = WorkerThreadableLoader::create(worke
rGlobalScope, clientWrapper, clientBridge.release(), request, options); |
| 84 | 84 |
| 85 ThreadState::SafePointScope scope(ThreadState::HeapPointersOnStack); |
| 85 blink::WebWaitableEvent* signalled = blink::Platform::current()->waitMultipl
eEvents(events); | 86 blink::WebWaitableEvent* signalled = blink::Platform::current()->waitMultipl
eEvents(events); |
| 86 if (signalled == shutdownEvent) { | 87 if (signalled == shutdownEvent) { |
| 87 loader->cancel(); | 88 loader->cancel(); |
| 88 return; | 89 return; |
| 89 } | 90 } |
| 90 | 91 |
| 91 clientBridgePtr->run(); | 92 clientBridgePtr->run(); |
| 92 } | 93 } |
| 93 | 94 |
| 94 void WorkerThreadableLoader::cancel() | 95 void WorkerThreadableLoader::cancel() |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 { | 219 { |
| 219 m_clientBridge->didFailAccessControlCheck(error); | 220 m_clientBridge->didFailAccessControlCheck(error); |
| 220 } | 221 } |
| 221 | 222 |
| 222 void WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck() | 223 void WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck() |
| 223 { | 224 { |
| 224 m_clientBridge->didFailRedirectCheck(); | 225 m_clientBridge->didFailRedirectCheck(); |
| 225 } | 226 } |
| 226 | 227 |
| 227 } // namespace WebCore | 228 } // namespace WebCore |
| OLD | NEW |