 -  RecordType(JSTypeRegistry registry, Map<String, RecordProperty> properties) {
 -    this(registry, properties, true);
 -  }
--
+ 
    /**
     * Creates a record type.
-    *
-@@ -84,11 +79,9 @@ class RecordType extends PrototypeObjectType {
+@@ -84,11 +80,9 @@ class RecordType extends PrototypeObjectType {
     * @throws IllegalStateException if the {@code RecordProperty} associated
     *         with a property is null.
     */

 
   /**
    * Adds a property with the given name and type to the record type.
@@ -92,8 +88,7 @@ public class RecordTypeBuilder {
        return registry.getNativeObjectType(JSTypeNative.OBJECT_TYPE);
     }
 
-    return new RecordType(
-        registry, Collections.unmodifiableMap(properties), isDeclared);
+    return registry.createRecordType(Collections.unmodifiableMap(properties));
   }
 
   static class RecordProperty {

   /**
    * Defines a property whose type is inferred.
diff --git a/src/com/google/javascript/rhino/jstype/RecordType.java b/src/com/google/javascript/rhino/jstype/RecordType.java
index 8ff279cb..7cc48901 100755
--- a/src/com/google/javascript/rhino/jstype/RecordType.java
+++ b/src/com/google/javascript/rhino/jstype/RecordType.java
@@ -65,12 +65,8 @@ class RecordType extends PrototypeObjectType {
   private static final long serialVersionUID = 1L;
 
   private final SortedMap<String, JSType> properties = Maps.newTreeMap();
