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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 m_url = url; | 57 m_url = url; |
58 m_input = String(); | 58 m_input = String(); |
59 } else { | 59 } else { |
60 m_url = KURL(); | 60 m_url = KURL(); |
61 m_input = value; | 61 m_input = value; |
62 } | 62 } |
63 } | 63 } |
64 | 64 |
65 String DOMURL::createObjectURL(ExecutionContext* executionContext, Blob* blob, E
xceptionState& exceptionState) | 65 String DOMURL::createObjectURL(ExecutionContext* executionContext, Blob* blob, E
xceptionState& exceptionState) |
66 { | 66 { |
67 if (!executionContext || !blob) | 67 ASSERT(blob); |
| 68 if (!executionContext) |
68 return String(); | 69 return String(); |
69 if (blob->hasBeenClosed()) { | 70 if (blob->hasBeenClosed()) { |
70 exceptionState.throwDOMException(InvalidStateError, String(blob->isFile(
) ? "File" : "Blob") + " has been closed."); | 71 exceptionState.throwDOMException(InvalidStateError, String(blob->isFile(
) ? "File" : "Blob") + " has been closed."); |
71 return String(); | 72 return String(); |
72 } | 73 } |
73 return createPublicURL(executionContext, blob, blob->uuid()); | 74 return createPublicURL(executionContext, blob, blob->uuid()); |
74 } | 75 } |
75 | 76 |
76 String DOMURL::createPublicURL(ExecutionContext* executionContext, URLRegistrabl
e* registrable, const String& uuid) | 77 String DOMURL::createPublicURL(ExecutionContext* executionContext, URLRegistrabl
e* registrable, const String& uuid) |
77 { | 78 { |
(...skipping 18 matching lines...) Expand all Loading... |
96 | 97 |
97 void DOMURL::revokeObjectUUID(ExecutionContext* executionContext, const String&
uuid) | 98 void DOMURL::revokeObjectUUID(ExecutionContext* executionContext, const String&
uuid) |
98 { | 99 { |
99 if (!executionContext) | 100 if (!executionContext) |
100 return; | 101 return; |
101 | 102 |
102 executionContext->publicURLManager().revoke(uuid); | 103 executionContext->publicURLManager().revoke(uuid); |
103 } | 104 } |
104 | 105 |
105 } // namespace blink | 106 } // namespace blink |
OLD | NEW |