Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 0970d0d92efa5d19986a9d92775eb18f643c88c2..0dd735fcf15375bde17d9d282138bad4beafeb17 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -13480,6 +13480,18 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_FlattenString) { |
} |
+RUNTIME_FUNCTION(MaybeObject*, Runtime_MigrateInstance) { |
+ HandleScope scope(isolate); |
+ ASSERT(args.length() == 1); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
+ if (!object->IsJSObject()) return Smi::FromInt(0); |
+ Handle<JSObject> js_object = Handle<JSObject>::cast(object); |
+ if (!js_object->map()->is_deprecated()) return Smi::FromInt(0); |
+ JSObject::MigrateInstance(js_object); |
+ return *object; |
+} |
+ |
+ |
RUNTIME_FUNCTION(MaybeObject*, Runtime_GetFromCache) { |
SealHandleScope shs(isolate); |
// This is only called from codegen, so checks might be more lax. |