| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Motorola Mobility Inc. | 3 * Copyright (C) 2012 Motorola Mobility Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "core/dom/ExecutionContext.h" | 33 #include "core/dom/ExecutionContext.h" |
| 34 #include "core/fetch/MemoryCache.h" | 34 #include "core/fetch/MemoryCache.h" |
| 35 #include "core/fileapi/Blob.h" | 35 #include "core/fileapi/Blob.h" |
| 36 #include "core/html/PublicURLManager.h" | 36 #include "core/html/PublicURLManager.h" |
| 37 #include "platform/blob/BlobURL.h" | 37 #include "platform/blob/BlobURL.h" |
| 38 #include "platform/weborigin/SecurityOrigin.h" | 38 #include "platform/weborigin/SecurityOrigin.h" |
| 39 #include "wtf/MainThread.h" | 39 #include "wtf/MainThread.h" |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace WebCore { |
| 42 | 42 |
| 43 DEFINE_GC_INFO(DOMURL); |
| 44 |
| 43 DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& exceptionSta
te) | 45 DOMURL::DOMURL(const String& url, const KURL& base, ExceptionState& exceptionSta
te) |
| 44 { | 46 { |
| 45 ScriptWrappable::init(this); | 47 ScriptWrappable::init(this); |
| 46 if (!base.isValid()) | 48 if (!base.isValid()) |
| 47 exceptionState.throwDOMException(SyntaxError, "Invalid base URL"); | 49 exceptionState.throwDOMException(SyntaxError, "Invalid base URL"); |
| 48 | 50 |
| 49 m_url = KURL(base, url); | 51 m_url = KURL(base, url); |
| 50 if (!m_url.isValid()) | 52 if (!m_url.isValid()) |
| 51 exceptionState.throwDOMException(SyntaxError, "Invalid URL"); | 53 exceptionState.throwDOMException(SyntaxError, "Invalid URL"); |
| 52 } | 54 } |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 { | 87 { |
| 86 if (!executionContext) | 88 if (!executionContext) |
| 87 return; | 89 return; |
| 88 | 90 |
| 89 KURL url(KURL(), urlString); | 91 KURL url(KURL(), urlString); |
| 90 MemoryCache::removeURLFromCache(executionContext, url); | 92 MemoryCache::removeURLFromCache(executionContext, url); |
| 91 executionContext->publicURLManager().revoke(url); | 93 executionContext->publicURLManager().revoke(url); |
| 92 } | 94 } |
| 93 | 95 |
| 94 } // namespace WebCore | 96 } // namespace WebCore |
| OLD | NEW |