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

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

Issue 124943003: Remove 'String::append' from some of the blink source. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removing the CustomFilterValidatedProgram.cpp from the patch(File is deleted in r164847) Created 6 years, 11 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) 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 WorkerThreadableLoader::~WorkerThreadableLoader() 61 WorkerThreadableLoader::~WorkerThreadableLoader()
62 { 62 {
63 m_bridge.destroy(); 63 m_bridge.destroy();
64 } 64 }
65 65
66 void WorkerThreadableLoader::loadResourceSynchronously(WorkerGlobalScope* worker GlobalScope, const ResourceRequest& request, ThreadableLoaderClient& client, con st ThreadableLoaderOptions& options) 66 void WorkerThreadableLoader::loadResourceSynchronously(WorkerGlobalScope* worker GlobalScope, const ResourceRequest& request, ThreadableLoaderClient& client, con st ThreadableLoaderOptions& options)
67 { 67 {
68 WorkerRunLoop& runLoop = workerGlobalScope->thread()->runLoop(); 68 WorkerRunLoop& runLoop = workerGlobalScope->thread()->runLoop();
69 69
70 // Create a unique mode just for this synchronous resource load. 70 // Create a unique mode just for this synchronous resource load.
71 String mode = loadResourceSynchronouslyMode; 71 String mode = loadResourceSynchronouslyMode + String::number(runLoop.createU niqueId());
72 mode.append(String::number(runLoop.createUniqueId()));
73 72
74 RefPtr<WorkerThreadableLoader> loader = WorkerThreadableLoader::create(worke rGlobalScope, &client, mode, request, options); 73 RefPtr<WorkerThreadableLoader> loader = WorkerThreadableLoader::create(worke rGlobalScope, &client, mode, request, options);
75 MessageQueueWaitResult result = MessageQueueMessageReceived; 74 MessageQueueWaitResult result = MessageQueueMessageReceived;
76 while (!loader->done() && result != MessageQueueTerminated) 75 while (!loader->done() && result != MessageQueueTerminated)
77 result = runLoop.runInMode(workerGlobalScope, mode); 76 result = runLoop.runInMode(workerGlobalScope, mode);
78 77
79 if (!loader->done() && result == MessageQueueTerminated) 78 if (!loader->done() && result == MessageQueueTerminated)
80 loader->cancel(); 79 loader->cancel();
81 } 80 }
82 81
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 ASSERT_UNUSED(context, context->isWorkerGlobalScope()); 261 ASSERT_UNUSED(context, context->isWorkerGlobalScope());
263 workerClientWrapper->didFailRedirectCheck(); 262 workerClientWrapper->didFailRedirectCheck();
264 } 263 }
265 264
266 void WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck() 265 void WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck()
267 { 266 {
268 m_loaderProxy.postTaskForModeToWorkerGlobalScope(createCallbackTask(&workerG lobalScopeDidFailRedirectCheck, m_workerClientWrapper), m_taskMode); 267 m_loaderProxy.postTaskForModeToWorkerGlobalScope(createCallbackTask(&workerG lobalScopeDidFailRedirectCheck, m_workerClientWrapper), m_taskMode);
269 } 268 }
270 269
271 } // namespace WebCore 270 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/inspector/NetworkResourcesData.cpp ('k') | Source/modules/filesystem/DOMFilePath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698