X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/9dae56ea45a0f5f8136a5c93d6f3a7f99399ca73..fb8617cde5834786bd4e4afd579883e4acf5666e:/runtime/Error.cpp diff --git a/runtime/Error.cpp b/runtime/Error.cpp index 5e21c8e..ddd4bc4 100644 --- a/runtime/Error.cpp +++ b/runtime/Error.cpp @@ -26,6 +26,7 @@ #include "ConstructData.h" #include "ErrorConstructor.h" +#include "JSFunction.h" #include "JSGlobalObject.h" #include "JSObject.h" #include "JSString.h" @@ -72,7 +73,7 @@ JSObject* Error::create(ExecState* exec, ErrorType type, const UString& message, break; } - ArgList args; + MarkedArgumentBuffer args; if (message.isEmpty()) args.append(jsString(exec, name)); else @@ -96,6 +97,12 @@ JSObject* Error::create(ExecState* exec, ErrorType type, const char* message) return create(exec, type, message, -1, -1, NULL); } +JSObject* throwError(ExecState* exec, JSObject* error) +{ + exec->setException(error); + return error; +} + JSObject* throwError(ExecState* exec, ErrorType type) { JSObject* error = Error::create(exec, type, UString(), -1, -1, NULL);