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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 2997243002: Move all the isolate reload code under !defined(DART_PRECOMPILED_RUNTIME) (Closed)
Patch Set: Address code review comments. Created 3 years, 4 months 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/isolate.h » ('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 9b83543416b0533da26a5c3cd31e2d014e90c0b1..977e77d5290261bd2236738f77efc8a50067f7b8 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -5788,7 +5788,7 @@ DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer) {
// --- Dart Front-End (Kernel) support ---
DART_EXPORT bool Dart_IsKernelIsolate(Dart_Isolate isolate) {
-#ifdef DART_PRECOMPILED_RUNTIME
+#if defined(DART_PRECOMPILED_RUNTIME)
return false;
#else
Isolate* iso = reinterpret_cast<Isolate*>(isolate);
@@ -5797,7 +5797,7 @@ DART_EXPORT bool Dart_IsKernelIsolate(Dart_Isolate isolate) {
}
DART_EXPORT bool Dart_KernelIsolateIsRunning() {
-#ifdef DART_PRECOMPILED_RUNTIME
+#if defined(DART_PRECOMPILED_RUNTIME)
return false;
#else
return KernelIsolate::IsRunning();
@@ -5805,7 +5805,7 @@ DART_EXPORT bool Dart_KernelIsolateIsRunning() {
}
DART_EXPORT Dart_Port Dart_KernelPort() {
-#ifdef DART_PRECOMPILED_RUNTIME
+#if defined(DART_PRECOMPILED_RUNTIME)
return false;
#else
return KernelIsolate::KernelPort();
@@ -5814,7 +5814,7 @@ DART_EXPORT Dart_Port Dart_KernelPort() {
DART_EXPORT Dart_KernelCompilationResult
Dart_CompileToKernel(const char* script_uri, const char* platform_kernel) {
-#ifdef DART_PRECOMPILED_RUNTIME
+#if defined(DART_PRECOMPILED_RUNTIME)
Dart_KernelCompilationResult result;
result.status = Dart_KernelCompilationStatus_Unknown;
result.error = strdup("Dart_CompileToKernel is unsupported.");
@@ -5830,7 +5830,7 @@ Dart_CompileSourcesToKernel(const char* script_uri,
int source_files_count,
Dart_SourceFile sources[],
bool incremental_compile) {
-#ifdef DART_PRECOMPILED_RUNTIME
+#if defined(DART_PRECOMPILED_RUNTIME)
Dart_KernelCompilationResult result;
result.status = Dart_KernelCompilationStatus_Unknown;
result.error = strdup("Dart_CompileSourcesToKernel is unsupported.");
@@ -6015,6 +6015,7 @@ Dart_SetFileModifiedCallback(Dart_FileModifiedCallback file_modified_callback) {
if (!FLAG_support_service) {
return Api::Success();
}
+#if !defined(DART_PRECOMPILED_RUNTIME)
if (file_modified_callback != NULL) {
if (IsolateReloadContext::file_modified_callback() != NULL) {
return Api::NewError(
@@ -6030,6 +6031,7 @@ Dart_SetFileModifiedCallback(Dart_FileModifiedCallback file_modified_callback) {
}
}
IsolateReloadContext::SetFileModifiedCallback(file_modified_callback);
+#endif // !defined(DART_PRECOMPILED_RUNTIME)
return Api::Success();
}
« no previous file with comments | « no previous file | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698