Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index 5f8a04f5d15a96827f660812c5af312cf733e4e8..34493ccca24e89b5b0eb202c152cf45b351e16fb 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -859,7 +859,6 @@ RawError* Object::Init(Isolate* isolate) { |
return error.raw(); |
} |
const Script& math_script = Script::Handle(Bootstrap::LoadMathScript(false)); |
- Library::InitMathLibrary(isolate); |
const Library& math_lib = Library::Handle(Library::MathLibrary()); |
ASSERT(!math_lib.IsNull()); |
error = Bootstrap::Compile(math_lib, math_script); |
@@ -6179,6 +6178,10 @@ void Library::InitCoreLibrary(Isolate* isolate) { |
core_impl_lib.Register(); |
core_lib.AddImport(core_impl_lib); |
core_impl_lib.AddImport(core_lib); |
+ Library::InitMathLibrary(isolate); |
+ const Library& math_lib = Library::Handle(Library::MathLibrary()); |
+ core_lib.AddImport(math_lib); |
+ core_impl_lib.AddImport(math_lib); |
isolate->object_store()->set_root_library(Library::Handle()); |
// Hook up predefined classes without setting their library pointers. These |