Index: runtime/vm/kernel_reader.cc |
diff --git a/runtime/vm/kernel_reader.cc b/runtime/vm/kernel_reader.cc |
index 6c669e4d745470a16444b0acf6f0211d5e6f2fc5..746ed255a101eb335b6ce89a94a7d3f33949ebe1 100644 |
--- a/runtime/vm/kernel_reader.cc |
+++ b/runtime/vm/kernel_reader.cc |
@@ -161,9 +161,9 @@ void KernelReader::ReadLibrary(Library* kernel_library) { |
// Setup toplevel class (which contains library fields/procedures). |
// TODO(27590): Figure out why we need this script stuff here. |
kustermann
2016/11/18 09:45:51
We need a valid [Script] for example because the [
Vyacheslav Egorov (Google)
2016/11/18 14:49:46
Done.
|
- Script& script = Script::Handle( |
- Z, |
- Script::New(H.DartString(""), H.DartString(""), RawScript::kScriptTag)); |
+ Script& script = |
+ Script::Handle(Z, Script::New(Symbols::KernelScriptUri(), |
+ H.DartString(""), RawScript::kScriptTag)); |
rmacnak
2016/11/17 20:13:31
There's a Symbols::Empty() btw.
Vyacheslav Egorov (Google)
2016/11/18 14:49:46
Done.
|
script.SetLocationOffset(0, 0); |
script.Tokenize(H.DartString("nop() {}")); |
dart::Class& toplevel_class = dart::Class::Handle( |
@@ -627,9 +627,9 @@ dart::Class& KernelReader::LookupClass(Class* klass) { |
// detect test functions some other way (like simply not setting the |
// optimizable bit on those functions in the first place). |
TokenPosition pos(0); |
- Script& script = |
- Script::Handle(Z, Script::New(H.DartString(""), H.DartString(""), |
- RawScript::kScriptTag)); |
+ Script& script = Script::Handle( |
+ Z, Script::New(Symbols::KernelScriptUri(), H.DartString(""), |
+ RawScript::kScriptTag)); |
handle = |
&dart::Class::Handle(Z, dart::Class::New(library, name, script, pos)); |
library.AddClass(*handle); |
@@ -637,9 +637,9 @@ dart::Class& KernelReader::LookupClass(Class* klass) { |
// When bootstrapping we can encounter classes that do not yet have a |
// dummy script. |
TokenPosition pos(0); |
- Script& script = |
- Script::Handle(Z, Script::New(H.DartString(""), H.DartString(""), |
- RawScript::kScriptTag)); |
+ Script& script = Script::Handle( |
+ Z, Script::New(Symbols::KernelScriptUri(), H.DartString(""), |
+ RawScript::kScriptTag)); |
handle->set_script(script); |
} |
// Insert the class in the cache before calling ReadPreliminaryClass so |