Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index af8695abcf43b802c1adeeeed8abc8553a5c65a3..7df5a6b01e7491eef4ba9b1a5f0ae07b85336d6f 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -858,7 +858,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); |
@@ -6186,6 +6185,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 |