Merge 4f46ae2b16 into 0f80b1058d
This commit is contained in:
commit
8aa856e918
|
|
@ -53,10 +53,7 @@ function SourceMap(options) {
|
||||||
orig_line_diff : 0,
|
orig_line_diff : 0,
|
||||||
dest_line_diff : 0,
|
dest_line_diff : 0,
|
||||||
});
|
});
|
||||||
var generator = new MOZ_SourceMap.SourceMapGenerator({
|
var generator;
|
||||||
file : options.file,
|
|
||||||
sourceRoot : options.root
|
|
||||||
});
|
|
||||||
var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig);
|
var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig);
|
||||||
function add(source, gen_line, gen_col, orig_line, orig_col, name) {
|
function add(source, gen_line, gen_col, orig_line, orig_col, name) {
|
||||||
if (orig_map) {
|
if (orig_map) {
|
||||||
|
|
@ -78,7 +75,15 @@ function SourceMap(options) {
|
||||||
source : source,
|
source : source,
|
||||||
name : name
|
name : name
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
if (orig_map) {
|
||||||
|
generator = MOZ_SourceMap.SourceMapGenerator.fromSourceMap(orig_map);
|
||||||
|
} else {
|
||||||
|
generator = new MOZ_SourceMap.SourceMapGenerator({
|
||||||
|
file : options.file,
|
||||||
|
sourceRoot : options.root
|
||||||
|
});
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
add : add,
|
add : add,
|
||||||
get : function() { return generator },
|
get : function() { return generator },
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user