diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-28 15:28:34 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-28 13:54:51 +0000 |
commit | 2a19c63448c84c1805fb1a585c3651318bb86ca7 (patch) | |
tree | eb17888e8531aa6ee5e85721bd553b832a7e5156 /chromium/third_party/blink/renderer/core/frame/message_report_body.h | |
parent | b014812705fc80bff0a5c120dfcef88f349816dc (diff) | |
download | qtwebengine-chromium-2a19c63448c84c1805fb1a585c3651318bb86ca7.tar.gz |
BASELINE: Update Chromium to 69.0.3497.70
Change-Id: I2b7b56e4e7a8b26656930def0d4575dc32b900a0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/frame/message_report_body.h')
-rw-r--r-- | chromium/third_party/blink/renderer/core/frame/message_report_body.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/chromium/third_party/blink/renderer/core/frame/message_report_body.h b/chromium/third_party/blink/renderer/core/frame/message_report_body.h new file mode 100644 index 00000000000..54b40611adf --- /dev/null +++ b/chromium/third_party/blink/renderer/core/frame/message_report_body.h @@ -0,0 +1,42 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_MESSAGE_REPORT_BODY_H_ +#define THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_MESSAGE_REPORT_BODY_H_ + +#include "third_party/blink/renderer/bindings/core/v8/source_location.h" +#include "third_party/blink/renderer/core/frame/report_body.h" + +namespace blink { + +class MessageReportBody : public ReportBody { + public: + MessageReportBody(const String& message, + std::unique_ptr<SourceLocation> location) + : message_(message), location_(std::move(location)) {} + + ~MessageReportBody() override = default; + + String message() const { return message_; } + + String sourceFile() const { return location_->Url(); } + + long lineNumber(bool& is_null) const { + is_null = location_->IsUnknown(); + return location_->LineNumber(); + } + + long columnNumber(bool& is_null) const { + is_null = location_->IsUnknown(); + return location_->ColumnNumber(); + } + + protected: + const String message_; + std::unique_ptr<SourceLocation> location_; +}; + +} // namespace blink + +#endif // THIRD_PARTY_BLINK_RENDERER_CORE_FRAME_MESSAGE_REPORT_BODY_H_ |