summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/runtime/ConstructData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/runtime/ConstructData.cpp')
-rw-r--r--JavaScriptCore/runtime/ConstructData.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/JavaScriptCore/runtime/ConstructData.cpp b/JavaScriptCore/runtime/ConstructData.cpp
index 7ee59d7..5da2a91 100644
--- a/JavaScriptCore/runtime/ConstructData.cpp
+++ b/JavaScriptCore/runtime/ConstructData.cpp
@@ -26,17 +26,17 @@
#include "config.h"
#include "ConstructData.h"
+#include "Executable.h"
+#include "Interpreter.h"
#include "JSFunction.h"
+#include "JSGlobalObject.h"
namespace JSC {
-JSObject* construct(ExecState* exec, JSValue object, ConstructType constructType, const ConstructData& constructData, const ArgList& args)
+JSObject* construct(ExecState* exec, JSValue constructorObject, ConstructType constructType, const ConstructData& constructData, const ArgList& args)
{
- if (constructType == ConstructTypeHost)
- return constructData.native.function(exec, asObject(object), args);
- ASSERT(constructType == ConstructTypeJS);
- // FIXME: Can this be done more efficiently using the constructData?
- return asFunction(object)->construct(exec, args);
+ ASSERT(constructType == ConstructTypeJS || constructType == ConstructTypeHost);
+ return exec->interpreter()->executeConstruct(exec, asObject(constructorObject), constructType, constructData, args);
}
} // namespace JSC