Commit d81fad17 authored by ager@chromium.org's avatar ager@chromium.org

Fix debugger function that treated retry-after-gc failure as an

exception.

Minor indentation cleanup.
Review URL: http://codereview.chromium.org/20404

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1279 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3e2712e0
......@@ -141,7 +141,7 @@ v8::Handle<v8::Value> Load(const v8::Arguments& args) {
return v8::ThrowException(v8::String::New("Error loading file"));
}
if (!ExecuteString(source, v8::String::New(*file), false, false)) {
return v8::ThrowException(v8::String::New("Error executing file"));
return v8::ThrowException(v8::String::New("Error executing file"));
}
}
return v8::Undefined();
......
......@@ -2997,9 +2997,9 @@ void CodeGenerator::GenerateFastCharCodeAt(ZoneList<Expression*>* args) {
// See the comment in objects.h.
ASSERT(kLongStringTag == 0);
ASSERT(kMediumStringTag + String::kLongLengthShift ==
String::kMediumLengthShift);
String::kMediumLengthShift);
ASSERT(kShortStringTag + String::kLongLengthShift ==
String::kShortLengthShift);
String::kShortLengthShift);
__ mov(ecx, Operand(edi));
__ and_(ecx, kStringSizeMask);
__ add(Operand(ecx), Immediate(String::kLongLengthShift));
......
......@@ -4625,7 +4625,7 @@ static Object* DebugLookupResultValue(Object* receiver, LookupResult* result,
reinterpret_cast<AccessorDescriptor*>(
Proxy::cast(structure)->proxy());
value = (callback->getter)(receiver, callback->data);
if (value->IsFailure()) {
if (value->IsException()) {
value = Top::pending_exception();
Top::clear_pending_exception();
if (caught_exception != NULL) {
......@@ -4705,15 +4705,17 @@ static Object* Runtime_DebugGetPropertyDetails(Arguments args) {
if (result.IsProperty()) {
bool caught_exception = false;
Handle<Object> value(DebugLookupResultValue(*obj, &result,
&caught_exception));
Object* value = DebugLookupResultValue(*obj, &result,
&caught_exception);
if (value->IsFailure()) return value;
Handle<Object> value_handle(value);
// If the callback object is a fixed array then it contains JavaScript
// getter and/or setter.
bool hasJavaScriptAccessors = result.type() == CALLBACKS &&
result.GetCallbackObject()->IsFixedArray();
Handle<FixedArray> details =
Factory::NewFixedArray(hasJavaScriptAccessors ? 5 : 2);
details->set(0, *value);
details->set(0, *value_handle);
details->set(1, result.GetPropertyDetails().AsSmi());
if (hasJavaScriptAccessors) {
details->set(2,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment