Push version 1.2.3 to trunk.
Fixed bug in reporting of out-of-memory situations.
Introduced hidden prototypes on certain builtin prototype objects such as String.prototype to emulate JSC's behavior of restoring the original function when deleting functions from those prototype objects.
Fixed crash bug in the register allocator.
git-svn-id: http://v8.googlecode.com/svn/trunk@1909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/factory.cc b/src/factory.cc
index c6b1d17..4b0b7f5 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -167,6 +167,7 @@
Heap::SetLastScriptId(Smi::FromInt(id));
// Create and initialize script object.
+ Handle<Proxy> wrapper = Factory::NewProxy(0, TENURED);
Handle<Script> script = Handle<Script>::cast(NewStruct(SCRIPT_TYPE));
script->set_source(*source);
script->set_name(Heap::undefined_value());
@@ -174,8 +175,9 @@
script->set_line_offset(Smi::FromInt(0));
script->set_column_offset(Smi::FromInt(0));
script->set_data(Heap::undefined_value());
+ script->set_context_data(Heap::undefined_value());
script->set_type(Smi::FromInt(SCRIPT_TYPE_NORMAL));
- script->set_wrapper(*Factory::NewProxy(0, TENURED));
+ script->set_wrapper(*wrapper);
script->set_line_ends(Heap::undefined_value());
return script;