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/v8natives.js b/src/v8natives.js
index 29a24b4..55bc9f8 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -54,6 +54,16 @@
   }
 }
 
+// Emulates JSC by installing functions on a hidden prototype that
+// lies above the current object/prototype.  This lets you override
+// functions on String.prototype etc. and then restore the old function
+// with delete.  See http://code.google.com/p/chromium/issues/detail?id=1717
+function InstallFunctionsOnHiddenPrototype(object, attributes, functions) {
+  var hidden_prototype = new $Object();
+  %SetHiddenPrototype(object, hidden_prototype);
+  InstallFunctions(hidden_prototype, attributes, functions);
+}
+
 
 // ----------------------------------------------------------------------------