| Index: runtime/vm/object.cc
|
| ===================================================================
|
| --- runtime/vm/object.cc (revision 40736)
|
| +++ runtime/vm/object.cc (working copy)
|
| @@ -9112,10 +9112,13 @@
|
| // TODO(hausner): we might want to add a script dictionary to the
|
| // library class to make this lookup faster.
|
| RawScript* Library::LookupScript(const String& url) const {
|
| + const intptr_t url_length = url.Length();
|
| + if (url_length == 0) {
|
| + return Script::null();
|
| + }
|
| const Array& scripts = Array::Handle(LoadedScripts());
|
| Script& script = Script::Handle();
|
| String& script_url = String::Handle();
|
| - const intptr_t url_length = url.Length();
|
| const intptr_t num_scripts = scripts.Length();
|
| for (int i = 0; i < num_scripts; i++) {
|
| script ^= scripts.At(i);
|
|
|