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

Side by Side Diff: Source/WebCore/html/DOMURL.cpp

Issue 6480008: Merge 77914 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 10 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/domurl-script-execution-context-crash-expected.txt ('k') | no next file » | 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) 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
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
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)
OLDNEW
« no previous file with comments | « LayoutTests/fast/files/domurl-script-execution-context-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698