Add support for tracking down leak of the hole value.
Review URL: http://codereview.chromium.org/149522 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
e0c01db960
commit
55a8088bd8
@ -244,9 +244,10 @@ v8::internal::Handle<T> v8::internal::Handle<T>::EscapeFrom(
|
|||||||
|
|
||||||
// Implementations of ToLocal
|
// Implementations of ToLocal
|
||||||
|
|
||||||
#define MAKE_TO_LOCAL(Name, From, To) \
|
#define MAKE_TO_LOCAL(Name, From, To) \
|
||||||
Local<v8::To> Utils::Name(v8::internal::Handle<v8::internal::From> obj) { \
|
Local<v8::To> Utils::Name(v8::internal::Handle<v8::internal::From> obj) { \
|
||||||
return Local<To>(reinterpret_cast<To*>(obj.location())); \
|
ASSERT(!obj->IsTheHole()); \
|
||||||
|
return Local<To>(reinterpret_cast<To*>(obj.location())); \
|
||||||
}
|
}
|
||||||
|
|
||||||
MAKE_TO_LOCAL(ToLocal, Context, Context)
|
MAKE_TO_LOCAL(ToLocal, Context, Context)
|
||||||
|
@ -7591,6 +7591,16 @@ void CEntryStub::GenerateCore(MacroAssembler* masm,
|
|||||||
__ dec(Operand::StaticVariable(scope_depth));
|
__ dec(Operand::StaticVariable(scope_depth));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure we're not trying to return 'the hole' from the runtime
|
||||||
|
// call as this may lead to crashes in the IC code later.
|
||||||
|
if (FLAG_debug_code) {
|
||||||
|
Label okay;
|
||||||
|
__ cmp(eax, Factory::the_hole_value());
|
||||||
|
__ j(not_equal, &okay);
|
||||||
|
__ int3();
|
||||||
|
__ bind(&okay);
|
||||||
|
}
|
||||||
|
|
||||||
// Check for failure result.
|
// Check for failure result.
|
||||||
Label failure_returned;
|
Label failure_returned;
|
||||||
ASSERT(((kFailureTag + 1) & kFailureTagMask) == 0);
|
ASSERT(((kFailureTag + 1) & kFailureTagMask) == 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user