Author: [EMAIL PROTECTED]
Date: Tue Oct 28 06:46:04 2008
New Revision: 624

Modified:
    branches/bleeding_edge/src/factory.cc
    branches/bleeding_edge/src/objects-inl.h

Log:
Change the order of two assignments, to make sure that the script type
field is always initialized to a Smi before we get any GCs.

Review URL: http://codereview.chromium.org/8833

Modified: branches/bleeding_edge/src/factory.cc
==============================================================================
--- branches/bleeding_edge/src/factory.cc       (original)
+++ branches/bleeding_edge/src/factory.cc       Tue Oct 28 06:46:04 2008
@@ -138,8 +138,8 @@
    script->set_name(Heap::undefined_value());
    script->set_line_offset(Smi::FromInt(0));
    script->set_column_offset(Smi::FromInt(0));
-  script->set_wrapper(*Factory::NewProxy(0, TENURED));
    script->set_type(Smi::FromInt(SCRIPT_TYPE_NORMAL));
+  script->set_wrapper(*Factory::NewProxy(0, TENURED));
    return script;
  }


Modified: branches/bleeding_edge/src/objects-inl.h
==============================================================================
--- branches/bleeding_edge/src/objects-inl.h    (original)
+++ branches/bleeding_edge/src/objects-inl.h    Tue Oct 28 06:46:04 2008
@@ -382,7 +382,7 @@
  bool Object::IsGlobalObject() {
    if (!IsHeapObject()) return false;

-  InstanceType type =  HeapObject::cast(this)->map()->instance_type();
+  InstanceType type = HeapObject::cast(this)->map()->instance_type();
    return type == JS_GLOBAL_OBJECT_TYPE ||
           type == JS_BUILTINS_OBJECT_TYPE;
  }

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to