NativeError.prototype objects have [[Class]] of "Object" but should be "Error"
[WebKit-https.git] / Source / JavaScriptCore / runtime / NativeErrorPrototype.cpp
index 1490720b3d4f3aaea00b3302922fc728625d5981..6830660127af32be0fb2878e409ecd482d9d281b 100644 (file)
@@ -21,7 +21,6 @@
 #include "config.h"
 #include "NativeErrorPrototype.h"
 
-#include "ErrorPrototype.h"
 #include "JSGlobalObject.h"
 #include "JSString.h"
 #include "NativeErrorConstructor.h"
@@ -32,7 +31,7 @@ namespace JSC {
 ASSERT_CLASS_FITS_IN_CELL(NativeErrorPrototype);
 
 NativeErrorPrototype::NativeErrorPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const UString& nameAndMessage, NativeErrorConstructor* constructor)
-    : JSObjectWithGlobalObject(globalObject, structure)
+    : ErrorPrototype(exec, globalObject, structure)
 {
     putDirect(exec->globalData(), exec->propertyNames().name, jsString(exec, nameAndMessage), DontEnum);
     putDirect(exec->globalData(), exec->propertyNames().message, jsString(exec, nameAndMessage), DontEnum);