Reviewers: rossberg,

Description:
Make builtin functions be skipped in stack traces.

Does include exposed builtin functions ("native functions").


Please review this at http://codereview.chromium.org/8345039/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/runtime.cc


Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 65f6df8c5239777a8bc0fc46ccd575ef2913fbb9..6040ba293a2826116249c3a6783833b6d4ba8411 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -13015,6 +13015,11 @@ static bool ShowFrameInStackTrace(StackFrame* raw_frame,
     return false;
   }
   JSFunction* fun = JSFunction::cast(raw_fun);
+  // A non-native builtin function (the visibly exported builtin
+  // functions are marked as native, the remaining aren't).
+  if (fun->IsBuiltin() && !fun->shared()->native()) {
+    return false;
+  }
   Object* raw_script = fun->shared()->script();
   if (frame->receiver()->IsUndefined() && raw_script->IsScript()) {
     int script_type = Script::cast(raw_script)->type()->value();


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to