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

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()));
siva 2013/07/11 00:21:58 ASSERT(!list_class.IsNull());
srdjan 2013/07/11 17:05:44 Done.
58 const Instance& instance = Instance::Cast(obj); 61 const Instance& instance = Instance::Cast(obj);
59 const Class& obj_class = Class::Handle(isolate, obj.clazz()); 62 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); 63 Error& malformed_type_error = Error::Handle(isolate);
63 if (obj_class.IsSubtypeOf(TypeArguments::Handle(isolate), 64 if (obj_class.IsSubtypeOf(TypeArguments::Handle(isolate),
64 list_class, 65 list_class,
65 TypeArguments::Handle(isolate), 66 TypeArguments::Handle(isolate),
66 &malformed_type_error)) { 67 &malformed_type_error)) {
67 ASSERT(malformed_type_error.IsNull()); // Type is a raw List. 68 ASSERT(malformed_type_error.IsNull()); // Type is a raw List.
68 return instance.raw(); 69 return instance.raw();
69 } 70 }
70 } 71 }
71 return Instance::null(); 72 return Instance::null();
(...skipping 3921 matching lines...) Expand 10 before | Expand all | Expand 10 after
3993 } 3994 }
3994 { 3995 {
3995 NoGCScope no_gc; 3996 NoGCScope no_gc;
3996 RawObject* raw_obj = obj.raw(); 3997 RawObject* raw_obj = obj.raw();
3997 isolate->heap()->SetPeer(raw_obj, peer); 3998 isolate->heap()->SetPeer(raw_obj, peer);
3998 } 3999 }
3999 return Api::Success(); 4000 return Api::Success();
4000 } 4001 }
4001 4002
4002 } // namespace dart 4003 } // 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