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

Unified Diff: src/messages.cc

Issue 6451004: Propagate exceptions thrown when setting elements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Better way to communicate back absence of setter 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 | « src/handles.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.cc
diff --git a/src/messages.cc b/src/messages.cc
index 432364919bacd6a9c20b1e1a4b012e2be54e9617..990000a32ea84aa4d605562912afb3440c871354 100644
--- a/src/messages.cc
+++ b/src/messages.cc
@@ -69,10 +69,13 @@ Handle<JSMessageObject> MessageHandler::MakeMessageObject(
Handle<String> stack_trace,
Handle<JSArray> stack_frames) {
Handle<String> type_handle = Factory::LookupAsciiSymbol(type);
- Handle<JSArray> arguments_handle = Factory::NewJSArray(args.length());
+ Handle<FixedArray> arguments_elements =
+ Factory::NewFixedArray(args.length());
for (int i = 0; i < args.length(); i++) {
- SetElement(arguments_handle, i, args[i]);
+ arguments_elements->set(i, *args[i]);
}
+ Handle<JSArray> arguments_handle =
+ Factory::NewJSArrayWithElements(arguments_elements);
int start = 0;
int end = 0;
@@ -87,7 +90,7 @@ Handle<JSMessageObject> MessageHandler::MakeMessageObject(
? Factory::undefined_value()
: Handle<Object>::cast(stack_trace);
- Handle<Object> stack_frames_handle = stack_frames.is_null()
+ Handle<Object> stack_frames_handle = stack_frames.is_null()
? Factory::undefined_value()
: Handle<Object>::cast(stack_frames);
« no previous file with comments | « src/handles.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698