summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/html/forms/base_text_input_type.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/html/forms/base_text_input_type.cc')
-rw-r--r--chromium/third_party/blink/renderer/core/html/forms/base_text_input_type.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/chromium/third_party/blink/renderer/core/html/forms/base_text_input_type.cc b/chromium/third_party/blink/renderer/core/html/forms/base_text_input_type.cc
index 8fdc4798ee3..0f838dc1992 100644
--- a/chromium/third_party/blink/renderer/core/html/forms/base_text_input_type.cc
+++ b/chromium/third_party/blink/renderer/core/html/forms/base_text_input_type.cc
@@ -28,6 +28,7 @@
#include "third_party/blink/renderer/core/html/forms/html_input_element.h"
#include "third_party/blink/renderer/core/html_names.h"
#include "third_party/blink/renderer/core/inspector/console_message.h"
+#include "third_party/blink/renderer/platform/heap/heap.h"
namespace blink {
@@ -88,11 +89,12 @@ bool BaseTextInputType::PatternMismatch(const String& value) const {
ScriptRegexp::UTF16));
if (!raw_regexp->IsValid()) {
GetElement().GetDocument().AddConsoleMessage(
- ConsoleMessage::Create(mojom::ConsoleMessageSource::kRendering,
- mojom::ConsoleMessageLevel::kError,
- "Pattern attribute value " + raw_pattern +
- " is not a valid regular expression: " +
- raw_regexp->ExceptionMessage()));
+ MakeGarbageCollected<ConsoleMessage>(
+ mojom::ConsoleMessageSource::kRendering,
+ mojom::ConsoleMessageLevel::kError,
+ "Pattern attribute value " + raw_pattern +
+ " is not a valid regular expression: " +
+ raw_regexp->ExceptionMessage()));
regexp_.reset(raw_regexp.release());
pattern_for_regexp_ = raw_pattern;
return false;