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

RESOLVED FIXED in Firefox 57

Status

()

Toolkit
WebExtensions: General
RESOLVED FIXED
4 months ago
4 months ago

People

(Reporter: kmag, Assigned: kmag)

Tracking

(Blocks: 1 bug)

unspecified
mozilla57
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

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

4 months 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+
https://hg.mozilla.org/integration/mozilla-inbound/rev/5ca3247d2f8b3be150510b910f2d7583a5b43eea
Bug 1389861: Remove needless overhead from same-process policy initialization. r=zombie

Comment 4

4 months 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

4 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/5ca3247d2f8b
Status: NEW → RESOLVED
Last Resolved: 4 months ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.