Fix converting NULL to Failure bugs introduced in r5698.

Review URL: http://codereview.chromium.org/4293002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
vegorov@chromium.org 2010-11-02 11:56:10 +00:00
parent 7f764978ee
commit 8a2f34662d

View File

@ -905,7 +905,7 @@ Register StubCompiler::CheckPrototypes(JSObject* object,
MaybeObject* maybe_lookup_result = Heap::LookupSymbol(name); MaybeObject* maybe_lookup_result = Heap::LookupSymbol(name);
Object* lookup_result = NULL; // Initialization to please compiler. Object* lookup_result = NULL; // Initialization to please compiler.
if (!maybe_lookup_result->ToObject(&lookup_result)) { if (!maybe_lookup_result->ToObject(&lookup_result)) {
set_failure(Failure::cast(lookup_result)); set_failure(Failure::cast(maybe_lookup_result));
return reg; return reg;
} }
name = String::cast(lookup_result); name = String::cast(lookup_result);
@ -1077,7 +1077,7 @@ bool StubCompiler::GenerateLoadCallback(JSObject* object,
Object* result = NULL; // Initialization to please compiler. Object* result = NULL; // Initialization to please compiler.
{ MaybeObject* try_call_result = masm()->TryCallStub(&stub); { MaybeObject* try_call_result = masm()->TryCallStub(&stub);
if (!try_call_result->ToObject(&result)) { if (!try_call_result->ToObject(&result)) {
*failure = Failure::cast(result); *failure = Failure::cast(try_call_result);
return false; return false;
} }
} }