Commit 84d8e51d authored by kasperl@chromium.org's avatar kasperl@chromium.org

Change the check for builtin functions to not be based on identity,

which seems shaky in the presence of multiple builtin objects.
Review URL: http://codereview.chromium.org/159583

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2573 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 69a90ee9
......@@ -1301,7 +1301,7 @@ void Debug::HandleStepIn(Handle<JSFunction> function,
// step into was requested.
if (fp == Debug::step_in_fp()) {
// Don't allow step into functions in the native context.
if (function->context()->global() != Top::context()->builtins()) {
if (!function->IsBuiltin()) {
if (function->shared()->code() ==
Builtins::builtin(Builtins::FunctionApply) ||
function->shared()->code() ==
......@@ -1311,8 +1311,7 @@ void Debug::HandleStepIn(Handle<JSFunction> function,
// Builtins::FunctionCall. The receiver of call/apply is the target
// function.
if (!holder.is_null() && holder->IsJSFunction() &&
JSFunction::cast(*holder)->context()->global() !=
Top::context()->builtins()) {
!JSFunction::cast(*holder)->IsBuiltin()) {
Handle<SharedFunctionInfo> shared_info(
JSFunction::cast(*holder)->shared());
Debug::FloodWithOneShot(shared_info);
......
......@@ -2341,6 +2341,11 @@ bool JSFunction::IsBoilerplate() {
}
bool JSFunction::IsBuiltin() {
return context()->global()->IsJSBuiltinsObject();
}
bool JSObject::IsLoaded() {
return !map()->needs_loading();
}
......
......@@ -3175,6 +3175,9 @@ class JSFunction: public JSObject {
// function.
inline bool IsBoilerplate();
// Tells whether this function is builtin.
inline bool IsBuiltin();
// [literals]: Fixed array holding the materialized literals.
//
// If the function contains object, regexp or array literals, the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment