Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1493433002: Precompilation: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index ddc4591ec468d102924b7dc67f332e7a5ef73884..3e0a40c479edb15a2ecedd1bb007651c1e8edc3d 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -3613,11 +3613,6 @@ DART_EXPORT Dart_Handle Dart_New(Dart_Handle type,
CURRENT_FUNC);
}
Class& cls = Class::Handle(Z, type_obj.type_class());
-#if defined(DEBUG)
- if (!cls.is_allocated() && Dart::IsRunningPrecompiledCode()) {
- return Api::NewError("Precompilation dropped '%s'", cls.ToCString());
- }
-#endif
TypeArguments& type_arguments =
TypeArguments::Handle(Z, type_obj.arguments());
@@ -3677,6 +3672,11 @@ DART_EXPORT Dart_Handle Dart_New(Dart_Handle type,
cls = type_obj.type_class();
}
if (constructor.IsGenerativeConstructor()) {
+#if defined(DEBUG)
+ if (!cls.is_allocated() && Dart::IsRunningPrecompiledCode()) {
+ return Api::NewError("Precompilation dropped '%s'", cls.ToCString());
+ }
+#endif
// Create the new object.
new_object = Instance::New(cls);
}
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698