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

Unified Diff: src/d8.cc

Issue 11791052: Fix missing exception check in typed array constructor (2). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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-crbug-168545.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index 83e2fc50d5d43db6290b9e7808313d6806ebe97a..8ca475a5c8ab649ec6a15e517ca14a823dcaabbd 100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -561,7 +561,11 @@ Handle<Value> Shell::CreateExternalArray(const Arguments& args,
if (init_from_array) {
Handle<Object> init = args[0]->ToObject();
- for (int i = 0; i < length; ++i) array->Set(i, init->Get(i));
+ for (int i = 0; i < length; ++i) {
+ Local<Value> value = init->Get(i);
+ if (try_catch.HasCaught()) return try_catch.ReThrow();
+ array->Set(i, value);
+ }
}
return array;
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-168545.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698