Closed Bug 1033138 Opened 11 years ago Closed 11 years ago

[RIL] getSmscAddress() causes crash

Categories

(Firefox OS Graveyard :: RIL, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: chucklee, Assigned: chucklee)

References

Details

Attachments

(1 file, 1 obsolete file)

Calling getSmscAddress() in Gaia will cause crash, as following log shows: > 07-02 11:06:37.325 I/Gecko ( 108): ######### Gecko:RadioInterfaceLayer.js:getSmscAddress() > 07-02 11:06:37.325 I/Gecko ( 108): ######### Gecko:ril_worker.js:getSmscAddress() > 07-02 11:06:37.335 I/Gecko ( 108): ######### Gecko:RadioInterfaceLayer.js:getSmscAddress(), success: "+886932400851",145 > 07-02 11:06:37.716 I/Gecko ( 108): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv > 07-02 11:06:37.716 I/Gecko ( 108): ############ ErrorPage.js > 07-02 11:06:37.726 I/Gecko ( 108): [Parent 108] WARNING: pipe error (179): Connection reset by peer: file /home/chucklee/work/mozilla/src/mozilla-central/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 450 > 07-02 11:06:37.726 I/Gecko ( 108): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv > 07-02 11:06:37.726 I/Gecko ( 108): ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv > ###!!! [Parent][MessageChannel] Error: Channel error: cannot send/recv > 07-02 11:06:37.766 I/GeckoDump( 108): Crash reporter : Can't fetch app.reportCrashes. Exception: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.getBoolPref]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://b2g/content/shell.js :: shell_reportCrash :: line 149" data: no]
JSAutoContext causes crash now, which didn't while the API is landed. So use JSSafeAutoContext instead.
Attachment #8449194 - Flags: review?(vyang)
Comment on attachment 8449194 [details] [diff] [review] Use AutoSafeJSContext instead of AutJSContext. Review of attachment 8449194 [details] [diff] [review]: ----------------------------------------------------------------- From bug 878533 comment 47, maybe we should use AutoJSAPI instead.
Attachment #8449194 - Flags: review?(vyang) → review?(bobbyholley)
Comment on attachment 8449194 [details] [diff] [review] Use AutoSafeJSContext instead of AutJSContext. Review of attachment 8449194 [details] [diff] [review]: ----------------------------------------------------------------- Yes, please use: AutoJSAPI jsapi; if (!jsapi.Init(GetOwner())) { // failure handling } From there, you can use jsapi.cx() to access the JSContext.
Attachment #8449194 - Flags: review?(bobbyholley) → review-
Address comment 3.
Attachment #8449194 - Attachment is obsolete: true
Attachment #8449951 - Flags: review?(bobbyholley)
Attachment #8449951 - Flags: review?(bobbyholley) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: