Remove extra serialization/deserialization overhead from same-process policy initialization

RESOLVED FIXED in Firefox 57

Status

RESOLVED FIXED
2 years ago
8 months ago

People

(Reporter: kmag, Assigned: kmag)

Tracking

(Blocks: 1 bug)

unspecified
mozilla57

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
We currently serialize and deserialize extension data that we use to initialize policy objects when setting them up in the parent process. This overhead is unnecessary, and simple enough to remove.
Comment hidden (mozreview-request)

Comment 2

2 years ago
mozreview-review
Comment on attachment 8896665 [details]
Bug 1389861: Remove needless overhead from same-process policy initialization.

https://reviewboard.mozilla.org/r/167972/#review173148

::: toolkit/components/extensions/extension-process-script.js:59
(Diff revision 1)
>  }
>  
>  var extensions = new DefaultWeakMap(policy => {
> -  let extension = new ExtensionChild.BrowserExtensionContent(policy.initData);
> +  let data = policy.initData;
> +  if (data.serialize) {
> +    data = data.serialize();

nit: could use a comment as well.
Attachment #8896665 - Flags: review?(tomica) → review+
(Assignee)

Comment 3

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/5ca3247d2f8b3be150510b910f2d7583a5b43eea
Bug 1389861: Remove needless overhead from same-process policy initialization. r=zombie

Comment 4

2 years ago
Pushed by maglione.k@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5ca3247d2f8b
Remove needless overhead from same-process policy initialization. r=zombie

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/5ca3247d2f8b
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57

Updated

8 months ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.