Open Bug 1606957 Opened 6 years ago Updated 1 year ago

Try to improve conversions from UTF8String to JS::Value

Categories

(Core :: DOM: Bindings (WebIDL), task, P3)

task

Tracking

()

People

(Reporter: emilio, Unassigned)

References

Details

In bug 1449861, I am using JS_NewStringCopyUTF8N to convert an UTF-8 string to a JS value. This has some caveats:

  • It walks the entire string in all cases to determine the "smallest encoding".
  • It will trigger automatic non-sharing copies for non-ASCII cases.

We should try to do better, either by changing the string representation in SpiderMonkey (which I suspect is hard), or by trying to provide more information in the returned string (like whether we're ASCII or such).

Type: defect → task
Priority: -- → P3
Severity: normal → S3
See Also: → 1756443
Depends on: 1869726
You need to log in before you can comment on or make changes to this bug.