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

Side by Side Diff: Source/core/dom/ContextFeatures.h

Issue 75383002: Avoid silly crash in ContextFeatures::urlDidChange (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 1 month 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 | « no previous file | 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 inline bool ContextFeatures::isEnabled(Document* document, FeatureType type, boo l defaultValue) const 96 inline bool ContextFeatures::isEnabled(Document* document, FeatureType type, boo l defaultValue) const
97 { 97 {
98 if (!m_client) 98 if (!m_client)
99 return defaultValue; 99 return defaultValue;
100 return m_client->isEnabled(document, type, defaultValue); 100 return m_client->isEnabled(document, type, defaultValue);
101 } 101 }
102 102
103 inline void ContextFeatures::urlDidChange(Document* document) 103 inline void ContextFeatures::urlDidChange(Document* document)
104 { 104 {
105 if (m_client) 105 // FIXME: The original code, commented out below, is obviously
106 return; 106 // wrong, but the seemingly correct fix of negating the test to
107 m_client->urlDidChange(document); 107 // the more logical 'if (!m_client)' crashes the renderer.
108 // See issue 294180
109 //
110 // if (m_client)
111 // return;
112 // m_client->urlDidChange(document);
108 } 113 }
109 114
110 } // namespace WebCore 115 } // namespace WebCore
111 116
112 #endif // ContextFeatures_h 117 #endif // ContextFeatures_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698