| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |