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
This commit is contained in:
ager@chromium.org 2009-02-16 13:31:13 +00:00
parent 3e2712e018
commit d81fad1766
3 changed files with 9 additions and 7 deletions

View File

@ -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();

View File

@ -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));

View File

@ -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,