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

Side by Side Diff: WebCore/dom/ScriptExecutionContext.cpp

Issue 3444009: Merge 67734 - createBlobURL with no argument causes crash.... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 3 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 | « LayoutTests/fast/files/create-blob-url-crash-expected.txt ('k') | WebCore/page/DOMWindow.idl » ('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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 270 }
271 271
272 DOMTimer* ScriptExecutionContext::findTimeout(int timeoutId) 272 DOMTimer* ScriptExecutionContext::findTimeout(int timeoutId)
273 { 273 {
274 return m_timeouts.get(timeoutId); 274 return m_timeouts.get(timeoutId);
275 } 275 }
276 276
277 #if ENABLE(BLOB) 277 #if ENABLE(BLOB)
278 KURL ScriptExecutionContext::createPublicBlobURL(Blob* blob) 278 KURL ScriptExecutionContext::createPublicBlobURL(Blob* blob)
279 { 279 {
280 if (!blob)
281 return KURL();
280 KURL publicURL = BlobURL::createURL(this); 282 KURL publicURL = BlobURL::createURL(this);
281 ThreadableBlobRegistry::registerBlobURL(this, publicURL, blob->url()); 283 ThreadableBlobRegistry::registerBlobURL(this, publicURL, blob->url());
282 m_publicBlobURLs.add(publicURL.string()); 284 m_publicBlobURLs.add(publicURL.string());
283 return publicURL; 285 return publicURL;
284 } 286 }
285 287
286 void ScriptExecutionContext::revokePublicBlobURL(const KURL& url) 288 void ScriptExecutionContext::revokePublicBlobURL(const KURL& url)
287 { 289 {
288 if (m_publicBlobURLs.contains(url.string())) { 290 if (m_publicBlobURLs.contains(url.string())) {
289 ThreadableBlobRegistry::unregisterBlobURL(this, url); 291 ThreadableBlobRegistry::unregisterBlobURL(this, url);
(...skipping 28 matching lines...) Expand all
318 if (isWorkerContext()) 320 if (isWorkerContext())
319 return static_cast<WorkerContext*>(this)->script()->globalData(); 321 return static_cast<WorkerContext*>(this)->script()->globalData();
320 #endif 322 #endif
321 323
322 ASSERT_NOT_REACHED(); 324 ASSERT_NOT_REACHED();
323 return 0; 325 return 0;
324 } 326 }
325 #endif 327 #endif
326 328
327 } // namespace WebCore 329 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/files/create-blob-url-crash-expected.txt ('k') | WebCore/page/DOMWindow.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698