summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/ExceptionHelpers.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-04-10 09:28:39 +0000
commit32761a6cee1d0dee366b885b7b9c777e67885688 (patch)
treed6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/runtime/ExceptionHelpers.h
parenta4e969f4965059196ca948db781e52f7cfebf19e (diff)
downloadWebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/runtime/ExceptionHelpers.h')
-rw-r--r--Source/JavaScriptCore/runtime/ExceptionHelpers.h44
1 files changed, 20 insertions, 24 deletions
diff --git a/Source/JavaScriptCore/runtime/ExceptionHelpers.h b/Source/JavaScriptCore/runtime/ExceptionHelpers.h
index 54c5d7096..0c3fcf2d5 100644
--- a/Source/JavaScriptCore/runtime/ExceptionHelpers.h
+++ b/Source/JavaScriptCore/runtime/ExceptionHelpers.h
@@ -10,7 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
@@ -29,38 +29,43 @@
#ifndef ExceptionHelpers_h
#define ExceptionHelpers_h
-#include "ErrorInstance.h"
#include "JSObject.h"
namespace JSC {
-typedef JSObject* (*ErrorFactory)(ExecState*, const String&, ErrorInstance::SourceAppender);
+typedef JSObject* (*ErrorFactory)(ExecState*, const String&);
JSObject* createTerminatedExecutionException(VM*);
-JS_EXPORT_PRIVATE bool isTerminatedExecutionException(Exception*);
-JS_EXPORT_PRIVATE JSObject* createError(ExecState*, JSValue, const String&, ErrorInstance::SourceAppender);
+bool isTerminatedExecutionException(JSObject*);
+JS_EXPORT_PRIVATE bool isTerminatedExecutionException(JSValue);
+JS_EXPORT_PRIVATE JSObject* createError(ExecState*, ErrorFactory, JSValue, const String&);
JS_EXPORT_PRIVATE JSObject* createStackOverflowError(ExecState*);
+JSObject* createStackOverflowError(JSGlobalObject*);
+JSObject* createOutOfMemoryError(JSGlobalObject*);
JSObject* createUndefinedVariableError(ExecState*, const Identifier&);
-JSObject* createTDZError(ExecState*);
JSObject* createNotAnObjectError(ExecState*, JSValue);
-JSObject* createInvalidFunctionApplyParameterError(ExecState*, JSValue);
-JSObject* createInvalidInParameterError(ExecState*, JSValue);
-JSObject* createInvalidInstanceofParameterErrorNotFunction(ExecState*, JSValue);
-JSObject* createInvalidInstanceofParameterErrorhasInstanceValueNotFunction(ExecState*, JSValue);
+JSObject* createInvalidParameterError(ExecState*, const char* op, JSValue);
JSObject* createNotAConstructorError(ExecState*, JSValue);
JSObject* createNotAFunctionError(ExecState*, JSValue);
JSObject* createErrorForInvalidGlobalAssignment(ExecState*, const String&);
JSString* errorDescriptionForValue(ExecState*, JSValue);
-JS_EXPORT_PRIVATE JSObject* throwOutOfMemoryError(ExecState*);
-JS_EXPORT_PRIVATE JSObject* throwStackOverflowError(ExecState*);
-JS_EXPORT_PRIVATE JSObject* throwTerminatedExecutionException(ExecState*);
+JSObject* throwOutOfMemoryError(ExecState*);
+JSObject* throwStackOverflowError(ExecState*);
+JSObject* throwTerminatedExecutionException(ExecState*);
-class TerminatedExecutionError final : public JSNonFinalObject {
+class TerminatedExecutionError : public JSNonFinalObject {
+private:
+ TerminatedExecutionError(VM& vm)
+ : JSNonFinalObject(vm, vm.terminatedExecutionErrorStructure.get())
+ {
+ }
+
+ static JSValue defaultValue(const JSObject*, ExecState*, PreferredPrimitiveType);
+
public:
typedef JSNonFinalObject Base;
- static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
static TerminatedExecutionError* create(VM& vm)
{
@@ -75,15 +80,6 @@ public:
}
DECLARE_EXPORT_INFO;
-
-private:
- explicit TerminatedExecutionError(VM& vm)
- : JSNonFinalObject(vm, vm.terminatedExecutionErrorStructure.get())
- {
- }
-
- static JSValue defaultValue(const JSObject*, ExecState*, PreferredPrimitiveType);
-
};
} // namespace JSC