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

RESOLVED FIXED in Firefox 68

Status

()

defect
RESOLVED FIXED
2 months ago
2 months ago

People

(Reporter: standard8, Assigned: standard8)

Tracking

65 Branch
mozilla68
Points:
1

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

2 months ago

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.

Comment 2

2 months ago
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

Comment 3

2 months ago
bugherder
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.