Closed
      
        Bug 1033138
      
      
        Opened 11 years ago
          Closed 11 years ago
      
        
    
  
[RIL] getSmscAddress() causes crash  
    Categories
(Firefox OS Graveyard :: RIL, defect)
Tracking
(Not tracked)
        RESOLVED
        FIXED
        
    
  
People
(Reporter: chucklee, Assigned: chucklee)
References
Details
Attachments
(1 file, 1 obsolete file)
| 1.34 KB,
          patch         | bholley
:
              
              review+ | Details | Diff | Splinter Review | 
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]
| Assignee | ||
| Comment 1•11 years ago
           | ||
JSAutoContext causes crash now, which didn't while the API is landed.
So use JSSafeAutoContext instead.
        Attachment #8449194 -
        Flags: review?(vyang)
| Comment 2•11 years ago
           | ||
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 3•11 years ago
           | ||
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-
| Assignee | ||
| Comment 4•11 years ago
           | ||
Address comment 3.
        Attachment #8449194 -
        Attachment is obsolete: true
        Attachment #8449951 -
        Flags: review?(bobbyholley)
| Updated•11 years ago
           | 
        Attachment #8449951 -
        Flags: review?(bobbyholley) → review+
| Assignee | ||
| Comment 5•11 years ago
           | ||
Try looks good : https://tbpl.mozilla.org/?tree=Try&rev=a44b68d3f546
Keywords: checkin-needed
|   | ||
| Comment 6•11 years ago
           | ||
Keywords: checkin-needed
|   | ||
| Comment 7•11 years ago
           | ||
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.
        
Description
•