Merge revisions 1412 and 1416 from bleeding_edge to trunk
forming V8 version 1.0.3.2. Fixes issue 253 and issue 246.
Review URL: http://codereview.chromium.org/39128
git-svn-id: http://v8.googlecode.com/svn/trunk@1417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/runtime.cc b/src/runtime.cc
index 5f74d72..19f3620 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -2164,16 +2164,22 @@
static Object* Runtime_ToFastProperties(Arguments args) {
ASSERT(args.length() == 1);
- CONVERT_ARG_CHECKED(JSObject, object, 0);
- object->TransformToFastProperties(0);
+ Handle<Object> object = args.at<Object>(0);
+ if (object->IsJSObject()) {
+ Handle<JSObject> js_object = Handle<JSObject>::cast(object);
+ js_object->TransformToFastProperties(0);
+ }
return *object;
}
static Object* Runtime_ToSlowProperties(Arguments args) {
ASSERT(args.length() == 1);
- CONVERT_ARG_CHECKED(JSObject, object, 0);
- object->NormalizeProperties(CLEAR_INOBJECT_PROPERTIES);
+ Handle<Object> object = args.at<Object>(0);
+ if (object->IsJSObject()) {
+ Handle<JSObject> js_object = Handle<JSObject>::cast(object);
+ js_object->NormalizeProperties(CLEAR_INOBJECT_PROPERTIES);
+ }
return *object;
}