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

Side by Side Diff: Source/web/WebSharedWorkerImpl.cpp

Issue 618583002: Correct data size argument type in resource loading path to unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add static_cast to RELEASE_ASSERT in AssociatedURLLoader::ClientAdapter::didReceiveData Created 6 years, 2 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
« no previous file with comments | « Source/web/AssociatedURLLoader.cpp ('k') | public/platform/WebApplicationCacheHost.h » ('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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 return 0; 224 return 0;
225 } 225 }
226 226
227 void WebSharedWorkerImpl::loadShadowPage() 227 void WebSharedWorkerImpl::loadShadowPage()
228 { 228 {
229 WebLocalFrameImpl* webFrame = toWebLocalFrameImpl(m_webView->mainFrame()); 229 WebLocalFrameImpl* webFrame = toWebLocalFrameImpl(m_webView->mainFrame());
230 230
231 // Construct substitute data source for the 'shadow page'. We only need it 231 // Construct substitute data source for the 'shadow page'. We only need it
232 // to have same origin as the worker so the loading checks work correctly. 232 // to have same origin as the worker so the loading checks work correctly.
233 CString content(""); 233 CString content("");
234 int length = static_cast<int>(content.length()); 234 RefPtr<SharedBuffer> buffer(SharedBuffer::create(content.data(), content.len gth()));
235 RefPtr<SharedBuffer> buffer(SharedBuffer::create(content.data(), length));
236 webFrame->frame()->loader().load(FrameLoadRequest(0, ResourceRequest(m_url), SubstituteData(buffer, "text/html", "UTF-8", KURL()))); 235 webFrame->frame()->loader().load(FrameLoadRequest(0, ResourceRequest(m_url), SubstituteData(buffer, "text/html", "UTF-8", KURL())));
237 } 236 }
238 237
239 void WebSharedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame) 238 void WebSharedWorkerImpl::didFinishDocumentLoad(WebLocalFrame* frame)
240 { 239 {
241 ASSERT(!m_loadingDocument); 240 ASSERT(!m_loadingDocument);
242 ASSERT(!m_mainScriptLoader); 241 ASSERT(!m_mainScriptLoader);
243 m_mainScriptLoader = Loader::create(); 242 m_mainScriptLoader = Loader::create();
244 m_loadingDocument = toWebLocalFrameImpl(frame)->frame()->document(); 243 m_loadingDocument = toWebLocalFrameImpl(frame)->frame()->document();
245 m_mainScriptLoader->load( 244 m_mainScriptLoader->load(
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 if (devtoolsAgent) 460 if (devtoolsAgent)
462 devtoolsAgent->dispatchOnInspectorBackend(message); 461 devtoolsAgent->dispatchOnInspectorBackend(message);
463 } 462 }
464 463
465 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) 464 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client)
466 { 465 {
467 return new WebSharedWorkerImpl(client); 466 return new WebSharedWorkerImpl(client);
468 } 467 }
469 468
470 } // namespace blink 469 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/AssociatedURLLoader.cpp ('k') | public/platform/WebApplicationCacheHost.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698