summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/JSAudioConstructor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/JSAudioConstructor.cpp')
-rw-r--r--WebCore/bindings/js/JSAudioConstructor.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/WebCore/bindings/js/JSAudioConstructor.cpp b/WebCore/bindings/js/JSAudioConstructor.cpp
index cc791d1..5bbaf41 100644
--- a/WebCore/bindings/js/JSAudioConstructor.cpp
+++ b/WebCore/bindings/js/JSAudioConstructor.cpp
@@ -46,13 +46,13 @@ JSAudioConstructor::JSAudioConstructor(ExecState* exec, JSDOMGlobalObject* globa
putDirect(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly | DontDelete | DontEnum);
}
-static JSObject* constructAudio(ExecState* exec, JSObject* constructor, const ArgList& args)
+static EncodedJSValue JSC_HOST_CALL constructAudio(ExecState* exec)
{
- JSAudioConstructor* jsConstructor = static_cast<JSAudioConstructor*>(constructor);
+ JSAudioConstructor* jsConstructor = static_cast<JSAudioConstructor*>(exec->callee());
Document* document = jsConstructor->document();
if (!document)
- return throwError(exec, ReferenceError, "Audio constructor associated document is unavailable");
+ return throwVMError(exec, createReferenceError(exec, "Audio constructor associated document is unavailable"));
// Calling toJS on the document causes the JS document wrapper to be
// added to the window object. This is done to ensure that JSDocument::markChildren
@@ -60,13 +60,13 @@ static JSObject* constructAudio(ExecState* exec, JSObject* constructor, const Ar
toJS(exec, jsConstructor->globalObject(), document);
// FIXME: This converts an undefined argument to the string "undefined", but possibly we
- // should treat it as if no argument was passed instead, by checking the value of args.at
- // rather than looking at args.size.
+ // should treat it as if no argument was passed instead, by checking the value of exec->argument
+ // rather than looking at exec->argumentCount.
String src;
- if (args.size() > 0)
- src = ustringToString(args.at(0).toString(exec));
- return asObject(toJS(exec, jsConstructor->globalObject(),
- HTMLAudioElement::createForJSConstructor(document, src)));
+ if (exec->argumentCount() > 0)
+ src = ustringToString(exec->argument(0).toString(exec));
+ return JSValue::encode(asObject(toJS(exec, jsConstructor->globalObject(),
+ HTMLAudioElement::createForJSConstructor(document, src))));
}
ConstructType JSAudioConstructor::getConstructData(ConstructData& constructData)