Closed Bug 798123 Opened 8 years ago Closed 8 years ago
Replace the array conversion functions in Bluetooth
Utils .cpp with those in ns TArray Helpers .h
BluetoothUtils.cpp provides two functions for converting nsTArrays of nsString and BluetoothDevice object references into JSArray objects. BluetoothDeviceArrayToJSArray could be replaced with the existing nsTArrayToJSArray() function whilst a specialized version of it could be used to replace StringArrayToJSArray(). See bug 739780.
Assignee: nobody → gsvelto
Status: NEW → ASSIGNED
I've replaced BluetoothDeviceArrayToJSArray() with a straight call to the existing nsTArrayToJSArray() templated function and added a specialized version of it for nsString to replace StringArrayToJSArray().
Try run for 46ad09c9afaa is complete. Detailed breakdown of the results available here: https://tbpl.mozilla.org/?tree=Try&rev=46ad09c9afaa Results (out of 1 total builds): failure: 1 Builds (or logs if builds failed) available at: http://firstname.lastname@example.org
Fixed an issue in the previous patch when dealing with strings
Try run for 6cdd419c29b6 is complete. Detailed breakdown of the results available here: https://tbpl.mozilla.org/?tree=Try&rev=6cdd419c29b6 Results (out of 1 total builds): success: 1 Builds (or logs if builds failed) available at: http://email@example.com
Comment on attachment 672763 [details] [diff] [review] Replace StringArrayToJSArray() and BluetoothDeviceArrayToJSArray() with nsTArrayToJSArray() V2 Since I'm unsure if this code is covered by the Android unit tests I've run a few Bluetooth activities on my Otoro with the patch applied to make sure it works correctly and I haven't encountered any obvious problems.
Attachment #672763 - Flags: review?(mrbkap)
Attachment #672763 - Flags: review?(mrbkap) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/811bf58c47f2 Also had to push a warnings-as-errors bustage fix: https://hg.mozilla.org/integration/mozilla-inbound/rev/ee0b7a687708 ../../dist/include/nsTArrayHelpers.h: In function 'nsresult nsTArrayToJSArray(JSContext*, const nsTArray<Item, nsTArrayDefaultAllocator>&, JSObject**) [with T = nsString, nsresult = tag_nsresult, JSContext = JSContext, JSObject = JSObject]': ../../dist/include/nsTArrayHelpers.h:64:13: error: unused variable 'global'
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Blocks a blocker.
blocking-basecamp: --- → ?
You need to log in before you can comment on or make changes to this bug.