mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1033138 - Use AutoJSAPI instead of AutJSContext. r=bholley
This commit is contained in:
parent
ffa960fbea
commit
1c0609c23a
@ -240,9 +240,12 @@ MobileMessageCallback::NotifyGetSegmentInfoForTextFailed(int32_t aError)
|
||||
NS_IMETHODIMP
|
||||
MobileMessageCallback::NotifyGetSmscAddress(const nsAString& aSmscAddress)
|
||||
{
|
||||
AutoJSContext cx;
|
||||
JSString* smsc = JS_NewUCStringCopyN(cx,
|
||||
static_cast<const jschar *>(aSmscAddress.BeginReading()),
|
||||
AutoJSAPI jsapi;
|
||||
if (NS_WARN_IF(!jsapi.Init(mDOMRequest->GetOwner()))) {
|
||||
return NotifyError(nsIMobileMessageCallback::INTERNAL_ERROR);
|
||||
}
|
||||
JSContext* cx = jsapi.cx();
|
||||
JSString* smsc = JS_NewUCStringCopyN(cx, aSmscAddress.BeginReading(),
|
||||
aSmscAddress.Length());
|
||||
|
||||
if (!smsc) {
|
||||
|
Loading…
Reference in New Issue
Block a user