mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 465006 - 'Workers: Passing no arguments to the worker constructor throws an NS_ERROR_NOT_INITIALIZED error, incorrectly.' r+sr=jst, a=sicking.
This commit is contained in:
parent
d1e776def5
commit
b59d1762af
@ -5041,7 +5041,7 @@ BaseStubConstructor(nsIWeakReference* aWeakOwner,
|
||||
|
||||
rv = initializer->Initialize(currentInner, cx, obj, argc, argv);
|
||||
if (NS_FAILED(rv)) {
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -924,12 +924,11 @@ nsDOMWorker::InitializeInternal(nsIScriptGlobalObject* aOwner,
|
||||
PRUint32 aArgc,
|
||||
jsval* aArgv)
|
||||
{
|
||||
NS_ENSURE_TRUE(aArgc, NS_ERROR_INVALID_ARG);
|
||||
NS_ENSURE_TRUE(aArgc, NS_ERROR_XPC_NOT_ENOUGH_ARGS);
|
||||
NS_ENSURE_ARG_POINTER(aArgv);
|
||||
NS_ENSURE_TRUE(JSVAL_IS_STRING(aArgv[0]), NS_ERROR_INVALID_ARG);
|
||||
|
||||
JSString* str = JS_ValueToString(aCx, aArgv[0]);
|
||||
NS_ENSURE_STATE(str);
|
||||
NS_ENSURE_TRUE(str, NS_ERROR_XPC_BAD_CONVERT_JS);
|
||||
|
||||
mScriptURL.Assign(nsDependentJSString(str));
|
||||
NS_ENSURE_FALSE(mScriptURL.IsEmpty(), NS_ERROR_INVALID_ARG);
|
||||
|
Loading…
Reference in New Issue
Block a user