Last Comment Bug 739234 - state[0] is undefined when initializing DOMWifiManager
: state[0] is undefined when initializing DOMWifiManager
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Device Interfaces (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Blake Kaplan (:mrbkap) (please use needinfo!)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-26 08:18 PDT by Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails, needinfo? please)
Modified: 2012-03-27 12:07 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Easy fix (1.04 KB, patch)
2012-03-27 07:40 PDT, Blake Kaplan (:mrbkap) (please use needinfo!)
21: review+
Details | Diff | Review

Description Vivien Nicolas (:vingtetun) (:21) - (NOT reading bugmails, needinfo? please) 2012-03-26 08:18:52 PDT
Content JS LOG at http://localhost/webapi.js:1143 in anonymous: [Exception... "'[JavaScript Error: "state[0] is undefined" {file: "file:///home/vivien/Devel/mozilla/b2g/desktop/build/dist/bin/components/DOMWifiManager.js" line: 61}]' when calling method: [nsIDOMGlobalPropertyInitializer::init]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: http://localhost/webapi.js :: <TOP_LEVEL> :: line 1139"  data: yes]

This error happens on Gaia when doing: 

if ('mozWifiManager' in navigator)
 return;
Comment 1 Blake Kaplan (:mrbkap) (please use needinfo!) 2012-03-27 07:40:27 PDT
Created attachment 609708 [details] [diff] [review]
Easy fix

Not very pretty, but it'll silence the warnings at least.
Comment 2 [:fabrice] Fabrice Desré 2012-03-27 12:07:01 PDT
https://hg.mozilla.org/mozilla-central/rev/7290c4f0a150

Note You need to log in before you can comment on or make changes to this bug.