Closed Bug 1492678 Opened 6 years ago Closed 6 years ago

XDR-encode/decode the source text of scripts using codeChars for better typing and to address endianness considerations

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: Waldo, Assigned: Waldo)

Details

Attachments

(1 file)

      No description provided.
Attached patch PatchSplinter Review
Attachment #9010503 - Flags: review?(tcampbell)
Comment on attachment 9010503 [details] [diff] [review]
Patch

Review of attachment 9010503 [details] [diff] [review]:
-----------------------------------------------------------------

Much improved, thanks.

::: js/src/vm/JSScript.cpp
@@ +2230,5 @@
>      {
>          size_t match(Uncompressed&) {
> +            // Return 0 so the |if (compressedLength)| tests below correctly
> +            // (and differently) XDR scripts with compressed source and scripts
> +            // with uncompressed source.

// Return 0 for uncompressed source that |if (compressedLength)| tests below can differentiate between compressed and uncompressed sources.

@@ +2277,2 @@
>  
>          uint32_t compressedLength;

// A compressed length of 0 indicates source is uncompressed.
Attachment #9010503 - Flags: review?(tcampbell) → review+
Pushed by jwalden@mit.edu:
https://hg.mozilla.org/integration/mozilla-inbound/rev/cb4aa4bcb7fa
XDR-encode/decode the source text of scripts using codeChars, not codeBytes that can scramble endianness of char16_t source text if the XDR data is read back on a machine of different endianness.  r=tcampbell
https://hg.mozilla.org/mozilla-central/rev/cb4aa4bcb7fa
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: