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

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

Issue 3009663002: Address code review comment from previous commit. (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 | « 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 4960 matching lines...) Expand 10 before | Expand all | Expand 10 after
4971 #if !defined(DART_PRECOMPILED_RUNTIME) 4971 #if !defined(DART_PRECOMPILED_RUNTIME)
4972 static Dart_Handle LoadKernelProgram(Thread* T, 4972 static Dart_Handle LoadKernelProgram(Thread* T,
4973 const String& url, 4973 const String& url,
4974 void* kernel) { 4974 void* kernel) {
4975 // NOTE: Now the VM owns the [kernel_program] memory! 4975 // NOTE: Now the VM owns the [kernel_program] memory!
4976 // We will promptly delete it when done. 4976 // We will promptly delete it when done.
4977 kernel::Program* program = reinterpret_cast<kernel::Program*>(kernel); 4977 kernel::Program* program = reinterpret_cast<kernel::Program*>(kernel);
4978 kernel::KernelReader reader(program); 4978 kernel::KernelReader reader(program);
4979 const Object& tmp = reader.ReadProgram(); 4979 const Object& tmp = reader.ReadProgram();
4980 delete program; 4980 delete program;
4981 4981 return Api::NewHandle(T, tmp.raw());
4982 if (tmp.IsError()) {
4983 return Api::NewHandle(T, tmp.raw());
4984 }
4985 return Dart_Null();
4986 } 4982 }
4987 #endif 4983 #endif
4988 4984
4989 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url, 4985 DART_EXPORT Dart_Handle Dart_LoadScript(Dart_Handle url,
4990 Dart_Handle resolved_url, 4986 Dart_Handle resolved_url,
4991 Dart_Handle source, 4987 Dart_Handle source,
4992 intptr_t line_offset, 4988 intptr_t line_offset,
4993 intptr_t column_offset) { 4989 intptr_t column_offset) {
4994 API_TIMELINE_DURATION; 4990 API_TIMELINE_DURATION;
4995 DARTSCOPE(Thread::Current()); 4991 DARTSCOPE(Thread::Current());
(...skipping 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after
6751 #endif 6747 #endif
6752 } 6748 }
6753 6749
6754 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { 6750 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) {
6755 #ifndef PRODUCT 6751 #ifndef PRODUCT
6756 Profiler::DumpStackTrace(context); 6752 Profiler::DumpStackTrace(context);
6757 #endif 6753 #endif
6758 } 6754 }
6759 6755
6760 } // namespace dart 6756 } // 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