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

Unified Diff: src/runtime.cc

Issue 6463001: Use GC-safe version when setting elements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | test/mjsunit/regress/regress-1125.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index e8e73552055f9ef2bed114803c2c371043aa7186..09115e0ee625c9bc1863563231660ce3a22c9ab5 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -7395,8 +7395,9 @@ static MaybeObject* Runtime_StoreContextSlot(Arguments args) {
}
} else {
ASSERT((attributes & READ_ONLY) == 0);
- Handle<JSObject>::cast(holder)->SetElement(index, *value)->
- ToObjectUnchecked();
+ Handle<Object> result =
+ SetElement(Handle<JSObject>::cast(holder), index, value);
+ if (result.is_null()) return Failure::Exception();
}
return *value;
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-1125.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698