Author: [email protected]
Date: Mon Jul 13 02:17:04 2009
New Revision: 2432
Modified:
branches/bleeding_edge/src/api.h
branches/bleeding_edge/src/ia32/codegen-ia32.cc
Log:
Add support for tracking down leak of the hole value.
Review URL: http://codereview.chromium.org/149522
Modified: branches/bleeding_edge/src/api.h
==============================================================================
--- branches/bleeding_edge/src/api.h (original)
+++ branches/bleeding_edge/src/api.h Mon Jul 13 02:17:04 2009
@@ -244,9 +244,10 @@
// 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)
{ \
- 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)
Modified: branches/bleeding_edge/src/ia32/codegen-ia32.cc
==============================================================================
--- branches/bleeding_edge/src/ia32/codegen-ia32.cc (original)
+++ branches/bleeding_edge/src/ia32/codegen-ia32.cc Mon Jul 13 02:17:04 2009
@@ -7591,6 +7591,16 @@
__ 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.
Label failure_returned;
ASSERT(((kFailureTag + 1) & kFailureTagMask) == 0);
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---