mirror of
https://github.com/dart-lang/sdk
synced 2024-09-04 16:03:44 +00:00
[kernel] Return null string as source if no source available
Fixes #31793. Bug: Change-Id: If3ecf67387087db6a36f736c0f259b49eb133391 Reviewed-on: https://dart-review.googlesource.com/32767 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Jens Johansen <jensj@google.com>
This commit is contained in:
parent
ab636dfbd1
commit
c48ddcb025
|
@ -9350,6 +9350,9 @@ bool Script::HasSource() const {
|
|||
RawString* Script::Source() const {
|
||||
String& source = String::Handle(raw_ptr()->source_);
|
||||
if (source.IsNull()) {
|
||||
if (kind() == RawScript::kKernelTag) {
|
||||
return String::null();
|
||||
}
|
||||
return GenerateSource();
|
||||
}
|
||||
return raw_ptr()->source_;
|
||||
|
|
Loading…
Reference in a new issue