Commit 61450740 authored by Xiaocheng Hu's avatar Xiaocheng Hu Committed by Commit Bot

Disallow implicit conversion in a CSSParserContext constructor

There's a CSSParserContext ctor that allows implicit conversion from a
|const CSSParserContext*| to |const CSSParserContext&|, where the latter
is actually a new object constructed on stack with different member
values.

So this patch stops the conversion.

Change-Id: Ibf98e8b0012122d2fc42e3fc4b4b38e8fe9b797a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2037854Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738484}
parent de0f95a3
...@@ -37,8 +37,8 @@ class CORE_EXPORT CSSParserContext final ...@@ -37,8 +37,8 @@ class CORE_EXPORT CSSParserContext final
// FIXME: This constructor shouldn't exist if we properly piped the UseCounter // FIXME: This constructor shouldn't exist if we properly piped the UseCounter
// through the CSS subsystem. Currently the UseCounter life time is too crazy // through the CSS subsystem. Currently the UseCounter life time is too crazy
// and we need a way to override it. // and we need a way to override it.
CSSParserContext(const CSSParserContext* other, explicit CSSParserContext(const CSSParserContext* other,
const Document* use_counter_document = nullptr); const Document* use_counter_document = nullptr);
CSSParserContext(const CSSParserContext* other, CSSParserContext(const CSSParserContext* other,
const KURL& base_url_override, const KURL& base_url_override,
......
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