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

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

Issue 3004563002: Fixes for issues (Closed)
Patch Set: Created 3 years, 3 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 | « runtime/bin/loader.cc ('k') | 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 5013 matching lines...) Expand 10 before | Expand all | Expand 10 after
5024 if ((source == Api::Null()) || (source == NULL)) { 5024 if ((source == Api::Null()) || (source == NULL)) {
5025 RETURN_NULL_ERROR(source); 5025 RETURN_NULL_ERROR(source);
5026 } 5026 }
5027 void* kernel_pgm = reinterpret_cast<void*>(source); 5027 void* kernel_pgm = reinterpret_cast<void*>(source);
5028 result = LoadKernelProgram(T, resolved_url_str, kernel_pgm); 5028 result = LoadKernelProgram(T, resolved_url_str, kernel_pgm);
5029 if (::Dart_IsError(result)) { 5029 if (::Dart_IsError(result)) {
5030 return result; 5030 return result;
5031 } 5031 }
5032 library ^= Library::LookupLibrary(T, resolved_url_str); 5032 library ^= Library::LookupLibrary(T, resolved_url_str);
5033 if (library.IsNull()) { 5033 if (library.IsNull()) {
5034 // If the URL string does not match, use the library object
5035 // returned by the kernel reader.
aam 2017/08/24 19:20:06 We know that this will happen when we request to l
siva 2017/08/24 23:00:42 The scenarios when this can happen is when resolve
5036 library ^= Api::UnwrapHandle(result);
aam 2017/08/25 21:56:03 Sorry, I didn't realize that `result` here will be
siva 2017/08/25 21:59:47 Good point will fix that.
5037 }
5038 if (library.IsNull()) {
5034 return Api::NewError("%s: Unable to load script '%s' correctly.", 5039 return Api::NewError("%s: Unable to load script '%s' correctly.",
5035 CURRENT_FUNC, resolved_url_str.ToCString()); 5040 CURRENT_FUNC, resolved_url_str.ToCString());
5036 } 5041 }
5037 I->object_store()->set_root_library(library); 5042 I->object_store()->set_root_library(library);
5038 return Api::NewHandle(T, library.raw()); 5043 return Api::NewHandle(T, library.raw());
5039 } 5044 }
5040 #endif 5045 #endif
5041 5046
5042 const String& source_str = Api::UnwrapStringHandle(Z, source); 5047 const String& source_str = Api::UnwrapStringHandle(Z, source);
5043 if (source_str.IsNull()) { 5048 if (source_str.IsNull()) {
(...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after
6699 #endif 6704 #endif
6700 } 6705 }
6701 6706
6702 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { 6707 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) {
6703 #ifndef PRODUCT 6708 #ifndef PRODUCT
6704 Profiler::DumpStackTrace(context); 6709 Profiler::DumpStackTrace(context);
6705 #endif 6710 #endif
6706 } 6711 }
6707 6712
6708 } // namespace dart 6713 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/loader.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698