Open Bug 1817041 Opened 2 years ago Updated 2 years ago

Make JSValidatorParent to send the data over in OnStopRequest rather than OnDataAvailable

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

People

(Reporter: sefeng, Assigned: sefeng)

References

Details

(Whiteboard: [orb:m2] )

Attachments

(1 file)

This way, we only need to create Shmem once and avoid unnecessary IPC message for OnDataAvailable between JSVadliatorParent and JSValidatorChild.

Severity: -- → N/A
Priority: -- → P2

This patch has two changes

  • Instead of sending the data over from parent to utility in
    OnDataAvailable, we cache in JSValidatorParent and only
    send it over once in OnStopRequest.

    • So we only need to create the shared memory once and sending
      the data once, should be an improvement.
    • This also helps bug 1804086 to only decoding data once.
  • After the validation, reuse the same data that JSValidatorParent
    caches, instead of using whatever the utility process send over.

    • This change is needed because we are ensuring utility process
      only receives UTF8 encoded data in bug 1804086, so the content
      it receives can be modified and we don't want to use modified
      data after the JavaScript validation.
    • This also removes one shared memory allocation, should
      also be an improvement.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: