summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/runtime/ExceptionHelpers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/runtime/ExceptionHelpers.cpp')
-rw-r--r--JavaScriptCore/runtime/ExceptionHelpers.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/JavaScriptCore/runtime/ExceptionHelpers.cpp b/JavaScriptCore/runtime/ExceptionHelpers.cpp
index a1e28d1..5fbaa18 100644
--- a/JavaScriptCore/runtime/ExceptionHelpers.cpp
+++ b/JavaScriptCore/runtime/ExceptionHelpers.cpp
@@ -187,14 +187,19 @@ JSObject* createNotAnObjectError(ExecState* exec, JSNotAnObjectErrorStub* error,
return exception;
}
-JSValue throwOutOfMemoryError(ExecState* exec)
+JSObject* createErrorForInvalidGlobalAssignment(ExecState* exec, const UString& propertyName)
+{
+ return createReferenceError(exec, makeUString("Strict mode forbids implicit creation of global property '", propertyName, "'"));
+}
+
+JSObject* throwOutOfMemoryError(ExecState* exec)
{
return throwError(exec, createError(exec, "Out of memory"));
}
-JSObject* createErrorForInvalidGlobalAssignment(ExecState* exec, const UString& propertyName)
+JSObject* throwStackOverflowError(ExecState* exec)
{
- return createReferenceError(exec, makeUString("Strict mode forbids implicit creation of global property '", propertyName, "'"));
-}
+ return throwError(exec, createStackOverflowError(exec));
+}
} // namespace JSC