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

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

Issue 18737004: List class was not initialized properly (it has type parameters). Do not preinitialize it incorrect… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.h » ('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 "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 if (strncmp(func, "dart::", 6) == 0) { 48 if (strncmp(func, "dart::", 6) == 0) {
49 return func + 6; 49 return func + 6;
50 } else { 50 } else {
51 return func; 51 return func;
52 } 52 }
53 } 53 }
54 54
55 55
56 static RawInstance* GetListInstance(Isolate* isolate, const Object& obj) { 56 static RawInstance* GetListInstance(Isolate* isolate, const Object& obj) {
57 if (obj.IsInstance()) { 57 if (obj.IsInstance()) {
58 const Library& core_lib = Library::Handle(Library::CoreLibrary());
59 const Class& list_class =
60 Class::Handle(core_lib.LookupClass(Symbols::List()));
61 ASSERT(!list_class.IsNull());
58 const Instance& instance = Instance::Cast(obj); 62 const Instance& instance = Instance::Cast(obj);
59 const Class& obj_class = Class::Handle(isolate, obj.clazz()); 63 const Class& obj_class = Class::Handle(isolate, obj.clazz());
60 const Class& list_class =
61 Class::Handle(isolate, isolate->object_store()->list_class());
62 Error& malformed_type_error = Error::Handle(isolate); 64 Error& malformed_type_error = Error::Handle(isolate);
63 if (obj_class.IsSubtypeOf(TypeArguments::Handle(isolate), 65 if (obj_class.IsSubtypeOf(TypeArguments::Handle(isolate),
64 list_class, 66 list_class,
65 TypeArguments::Handle(isolate), 67 TypeArguments::Handle(isolate),
66 &malformed_type_error)) { 68 &malformed_type_error)) {
67 ASSERT(malformed_type_error.IsNull()); // Type is a raw List. 69 ASSERT(malformed_type_error.IsNull()); // Type is a raw List.
68 return instance.raw(); 70 return instance.raw();
69 } 71 }
70 } 72 }
71 return Instance::null(); 73 return Instance::null();
(...skipping 3921 matching lines...) Expand 10 before | Expand all | Expand 10 after
3993 } 3995 }
3994 { 3996 {
3995 NoGCScope no_gc; 3997 NoGCScope no_gc;
3996 RawObject* raw_obj = obj.raw(); 3998 RawObject* raw_obj = obj.raw();
3997 isolate->heap()->SetPeer(raw_obj, peer); 3999 isolate->heap()->SetPeer(raw_obj, peer);
3998 } 4000 }
3999 return Api::Success(); 4001 return Api::Success();
4000 } 4002 }
4001 4003
4002 } // namespace dart 4004 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698