Closed Bug 1545390 Opened 5 years ago Closed 5 years ago

Fix a couple of reference to undefined properties in AddonTestUtils.jsm and ExtensionCommon.jsm

Categories

(Toolkit :: Add-ons Manager, defect)

65 Branch
defect
Not set
normal
Points:
1

Tracking

()

RESOLVED FIXED
mozilla68
Iteration:
68.3 - Apr 15 - 28
Tracking Status
firefox68 --- fixed

People

(Reporter: standard8, Assigned: standard8)

Details

Attachments

(1 file)

Running test_reloadEngines.js, I'm seeing a couple of undefined property references:

pid:23401 JavaScript strict warning: resource://testing-common/AddonTestUtils.jsm, line 278: ReferenceError: reference to undefined property "testScope"
 0:01.38 INFO "CONSOLE_MESSAGE: (warn) [JavaScript Warning: "ReferenceError: reference to undefined property "testScope"" {file: "resource://testing-common/AddonTestUtils.jsm" line: 278}]"

The is because testScope hasn't been defined as a property for AddonTestUtils.

 0:01.76 pid:23479 JavaScript strict warning: resource://gre/modules/ExtensionCommon.jsm, line 1921: ReferenceError: reference to undefined property "placeholders"
 0:01.77 INFO "CONSOLE_MESSAGE: (warn) [JavaScript Warning: "ReferenceError: reference to undefined property "placeholders"" {file: "resource://gre/modules/ExtensionCommon.jsm" line: 1921}]"

This is in the code that is reading the locale files for WebExtensions. Not every WebExtension message has a placeholder property. Although the code is checking that msg.placeholders is a valid object, it isn't first checking that placeholders is a property on msg.

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f4a2547c2384
Fix a couple of reference to undefined properties in AddonTestUtils.jsm and ExtensionCommon.jsm. r=aswan
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: