Closed Bug 798123 Opened 12 years ago Closed 12 years ago

Replace the array conversion functions in BluetoothUtils.cpp with those in nsTArrayHelpers.h

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set
normal

Tracking

(blocking-basecamp:+, firefox18 fixed, firefox19 fixed)

RESOLVED FIXED
blocking-basecamp +
Tracking Status
firefox18 --- fixed
firefox19 --- fixed

People

(Reporter: gsvelto, Assigned: gsvelto)

References

Details

Attachments

(1 file, 1 obsolete file)

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().
Attachment #672378 - Flags: review?(mrbkap)
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://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/gsvelto@mozilla.com-46ad09c9afaa
Fixed an issue in the previous patch when dealing with strings
Attachment #672378 - Attachment is obsolete: true
Attachment #672378 - Flags: review?(mrbkap)
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://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/gsvelto@mozilla.com-6cdd419c29b6
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+
Keywords: checkin-needed
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'
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/811bf58c47f2
https://hg.mozilla.org/mozilla-central/rev/ee0b7a687708
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Blocks a blocker.
blocking-basecamp: --- → ?
blocking-basecamp: ? → +
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: