Просмотр исходного кода

LibJS: Remove some unnecessary indirection in Object constructors

Andreas Kling 4 лет назад
Родитель
Сommit
976e55e942
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      Libraries/LibJS/Runtime/Object.cpp

+ 2 - 2
Libraries/LibJS/Runtime/Object.cpp

@@ -90,12 +90,12 @@ Object* Object::create_empty(GlobalObject& global_object)
 Object::Object(GlobalObjectTag)
 {
     // This is the global object
-    m_shape = interpreter().heap().allocate<Shape>(static_cast<GlobalObject&>(*this), static_cast<GlobalObject&>(*this));
+    m_shape = heap().allocate<Shape>(static_cast<GlobalObject&>(*this), static_cast<GlobalObject&>(*this));
 }
 
 Object::Object(ConstructWithoutPrototypeTag, GlobalObject& global_object)
 {
-    m_shape = interpreter().heap().allocate<Shape>(global_object, global_object);
+    m_shape = heap().allocate<Shape>(global_object, global_object);
 }
 
 Object::Object(Object& prototype)