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

Side by Side Diff: Source/core/loader/WorkerThreadableLoader.cpp

Issue 212553002: Avoid deadlock when attempting to GC during synchronous loading in a worker. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | « no previous file | no next file » | 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) 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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698