From 747e20c449509be326aa949562d0280ea00ae0f2 Mon Sep 17 00:00:00 2001 From: "sgjesse@chromium.org" Date: Mon, 9 Mar 2009 08:44:59 +0000 Subject: [PATCH] Mark the empty script object, the script for the empty function and the D8 utility script as native scripts. This is mainly to avoid these scripts showing up in the debugger when showing normal scripts. Removed the check for the empty script in the debugger function returning loaded scripts as this check only filtered out the empty script from the debugger context and not empty scripts in all other contexts. Also this filter did not take the script for the empty function into account. Review URL: http://codereview.chromium.org/39322 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/bootstrapper.cc | 8 +++++--- src/d8.cc | 10 +++++++++- src/runtime.cc | 6 +----- test/mjsunit/debug-script.js | 2 +- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc index 585d034b24..f59f081924 100644 --- a/src/bootstrapper.cc +++ b/src/bootstrapper.cc @@ -518,10 +518,11 @@ void Genesis::CreateRoots(v8::Handle global_template, { // --- E m p t y --- Handle code = Handle(Builtins::builtin(Builtins::EmptyFunction)); - Handle source = Factory::NewStringFromAscii(CStrVector("() {}")); - empty_function->set_code(*code); - empty_function->shared()->set_script(*Factory::NewScript(source)); + Handle source = Factory::NewStringFromAscii(CStrVector("() {}")); + Handle