Index: src/bootstrapper.cc |
=================================================================== |
--- src/bootstrapper.cc (revision 5232) |
+++ src/bootstrapper.cc (working copy) |
@@ -470,6 +470,7 @@ |
Handle<Code> code = |
Handle<Code>(Builtins::builtin(Builtins::EmptyFunction)); |
empty_function->set_code(*code); |
+ empty_function->shared()->set_code(*code); |
Handle<String> source = Factory::NewStringFromAscii(CStrVector("() {}")); |
Handle<Script> script = Factory::NewScript(source); |
script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); |
@@ -1545,6 +1546,8 @@ |
Handle<SharedFunctionInfo> shared |
= Handle<SharedFunctionInfo>(function->shared()); |
if (!EnsureCompiled(shared, CLEAR_EXCEPTION)) return false; |
+ // Set the code object on the function object. |
+ function->set_code(function->shared()->code()); |
builtins->set_javascript_builtin_code(id, shared->code()); |
} |
return true; |