Revision: 5120
Author: [email protected]
Date: Thu Jul 22 06:39:18 2010
Log: Properly propagate failures from helper methods.
Otherwise failures are not reported and callback may fail to setup.
Review URL: http://codereview.chromium.org/3035017
http://code.google.com/p/v8/source/detail?r=5120
Modified:
/branches/bleeding_edge/src/objects.cc
=======================================
--- /branches/bleeding_edge/src/objects.cc Fri Jul 16 03:07:57 2010
+++ /branches/bleeding_edge/src/objects.cc Thu Jul 22 06:39:18 2010
@@ -2966,7 +2966,8 @@
break;
}
- SetElementCallback(index, info, info->property_attributes());
+ Object* ok = SetElementCallback(index, info,
info->property_attributes());
+ if (ok->IsFailure()) return ok;
} else {
// Lookup the name.
LookupResult result;
@@ -2976,7 +2977,8 @@
if (result.IsProperty() && (result.IsReadOnly() ||
result.IsDontDelete())) {
return Heap::undefined_value();
}
- SetPropertyCallback(name, info, info->property_attributes());
+ Object* ok = SetPropertyCallback(name, info,
info->property_attributes());
+ if (ok->IsFailure()) return ok;
}
return this;
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev