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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 180153009: Fix dartium crasher, use DARTSCOPE when getting/setting native fields as it creates a Handle. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
===================================================================
--- runtime/vm/dart_api_impl.cc (revision 33146)
+++ runtime/vm/dart_api_impl.cc (working copy)
@@ -546,7 +546,7 @@
DART_EXPORT bool Dart_IdentityEquals(Dart_Handle obj1, Dart_Handle obj2) {
Isolate* isolate = Isolate::Current();
- CHECK_ISOLATE(isolate);
+ DARTSCOPE(isolate);
{
NoGCScope ngc;
if (Api::UnwrapHandle(obj1) == Api::UnwrapHandle(obj2)) {
@@ -3788,8 +3788,7 @@
if (instance.IsNull()) {
RETURN_TYPE_ERROR(isolate, obj, Instance);
}
- const Class& cls = Class::Handle(isolate, instance.clazz());
- *count = cls.num_native_fields();
+ *count = instance.NumNativeFields();
return Api::Success();
}
@@ -3798,7 +3797,7 @@
int index,
intptr_t* value) {
Isolate* isolate = Isolate::Current();
- CHECK_ISOLATE(isolate);
+ DARTSCOPE(isolate);
ReusableObjectHandleScope reused_obj_handle(isolate);
const Instance& instance = Api::UnwrapInstanceHandle(reused_obj_handle, obj);
if (instance.IsNull()) {
@@ -3818,7 +3817,7 @@
int index,
intptr_t value) {
Isolate* isolate = Isolate::Current();
- CHECK_ISOLATE(isolate);
+ DARTSCOPE(isolate);
ReusableObjectHandleScope reused_obj_handle(isolate);
const Instance& instance = Api::UnwrapInstanceHandle(reused_obj_handle, obj);
if (instance.IsNull()) {
« 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