mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 815671 part 5. Various miscellaneous fixups in dom/ and hal/ code to copy arrays only when we explicitly want to. r=jlebar
This commit is contained in:
parent
4adc2730f3
commit
69ab92b7a0
@ -393,8 +393,9 @@ BluetoothRequestParent::DoRequest(const DevicePropertiesRequest& aRequest)
|
||||
MOZ_ASSERT(mService);
|
||||
MOZ_ASSERT(mRequestType == Request::TDevicePropertiesRequest);
|
||||
|
||||
// Have to copy because our array types don't match up
|
||||
nsresult rv =
|
||||
mService->GetPairedDevicePropertiesInternal(aRequest.addresses(),
|
||||
mService->GetPairedDevicePropertiesInternal(nsTArray<nsString>(aRequest.addresses()),
|
||||
mReplyRunnable.get());
|
||||
NS_ENSURE_SUCCESS(rv, false);
|
||||
|
||||
|
@ -18,7 +18,7 @@ namespace IPC {
|
||||
|
||||
bool
|
||||
DeserializeUint8Array(JSRawObject aObj,
|
||||
const nsTArray<uint8_t>& aBuffer,
|
||||
const InfallibleTArray<uint8_t>& aBuffer,
|
||||
jsval* aVal)
|
||||
{
|
||||
JSContext* cx = nsContentUtils::GetSafeJSContext();
|
||||
|
@ -15,7 +15,7 @@ namespace IPC {
|
||||
//Defined in TCPSocketChild.cpp
|
||||
extern bool
|
||||
DeserializeUint8Array(JSRawObject aObj,
|
||||
const nsTArray<uint8_t>& aBuffer,
|
||||
const InfallibleTArray<uint8_t>& aBuffer,
|
||||
jsval* aVal);
|
||||
|
||||
}
|
||||
|
@ -1741,7 +1741,7 @@ nsPluginHost::NormalizeHostname(nsCString& host)
|
||||
// first match.
|
||||
nsresult
|
||||
nsPluginHost::EnumerateSiteData(const nsACString& domain,
|
||||
const nsTArray<nsCString>& sites,
|
||||
const InfallibleTArray<nsCString>& sites,
|
||||
InfallibleTArray<nsCString>& result,
|
||||
bool firstMatchOnly)
|
||||
{
|
||||
|
@ -304,7 +304,7 @@ private:
|
||||
// Helpers for ClearSiteData and SiteHasData.
|
||||
nsresult NormalizeHostname(nsCString& host);
|
||||
nsresult EnumerateSiteData(const nsACString& domain,
|
||||
const nsTArray<nsCString>& sites,
|
||||
const InfallibleTArray<nsCString>& sites,
|
||||
InfallibleTArray<nsCString>& result,
|
||||
bool firstMatchOnly);
|
||||
|
||||
|
@ -24,7 +24,7 @@ WindowIdentifier::WindowIdentifier(nsIDOMWindow *window)
|
||||
mID.AppendElement(GetWindowID());
|
||||
}
|
||||
|
||||
WindowIdentifier::WindowIdentifier(const nsTArray<uint64_t> &id, nsIDOMWindow *window)
|
||||
WindowIdentifier::WindowIdentifier(const InfallibleTArray<uint64_t> &id, nsIDOMWindow *window)
|
||||
: mID(id)
|
||||
, mWindow(window)
|
||||
, mIsEmpty(false)
|
||||
|
@ -66,7 +66,7 @@ public:
|
||||
* This automatically grabs the window's ID and appends it to the
|
||||
* array.
|
||||
*/
|
||||
WindowIdentifier(const nsTArray<uint64_t>& id, nsIDOMWindow* window);
|
||||
WindowIdentifier(const InfallibleTArray<uint64_t>& id, nsIDOMWindow* window);
|
||||
|
||||
/**
|
||||
* Get the list of window and process IDs we contain.
|
||||
|
@ -440,7 +440,8 @@ public:
|
||||
nsCOMPtr<nsIDOMWindow> window =
|
||||
do_QueryInterface(tabParent->GetBrowserDOMWindow());
|
||||
WindowIdentifier newID(id, window);
|
||||
hal::Vibrate(pattern, newID);
|
||||
// Have to copy, because Vibrate doesn't take a compatible array type
|
||||
hal::Vibrate(nsTArray<uint32_t>(pattern), newID);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user