[vm] Behave more gracefully for kernel-based Scripts that lack source (i.e., from a core snapshot).
Change-Id: Ie3a40a4ceb85e450f47f46a019626a0b553c14c7 Reviewed-on: https://dart-review.googlesource.com/74661 Reviewed-by: Alexander Aprelev <aam@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
a8e042f705
commit
91cbb57cd5
@@ -454,11 +454,11 @@ void Script::PrintJSONImpl(JSONStream* stream, bool ref) const {
|
||||
}
|
||||
|
||||
// Print the line number table
|
||||
if (!source.IsNull()) {
|
||||
const GrowableObjectArray& lineNumberArray =
|
||||
GrowableObjectArray::Handle(GenerateLineNumberArray());
|
||||
if (!lineNumberArray.IsNull()) {
|
||||
JSONArray tokenPosTable(&jsobj, "tokenPosTable");
|
||||
|
||||
const GrowableObjectArray& lineNumberArray =
|
||||
GrowableObjectArray::Handle(GenerateLineNumberArray());
|
||||
Object& value = Object::Handle();
|
||||
intptr_t pos = 0;
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ RawString* Report::PrependSnippet(Kind kind,
|
||||
UNREACHABLE();
|
||||
}
|
||||
String& result = String::Handle();
|
||||
if (!script.IsNull()) {
|
||||
if (!script.IsNull() && !String::Handle(script.Source()).IsNull()) {
|
||||
const String& script_url = String::Handle(script.url());
|
||||
if (token_pos.IsReal()) {
|
||||
intptr_t line, column, token_len;
|
||||
|
||||
Reference in New Issue
Block a user