summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2020-06-04 20:35:23 +0100
committerAndreas Kling <kling@serenityos.org>2020-06-07 19:29:40 +0200
commit9f399f7341ecef5c6a1c2d423c062730a7558213 (patch)
tree301ba6b5de6bbc2de036fc1e50efae41062dd505
parent1d94ca7cfc5527b4b8e789a11adc6d4606c3de8a (diff)
downloadserenity-9f399f7341ecef5c6a1c2d423c062730a7558213.zip
LibJS: Remove reduntant set_prototype() calls
If we're inheriting from Object() we already call its constructor which sets the prototype - no need to do it again.
-rw-r--r--Libraries/LibJS/Runtime/Date.cpp1
-rw-r--r--Libraries/LibJS/Runtime/Error.cpp1
2 files changed, 0 insertions, 2 deletions
diff --git a/Libraries/LibJS/Runtime/Date.cpp b/Libraries/LibJS/Runtime/Date.cpp
index 6b22c98fdf..49ea57cb61 100644
--- a/Libraries/LibJS/Runtime/Date.cpp
+++ b/Libraries/LibJS/Runtime/Date.cpp
@@ -42,7 +42,6 @@ Date::Date(Core::DateTime datetime, u16 milliseconds, Object& prototype)
, m_datetime(datetime)
, m_milliseconds(milliseconds)
{
- set_prototype(&prototype);
}
Date::~Date()
diff --git a/Libraries/LibJS/Runtime/Error.cpp b/Libraries/LibJS/Runtime/Error.cpp
index 1d2b32fd3c..1c6439ab19 100644
--- a/Libraries/LibJS/Runtime/Error.cpp
+++ b/Libraries/LibJS/Runtime/Error.cpp
@@ -41,7 +41,6 @@ Error::Error(const FlyString& name, const String& message, Object& prototype)
, m_name(name)
, m_message(message)
{
- set_prototype(&prototype);
}
Error::~Error()