Closed Bug 1266256 Opened 9 years ago Closed 9 years ago

Don't try to create null URLs in _isMinifiedURL

Categories

(DevTools :: Debugger, defect)

defect
Not set
normal

Tracking

(firefox49 fixed)

RESOLVED FIXED
Firefox 49
Tracking Status
firefox49 --- fixed

People

(Reporter: erahm, Assigned: erahm)

References

Details

Attachments

(1 file)

Avoid passing null to the URL constructor, it causes warnings on debug builds.
Attachment #8743620 - Flags: review?(ejpbruel)
Comment on attachment 8743620 [details] [diff] [review] Don't try to create null URLs in _isMinifiedURL Review of attachment 8743620 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me. Would be nice to add a comment explaining why you added this check.
Attachment #8743620 - Flags: review?(ejpbruel) → review+
(In reply to Eddy Bruel [:ejpbruel] from comment #3) > Comment on attachment 8743620 [details] [diff] [review] > Don't try to create null URLs in _isMinifiedURL > > Review of attachment 8743620 [details] [diff] [review]: > ----------------------------------------------------------------- > > Looks good to me. Would be nice to add a comment explaining why you added > this check. I'll add a comment before landing, looks like this cleared up 1400 warnings during testing.
(In reply to Sebastian H. [:aryx][:archaeopteryx] from comment #6) > Backed out for various devtools failures 'A promise chain failed to handle > a rejection: - [object Object]'. > > Backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/a603640aa82d > > Push with failures: > https://treeherder.mozilla.org/#/jobs?repo=mozilla- > inbound&revision=c47cd2b5f4a6ecfeb4ca629eb335696b5883090b > Failure log: > https://treeherder.mozilla.org/logviewer.html#?job_id=26329764&repo=mozilla- > inbound I have no idea how this code could have caused that. The logic of the function has not been changed, we just avoid emitting a warning now. Before we would catch the exception and run |MINIFIED_SOURCE_REGEXP.test(...)|, but |MINIFIED_SOURCE_REGEXP.test(null|"")| is going to return false, so just returning false earlier shouldn't be an issue.
Flags: needinfo?(erahm)
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: