Closed Bug 1313397 Opened 3 years ago Closed 3 years ago

"ReferenceError: Utils is not defined" spamming test logcats

Categories

(Firefox for Android :: General, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 52
Tracking Status
firefox52 --- fixed

People

(Reporter: gbrown, Assigned: gbrown)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1307235 +++

There are a lot of "ReferenceError: Utils is not defined" messages in adb logcats for tests.

On mozilla-central, this started with https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&revision=560b2c805bf7bebeb3ceebc495a81b2aa4c0c755.
It looks to me like sessionstore/Utils.jsm is not included in the Android omni.ja...I suppose we need it now. Can you confirm?
Flags: needinfo?(ckerschb)
Blocks: 1212460
(In reply to Geoff Brown [:gbrown] from comment #2)
> It looks to me like sessionstore/Utils.jsm is not included in the Android
> omni.ja...I suppose we need it now. Can you confirm?

That is very likely. Sorry for the lag of response but I am super busy at the moment. Any chance I could convince you to provide a fix? If not, let me know I try to find someone else to get that fixed. Thanks!
Flags: needinfo?(ckerschb)
I am pretty sure Utils.jsm needs to move out of browser/components in order to be successfully referenced from Android. I am less sure of where it "should" go. I've taken a guess and moved browser/components/sessionstore/Utils.jsm to toolkit/modules/sessionstore/Utils.jsm. That gets it into the Fennec omni.ja and successfully eliminates the reference error.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=03bce97b70085785e86c81b48e0e608fb121db36
Attachment #8806432 - Flags: review?(ttaubert)
Attachment #8806432 - Flags: review?(ttaubert) → review?(mdeboer)
Comment on attachment 8806432 [details] [diff] [review]
move Utils.jsm to toolkit/modules/sessionstore

Review of attachment 8806432 [details] [diff] [review]:
-----------------------------------------------------------------

Geoff, thanks for fixing this! I feel bad for not having caught this issue when reviewing the patch that causes this error.

The try push looks good to me, so r=me with the one comment below addressed.

::: toolkit/modules/moz.build
@@ +101,4 @@
>      'ZipUtils.jsm',
>  ]
>  EXTRA_JS_MODULES.third_party.jsesc += ['third_party/jsesc/jsesc.js']
> +EXTRA_JS_MODULES.sessionstore += ['sessionstore/Utils.jsm']

Please add this module below `'sessionstore/ScrollPosition.jsm',` above.
Attachment #8806432 - Flags: review?(mdeboer) → review+
(In reply to Mike de Boer [:mikedeboer] from comment #5)
> Geoff, thanks for fixing this! I feel bad for not having caught this issue
> when reviewing the patch that causes this error.

Geoff++

thanks for filing and fixing :-)
(In reply to Mike de Boer [:mikedeboer] from comment #5)
> ::: toolkit/modules/moz.build
> @@ +101,4 @@
> >      'ZipUtils.jsm',
> >  ]
> >  EXTRA_JS_MODULES.third_party.jsesc += ['third_party/jsesc/jsesc.js']
> > +EXTRA_JS_MODULES.sessionstore += ['sessionstore/Utils.jsm']
> 
> Please add this module below `'sessionstore/ScrollPosition.jsm',` above.

If I do that, with something like:

  EXTRA_JS_MODULES += [
   ...
   'sessionstore/ScrollPosition.jsm',
+  'sessionstore/Utils.jsm',
   ...
  ]

that will put Utils.jsm at modules/Utils.jsm, whereas

+ EXTRA_JS_MODULES.sessionstore += ['sessionstore/Utils.jsm']

puts it at modules/sessionstore/Utils.jsm.

There is already modules/accessibility/Utils.jsm, and given the simple, common name, I think we want to keep sessionstore in the path name for Utils.


OK to keep it as it is in the original patch?
Flags: needinfo?(mdeboer)
(In reply to Geoff Brown [:gbrown] from comment #7)
> OK to keep it as it is in the original patch?

OK.
Flags: needinfo?(mdeboer)
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4e076789f4a5
Move browser/components/sessionstore/Utils.jsm to toolkit/modules; r=mikedeboer
https://hg.mozilla.org/mozilla-central/rev/4e076789f4a5
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
Duplicate of this bug: 1311139
Duplicate of this bug: 1311140
You need to log in before you can comment on or make changes to this bug.