Update v8 to bleeding_edge revision 3784
diff --git a/src/frames.cc b/src/frames.cc
index 2f90a31..e56a2c8 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -176,7 +176,7 @@
StackTraceFrameIterator::StackTraceFrameIterator() {
- if (!done() && !frame()->function()->IsJSFunction()) Advance();
+ if (!done() && !IsValidFrame()) Advance();
}
@@ -184,10 +184,18 @@
while (true) {
JavaScriptFrameIterator::Advance();
if (done()) return;
- if (frame()->function()->IsJSFunction()) return;
+ if (IsValidFrame()) return;
}
}
+bool StackTraceFrameIterator::IsValidFrame() {
+ if (!frame()->function()->IsJSFunction()) return false;
+ Object* script = JSFunction::cast(frame()->function())->shared()->script();
+ // Don't show functions from native scripts to user.
+ return (script->IsScript() &&
+ Script::TYPE_NATIVE != Script::cast(script)->type()->value());
+}
+
// -------------------------------------------------------------------------
@@ -402,7 +410,7 @@
Code* ExitFrame::code() const {
Object* code = code_slot();
if (code->IsSmi()) {
- return Heap::c_entry_debug_break_code();
+ return Heap::debugger_statement_code();
} else {
return Code::cast(code);
}