Commit 06119558 authored by bratell's avatar bratell Committed by Commit Bot

Change code to make jumbo exceptions unnecessary in core/html

In jumbo several compilation units are merged so you have to
have more unique names in each one, and don't #undef macros
needed by other compilation units.

BUG=713137

Review-Url: https://codereview.chromium.org/2971683003
Cr-Commit-Position: refs/heads/master@{#485585}
parent c522ea9e
......@@ -619,16 +619,7 @@ blink_core_sources("html") {
"track/vtt/VTTTokenizer.h",
]
jumbo_excluded_sources = [
"canvas/CanvasRenderingContext.cpp", # https://crbug.com/716395
# Does ugly things with undef (patch incoming)
"parser/HTMLTokenizer.cpp",
# kSupportedTokens in both HTMLMediaElementControlsList.cpp
# and HTMLIFrameElementSandbox.cpp
"HTMLIFrameElementSandbox.cpp",
]
jumbo_excluded_sources = [ "canvas/CanvasRenderingContext.cpp" ] # https://crbug.com/716395
configs += [
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
......
......@@ -10,17 +10,17 @@ namespace blink {
namespace {
const char* const kSupportedTokens[] = {"allow-forms",
"allow-modals",
"allow-pointer-lock",
"allow-popups",
"allow-popups-to-escape-sandbox",
"allow-same-origin",
"allow-scripts",
"allow-top-navigation"};
const char* const kSupportedSandboxTokens[] = {"allow-forms",
"allow-modals",
"allow-pointer-lock",
"allow-popups",
"allow-popups-to-escape-sandbox",
"allow-same-origin",
"allow-scripts",
"allow-top-navigation"};
bool IsTokenSupported(const AtomicString& token) {
for (const char* supported_token : kSupportedTokens) {
for (const char* supported_token : kSupportedSandboxTokens) {
if (token == supported_token)
return true;
}
......
......@@ -36,10 +36,6 @@
#include "platform/wtf/ASCIICType.h"
#include "platform/wtf/text/Unicode.h"
// Please don't use DEFINE_STATIC_LOCAL in this file. The HTMLTokenizer is used
// from multiple threads and DEFINE_STATIC_LOCAL isn't threadsafe.
#undef DEFINE_STATIC_LOCAL
namespace blink {
using namespace HTMLNames;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment