| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "DOMURL.h" | 30 #include "DOMURL.h" |
| 31 | 31 |
| 32 #include "KURL.h" | 32 #include "KURL.h" |
| 33 #include "ScriptExecutionContext.h" | 33 #include "ScriptExecutionContext.h" |
| 34 | 34 |
| 35 namespace WebCore { | 35 namespace WebCore { |
| 36 | 36 |
| 37 DOMURL::DOMURL(ScriptExecutionContext* scriptExecutionContext) | 37 DOMURL::DOMURL(ScriptExecutionContext* scriptExecutionContext) |
| 38 : m_scriptExecutionContext(scriptExecutionContext) | 38 : m_scriptExecutionContext(scriptExecutionContext) |
| 39 { | 39 { |
| 40 m_scriptExecutionContext->createdDomUrl(this); | 40 if (m_scriptExecutionContext) |
| 41 m_scriptExecutionContext->createdDomUrl(this); |
| 41 } | 42 } |
| 42 | 43 |
| 43 DOMURL::~DOMURL() | 44 DOMURL::~DOMURL() |
| 44 { | 45 { |
| 45 if (m_scriptExecutionContext) | 46 if (m_scriptExecutionContext) |
| 46 m_scriptExecutionContext->destroyedDomUrl(this); | 47 m_scriptExecutionContext->destroyedDomUrl(this); |
| 47 } | 48 } |
| 48 | 49 |
| 49 void DOMURL::contextDestroyed() | 50 void DOMURL::contextDestroyed() |
| 50 { | 51 { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 62 void DOMURL::revokeObjectURL(const String& urlString) | 63 void DOMURL::revokeObjectURL(const String& urlString) |
| 63 { | 64 { |
| 64 if (!m_scriptExecutionContext) | 65 if (!m_scriptExecutionContext) |
| 65 return; | 66 return; |
| 66 m_scriptExecutionContext->revokePublicBlobURL(KURL(KURL(), urlString)); | 67 m_scriptExecutionContext->revokePublicBlobURL(KURL(KURL(), urlString)); |
| 67 } | 68 } |
| 68 | 69 |
| 69 } // namespace WebCore | 70 } // namespace WebCore |
| 70 | 71 |
| 71 #endif // ENABLE(BLOB) | 72 #endif // ENABLE(BLOB) |
| OLD | NEW |