diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-04-05 20:54:29 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-04-05 20:54:29 +0200 |
commit | 8bbd0d556c0bf583b16076844b9e263a5f996495 (patch) | |
tree | c99321586e367572d2dc534a99f6aaeb486e0928 /js/src/frontend/BytecodeEmitter.cpp | |
parent | c3b63b831cd2c64700e875b28540212c7c881ac6 (diff) | |
download | UXP-8bbd0d556c0bf583b16076844b9e263a5f996495.tar UXP-8bbd0d556c0bf583b16076844b9e263a5f996495.tar.gz UXP-8bbd0d556c0bf583b16076844b9e263a5f996495.tar.lz UXP-8bbd0d556c0bf583b16076844b9e263a5f996495.tar.xz UXP-8bbd0d556c0bf583b16076844b9e263a5f996495.zip |
Split Parser::report into Parser::zeport (a temporary name) that uses
the current offset, and Parser::reportWithNode that derives it from a
Node.
Diffstat (limited to 'js/src/frontend/BytecodeEmitter.cpp')
-rw-r--r-- | js/src/frontend/BytecodeEmitter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp index c5e62ae34..71289e84a 100644 --- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -3559,9 +3559,11 @@ BytecodeEmitter::maybeSetSourceMap() if (parser->options().sourceMapURL()) { // Warn about the replacement, but use the new one. if (parser->ss->hasSourceMapURL()) { - if(!parser->report(ParseWarning, false, nullptr, JSMSG_ALREADY_HAS_PRAGMA, - parser->ss->filename(), "//# sourceMappingURL")) + if (!parser->reportNoOffset(ParseWarning, false, JSMSG_ALREADY_HAS_PRAGMA, + parser->ss->filename(), "//# sourceMappingURL")) + { return false; + } } if (!parser->ss->setSourceMapURL(cx, parser->options().sourceMapURL())) |