The interpreter engine for the core JavaScript language, independent of the browser's object model. File ONLY core JavaScript language bugs in this category. For bugs involving browser objects such as "window" and "document", use the "DOM" component. For bugs involving calls between JavaScript and C++, use the "XPConnect" component.

js/src/builtin/TestingFunctions.cpp
- Replace JS_strdup() with DuplicateString() and then directly move the result to InlineFrameInfo.
- Drive-by fix: Use "js_free" instead of "free" in GetLcovInfo(...).
js/src/jsapi.cpp
- Replace JS_strdup() with DuplicateString() + release() in JS::OwningCompileOptions::setFile(...) and JS::OwningCompileOptions::setIntroducerFilename(...), because no better alternative is currently possible.
- Directly return UniqueChars from JS_GetDefaultLocale().
js/src/vm/BytecodeUtil.cpp
- Directly return UniqueChars from DecompileValueGenerator(...).
- Change js::DecompileArgument(...) to return UniqueChars similar to DecompileValueGenerator(...).
js/src/vm/CodeCoverage.{h,cpp}
- Change LCovSource::name_ to UniqueChars to avoid manual resource management and update the constructors accordingly.
- Directly pass UniqueChars to the LCovSource constructor in LCovRealm::lookupOrAdd().
js/src/vm/Debugger.{h,cpp}
- Change EvalOptions::filename_ to UniqueChars.
js/src/vm/JSScript.cpp
- Replace js_strdup() with the version of DuplicateString() which takes a context, so we don't need to report oom-errors manually.
js/src/vm/Runtime.cpp
- Also only replaced JS_strdup() with DuplicateString() + release().
- Drive-by change: Only reset the default locale when DuplicateString(...) returned non-null result.
js/src/vm/SelfHosting.cpp
- Update to use UniqueChars now that js::DecompileArgument(...) no longer returns char*.
- Drive-by change: Don't atomize the result.
js/src/vm/UbiNodeCensus.cpp
- Make UniqueCString an alias for UniqueChars and then replace js_strdup() with DuplicateString() in ByFilename::count(...).
js/src/vm/SharedImmutableStringsCache.h
- Directly use SpiderMonkey's typedefs for JS::UniqueChars and JS::UniqueTwoByteChars instead of reinventing them.
js/src/vm/TraceLogging.{h,cpp}
- Change TraceLoggerEventPayload constructor to use UniqueChars&&.
- Replace js_strdup() with DuplicateString() in TraceLoggerThreadState::getOrCreateEventPayload() and directly move the result to TraceLoggerEventPayload.
- Update TraceLoggerThreadState::getOrCreateEventPayload() to use JS_smprintf(), so we directly get a UniqueChars result and don't need to compute the char-buffer size.
- Drive-by fix: Change type for line/column information from size_t to uint32_t as a follow-up for bug 1464321.
js/src/shell/js.cpp
- Remove unused methods from AutoCStringVector and update the other methods to take UniqueChars instead of char*.
- And then replace js_strdup() with the version of DuplicateString() which takes a context to properly report oom-errors.
- Replace JS_strdup() with DuplicateString() in SetContextOptions(...), but this time take the contextless DuplicateString() version for consistency with oom-errors from JS_smprintf and because I'm not sure if the JSContext is actually already sufficiently instantiated at this point to report errors.