Changeset 142726 in webkit
- Timestamp:
- Feb 12, 2013 11:34:47 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r142725 r142726 1 2013-02-12 Hajime Morrita <morrita@google.com> 2 3 [Internals] setShadowDOMEnabled() shouldn't be used except a few tests. 4 https://bugs.webkit.org/show_bug.cgi?id=109642 5 6 Reviewed by Kent Tamura. 7 8 * fast/dom/shadow/shadow-dom-enabled-flag-whitelist-expected.txt: Added. 9 * fast/dom/shadow/shadow-dom-enabled-flag-whitelist.html: Added. 10 1 11 2013-02-12 Vsevolod Vlasov <vsevik@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r142725 r142726 1 2013-02-12 Hajime Morrita <morrita@google.com> 2 3 [Internals] setShadowDOMEnabled() shouldn't be used except a few tests. 4 https://bugs.webkit.org/show_bug.cgi?id=109642 5 6 Reviewed by Kent Tamura. 7 8 InternalSettings.setShadowDOMEnabled() shouldn't be called after 9 any relevant DOM bindings are touched. However for fuzzers, it 10 isn't trivial to regulate its behavior. 11 12 This change whitelists the URL of running test for prevent 13 unintended API calls. This doesn't hurt the Internals usability 14 since the API is called from just a couple of tests and the number 15 isn't expected to grow. 16 17 Test: fast/dom/shadow/shadow-dom-enabled-flag-whitelist.html 18 19 * testing/InternalSettings.cpp: 20 (WebCore::urlIsWhitelisted): 21 (WebCore): 22 (WebCore::InternalSettings::setShadowDOMEnabled): 23 1 24 2013-02-12 Vsevolod Vlasov <vsevik@chromium.org> 2 25 -
trunk/Source/WebCore/testing/InternalSettings.cpp
r142509 r142726 196 196 } 197 197 198 static bool urlIsWhitelistedForSetShadowDOMEnabled(const String& url) 199 { 200 // This check is just for preventing fuzzers from crashing because of unintended API calls. 201 // You can list your test if needed. 202 return notFound != url.find("fast/dom/shadow/content-shadow-unknown.html") 203 || notFound != url.find("fast/dom/shadow/insertion-points-with-shadow-disabled.html"); 204 } 205 198 206 void InternalSettings::setShadowDOMEnabled(bool enabled, ExceptionCode& ec) 199 207 { 208 if (!urlIsWhitelistedForSetShadowDOMEnabled(page()->mainFrame()->document()->url().string())) { 209 ec = INVALID_ACCESS_ERR; 210 return; 211 } 212 200 213 #if ENABLE(SHADOW_DOM) 201 UNUSED_PARAM(ec);202 214 RuntimeEnabledFeatures::setShadowDOMEnabled(enabled); 203 215 #else
Note: See TracChangeset
for help on using the changeset viewer.