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

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

Issue 2755723003: Make sure the signature of the call method is finalized before involving it (Closed)
Patch Set: Created 3 years, 9 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/vm/class_finalizer.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | 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 "platform/assert.h" 9 #include "platform/assert.h"
10 #include "lib/stacktrace.h" 10 #include "lib/stacktrace.h"
(...skipping 5514 matching lines...) Expand 10 before | Expand all | Expand 10 after
5525 AbstractType& type_arg = AbstractType::Handle(); 5525 AbstractType& type_arg = AbstractType::Handle();
5526 for (intptr_t i = 0; i < number_of_type_arguments; i++) { 5526 for (intptr_t i = 0; i < number_of_type_arguments; i++) {
5527 type_arg ^= array.At(i); 5527 type_arg ^= array.At(i);
5528 type_args_obj.SetTypeAt(i, type_arg); 5528 type_args_obj.SetTypeAt(i, type_arg);
5529 } 5529 }
5530 } 5530 }
5531 5531
5532 // Construct the type object, canonicalize it and return. 5532 // Construct the type object, canonicalize it and return.
5533 Type& instantiated_type = 5533 Type& instantiated_type =
5534 Type::Handle(Type::New(cls, type_args_obj, TokenPosition::kNoSource)); 5534 Type::Handle(Type::New(cls, type_args_obj, TokenPosition::kNoSource));
5535 instantiated_type ^= ClassFinalizer::FinalizeType( 5535 instantiated_type ^= ClassFinalizer::FinalizeType(cls, instantiated_type);
5536 cls, instantiated_type, ClassFinalizer::kCanonicalize);
5537 return Api::NewHandle(T, instantiated_type.raw()); 5536 return Api::NewHandle(T, instantiated_type.raw());
5538 } 5537 }
5539 5538
5540 5539
5541 DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library) { 5540 DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library) {
5542 DARTSCOPE(Thread::Current()); 5541 DARTSCOPE(Thread::Current());
5543 const Library& lib = Api::UnwrapLibraryHandle(Z, library); 5542 const Library& lib = Api::UnwrapLibraryHandle(Z, library);
5544 if (lib.IsNull()) { 5543 if (lib.IsNull()) {
5545 RETURN_TYPE_ERROR(Z, library, Library); 5544 RETURN_TYPE_ERROR(Z, library, Library);
5546 } 5545 }
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
6836 } 6835 }
6837 6836
6838 6837
6839 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) { 6838 DART_EXPORT void Dart_DumpNativeStackTrace(void* context) {
6840 #ifndef PRODUCT 6839 #ifndef PRODUCT
6841 Profiler::DumpStackTrace(context); 6840 Profiler::DumpStackTrace(context);
6842 #endif 6841 #endif
6843 } 6842 }
6844 6843
6845 } // namespace dart 6844 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698