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

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 2983943002: Fix windows build errors. (Closed)
Patch Set: Created 3 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "lib/stacktrace.h" 9 #include "lib/stacktrace.h"
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 5099 matching lines...) Expand 10 before | Expand all | Expand 10 after
5110 CHECK_COMPILATION_ALLOWED(I); 5110 CHECK_COMPILATION_ALLOWED(I);
5111 5111
5112 Dart_Handle result; 5112 Dart_Handle result;
5113 #if !defined(DART_PRECOMPILED_RUNTIME) 5113 #if !defined(DART_PRECOMPILED_RUNTIME)
5114 if (FLAG_use_dart_frontend && !KernelIsolate::IsKernelIsolate(I)) { 5114 if (FLAG_use_dart_frontend && !KernelIsolate::IsKernelIsolate(I)) {
5115 if ((source == Api::Null()) || (source == NULL)) { 5115 if ((source == Api::Null()) || (source == NULL)) {
5116 RETURN_NULL_ERROR(source); 5116 RETURN_NULL_ERROR(source);
5117 } 5117 }
5118 void* kernel_pgm = reinterpret_cast<void*>(source); 5118 void* kernel_pgm = reinterpret_cast<void*>(source);
5119 result = LoadKernelProgram(T, resolved_url_str, kernel_pgm); 5119 result = LoadKernelProgram(T, resolved_url_str, kernel_pgm);
5120 if (Dart_IsError(result)) { 5120 if (::Dart_IsError(result)) {
5121 return result; 5121 return result;
5122 } 5122 }
5123 library ^= Library::LookupLibrary(T, resolved_url_str); 5123 library ^= Library::LookupLibrary(T, resolved_url_str);
5124 if (library.IsNull()) { 5124 if (library.IsNull()) {
5125 return Api::NewError("%s: Unable to load script '%s' correctly.", 5125 return Api::NewError("%s: Unable to load script '%s' correctly.",
5126 CURRENT_FUNC, resolved_url_str.ToCString()); 5126 CURRENT_FUNC, resolved_url_str.ToCString());
5127 } 5127 }
5128 I->object_store()->set_root_library(library); 5128 I->object_store()->set_root_library(library);
5129 return Api::NewHandle(T, library.raw()); 5129 return Api::NewHandle(T, library.raw());
5130 } 5130 }
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
5463 if (url_str.IsNull()) { 5463 if (url_str.IsNull()) {
5464 RETURN_TYPE_ERROR(Z, url, String); 5464 RETURN_TYPE_ERROR(Z, url, String);
5465 } 5465 }
5466 Dart_Handle result; 5466 Dart_Handle result;
5467 #if !defined(DART_PRECOMPILED_RUNTIME) 5467 #if !defined(DART_PRECOMPILED_RUNTIME)
5468 // Kernel isolate is loaded from script in case of dart_bootstrap 5468 // Kernel isolate is loaded from script in case of dart_bootstrap
5469 // even when FLAG_use_dart_frontend is true. Hence, do not interpret 5469 // even when FLAG_use_dart_frontend is true. Hence, do not interpret
5470 // |source| as a kernel if the current isolate is the kernel isolate. 5470 // |source| as a kernel if the current isolate is the kernel isolate.
5471 if (FLAG_use_dart_frontend && !KernelIsolate::IsKernelIsolate(I)) { 5471 if (FLAG_use_dart_frontend && !KernelIsolate::IsKernelIsolate(I)) {
5472 result = LoadKernelProgram(T, url_str, reinterpret_cast<void*>(source)); 5472 result = LoadKernelProgram(T, url_str, reinterpret_cast<void*>(source));
5473 if (Dart_IsError(result)) { 5473 if (::Dart_IsError(result)) {
5474 return result; 5474 return result;
5475 } 5475 }
5476 return Api::NewHandle(T, Library::LookupLibrary(T, url_str)); 5476 return Api::NewHandle(T, Library::LookupLibrary(T, url_str));
5477 } 5477 }
5478 #endif 5478 #endif
5479 if (::Dart_IsNull(resolved_url)) { 5479 if (::Dart_IsNull(resolved_url)) {
5480 resolved_url = url; 5480 resolved_url = url;
5481 } 5481 }
5482 const String& resolved_url_str = Api::UnwrapStringHandle(Z, resolved_url); 5482 const String& resolved_url_str = Api::UnwrapStringHandle(Z, resolved_url);
5483 if (resolved_url_str.IsNull()) { 5483 if (resolved_url_str.IsNull()) {
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after
6746 #endif 6746 #endif
6747 } 6747 }
6748 6748
6749 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { 6749 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) {
6750 #ifndef PRODUCT 6750 #ifndef PRODUCT
6751 Profiler::DumpStackTrace(context); 6751 Profiler::DumpStackTrace(context);
6752 #endif 6752 #endif
6753 } 6753 }
6754 6754
6755 } // namespace dart 6755 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698