Commit e1c3f04f authored by Kouhei Ueno's avatar Kouhei Ueno Committed by Commit Bot

[ES6 modules] Warn about ModuleScript::CreateParseError usage

Bug: None
Change-Id: I16c48291147a71dd119983811e45e3a268ef963e
Reviewed-on: https://chromium-review.googlesource.com/c/1343411Reviewed-by: default avatarHiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: default avatarHiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613226}
parent 5fd81121
......@@ -54,8 +54,14 @@ class CORE_EXPORT ModuleScript final : public Script, public NameClient {
ScriptModule Record() const;
bool HasEmptyRecord() const;
// Note: ParseError-related methods should only be used from ModuleTreeLinker
// or unit tests. You probably want to check |*ErrorToRethrow*()|
// instead.
void SetParseErrorAndClearRecord(ScriptValue error);
bool HasParseError() const { return !parse_error_.IsEmpty(); }
// CreateParseError() retrieves |parse_error_| as a ScriptValue.
ScriptValue CreateParseError() const;
void SetErrorToRethrow(ScriptValue error);
......
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