Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index c235a23439dbc5b44ecd16d3396def081b38b7e4..ec1e2fe2b68afa9ed7b17a6a6faf9193aa7f21cc 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -570,7 +570,7 @@ Handle<JSArray> Isolate::CaptureCurrentStackTrace( |
frame->Summarize(&frames); |
for (int i = frames.length() - 1; i >= 0 && frames_seen < limit; i--) { |
// Create a JSObject to hold the information for the StackFrame. |
- Handle<JSObject> stackFrame = factory()->NewJSObject(object_function()); |
+ Handle<JSObject> stack_frame = factory()->NewJSObject(object_function()); |
Handle<JSFunction> fun = frames[i].function(); |
Handle<Script> script(Script::cast(fun->shared()->script())); |
@@ -591,16 +591,24 @@ Handle<JSArray> Isolate::CaptureCurrentStackTrace( |
// tag. |
column_offset += script->column_offset()->value(); |
} |
- SetLocalPropertyNoThrow(stackFrame, column_key, |
- Handle<Smi>(Smi::FromInt(column_offset + 1))); |
+ CHECK_NOT_EMPTY_HANDLE( |
+ this, |
+ JSObject::SetLocalPropertyIgnoreAttributes( |
+ stack_frame, column_key, |
+ Handle<Smi>(Smi::FromInt(column_offset + 1)), NONE)); |
} |
- SetLocalPropertyNoThrow(stackFrame, line_key, |
- Handle<Smi>(Smi::FromInt(line_number + 1))); |
+ CHECK_NOT_EMPTY_HANDLE( |
+ this, |
+ JSObject::SetLocalPropertyIgnoreAttributes( |
+ stack_frame, line_key, |
+ Handle<Smi>(Smi::FromInt(line_number + 1)), NONE)); |
} |
if (options & StackTrace::kScriptName) { |
Handle<Object> script_name(script->name(), this); |
- SetLocalPropertyNoThrow(stackFrame, script_key, script_name); |
+ CHECK_NOT_EMPTY_HANDLE(this, |
+ JSObject::SetLocalPropertyIgnoreAttributes( |
+ stack_frame, script_key, script_name, NONE)); |
} |
if (options & StackTrace::kScriptNameOrSourceURL) { |
@@ -616,8 +624,10 @@ Handle<JSArray> Isolate::CaptureCurrentStackTrace( |
if (caught_exception) { |
result = factory()->undefined_value(); |
} |
- SetLocalPropertyNoThrow(stackFrame, script_name_or_source_url_key, |
- result); |
+ CHECK_NOT_EMPTY_HANDLE(this, |
+ JSObject::SetLocalPropertyIgnoreAttributes( |
+ stack_frame, script_name_or_source_url_key, |
+ result, NONE)); |
} |
if (options & StackTrace::kFunctionName) { |
@@ -625,23 +635,30 @@ Handle<JSArray> Isolate::CaptureCurrentStackTrace( |
if (fun_name->ToBoolean()->IsFalse()) { |
fun_name = Handle<Object>(fun->shared()->inferred_name(), this); |
} |
- SetLocalPropertyNoThrow(stackFrame, function_key, fun_name); |
+ CHECK_NOT_EMPTY_HANDLE(this, |
+ JSObject::SetLocalPropertyIgnoreAttributes( |
+ stack_frame, function_key, fun_name, NONE)); |
} |
if (options & StackTrace::kIsEval) { |
int type = Smi::cast(script->compilation_type())->value(); |
Handle<Object> is_eval = (type == Script::COMPILATION_TYPE_EVAL) ? |
factory()->true_value() : factory()->false_value(); |
- SetLocalPropertyNoThrow(stackFrame, eval_key, is_eval); |
+ CHECK_NOT_EMPTY_HANDLE(this, |
+ JSObject::SetLocalPropertyIgnoreAttributes( |
+ stack_frame, eval_key, is_eval, NONE)); |
} |
if (options & StackTrace::kIsConstructor) { |
Handle<Object> is_constructor = (frames[i].is_constructor()) ? |
factory()->true_value() : factory()->false_value(); |
- SetLocalPropertyNoThrow(stackFrame, constructor_key, is_constructor); |
+ CHECK_NOT_EMPTY_HANDLE(this, |
+ JSObject::SetLocalPropertyIgnoreAttributes( |
+ stack_frame, constructor_key, |
+ is_constructor, NONE)); |
} |
- FixedArray::cast(stack_trace->elements())->set(frames_seen, *stackFrame); |
+ FixedArray::cast(stack_trace->elements())->set(frames_seen, *stack_frame); |
frames_seen++; |
} |
it.Advance(); |