Get rid of sdk use in devtools/shared/layout/utils.js

RESOLVED FIXED in Firefox 52

Status

defect
P1
normal
RESOLVED FIXED
3 years ago
10 months ago

People

(Reporter: bgrins, Assigned: bgrins)

Tracking

unspecified
Firefox 52
Dependency tree / graph
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox52 fixed)

Details

(Whiteboard: [devtools-html])

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Breaking this out from Bug 1291049, there's a call to memoize that we probably don't need and removing it will make bundling easier
Whiteboard: [devtools-html] [triage]
I looked at this during track 3 and thought that shared/layout/utils wasn't needed;
but maybe that was in error?
(Assignee)

Comment 2

3 years ago
(In reply to Tom Tromey :tromey from comment #1)
> I looked at this during track 3 and thought that shared/layout/utils wasn't
> needed;
> but maybe that was in error?

Hm maybe this change was an artifact from when we were compiling everything.  Will double check
(Assignee)

Comment 3

3 years ago
I see a `require` here so it does end up getting compiled: https://dxr.mozilla.org/mozilla-central/source/devtools/client/framework/selection.js#11.  Although it doesn't seem to throw an error anymore when running webpack.  Not sure if that's because we are somehow ignoring it, but it doesn't look like it.

Regardless, the change here is pretty trivial and it should lower our footprint / bundle size.
Comment hidden (mozreview-request)
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Iteration: --- → 52.1 - Oct 3
Flags: qe-verify?
Priority: -- → P1
Whiteboard: [devtools-html] [triage] → [devtools-html]

Comment 6

3 years ago
mozreview-review
Comment on attachment 8793559 [details]
Bug 1304513 - Get rid of sdk use in devtools/shared/layout/utils.js;

https://reviewboard.mozilla.org/r/80272/#review79064

Thank you.

::: devtools/shared/layout/utils.js:7
(Diff revision 1)
>   * License, v. 2.0. If a copy of the MPL was not distributed with this
>   * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
>  
>  "use strict";
>  
>  const { Ci, Cc } = require("chrome");

This require and the uses of Ci and Cu will have to go away somehow as well...
Attachment #8793559 - Flags: review?(ttromey) → review+

Comment 7

3 years ago
Pushed by bgrinstead@mozilla.com:
https://hg.mozilla.org/integration/fx-team/rev/9ff18f836877
Get rid of sdk use in devtools/shared/layout/utils.js;r=tromey

Comment 8

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/9ff18f836877
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52
Flags: qe-verify? → qe-verify-

Updated

10 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.