Reduced code size by using shorter instruction encoding when possible.

Added a --help option to the shell sample and to the d8 shell.

Added visual studio project files for building the ARM simulator.

Fixed a number of ARM simulator issues.

Fixed bug in out-of-memory handling on ARM.

Implemented shell support for passing arguments to a script from the command line.

Fixed bug in date code that made certain date functions return -0 instead of 0 for dates before the epoch.

Restricted applications of eval so it can only be used in the context of the associated global object.

Treat byte-order marks as whitespace characters.


git-svn-id: http://v8.googlecode.com/svn/trunk@768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/global-handles.cc b/src/global-handles.cc
index bb36e35..29ad86e 100644
--- a/src/global-handles.cc
+++ b/src/global-handles.cc
@@ -96,6 +96,7 @@
   // Make this handle weak.
   void MakeWeak(void* parameter, WeakReferenceCallback callback) {
     LOG(HandleEvent("GlobalHandle::MakeWeak", handle().location()));
+    ASSERT(state_ != DESTROYED);
     if (state_ != WEAK && !IsNearDeath()) {
       GlobalHandles::number_of_weak_handles_++;
       if (object_->IsJSGlobalObject()) {
@@ -109,6 +110,7 @@
 
   void ClearWeakness() {
     LOG(HandleEvent("GlobalHandle::ClearWeakness", handle().location()));
+    ASSERT(state_ != DESTROYED);
     if (state_ == WEAK || IsNearDeath()) {
       GlobalHandles::number_of_weak_handles_--;
       if (object_->IsJSGlobalObject()) {