Hi all,
When printing a JSFunction instance in a debugger, with
MaybeObject::PrintLn() which eventually calls
JSFunction::JSFunctionPrint(FILE*), it may hit an assertion calling
JSFunction::literal() if the function instance is a bound function.
#
# Fatal error in ../src/objects-inl.h, line 5161
# CHECK(!shared()->bound()) failed
#
Here's a quick patch to fix the problem:
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index 9f1b939..10fe4ef 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -862,8 +862,13 @@ void JSFunction::JSFunctionPrint(FILE* out) {
shared()->name()->Print(out);
PrintF(out, "\n - context = ");
context()->ShortPrint(out);
- PrintF(out, "\n - literals = ");
- literals()->ShortPrint(out);
+ if (!shared()->bound()) {
+ PrintF(out, "\n - literals = ");
+ literals()->ShortPrint(out);
+ } else {
+ PrintF(out, "\n - bindings = ");
+ function_bindings()->ShortPrint(out);
+ }
PrintF(out, "\n - code = ");
code()->ShortPrint(out);
PrintF(out, "\n");
Best regards,
Kris
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.