Allow passing sourceMapUrl when compiling scripts
authoryurys <yurys@chromium.org>
Thu, 5 Mar 2015 13:03:42 +0000 (05:03 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 5 Mar 2015 13:03:57 +0000 (13:03 +0000)
commite33ae81ce1c13f80533d6c997fd39ab7d6609dfc
treeb1fbfd1a3bb4584a983a70867405a584f79f7999
parent1382879f29bd71c36aeda2421e867c4cdd232a0d
Allow passing sourceMapUrl when compiling scripts

According to Source Map specification [1] source map url can be passed either as a magic comment at the end of script or as SourceMap http header. We already parse the former value and expose it on Script object. This change allows to unify the way we deal with source map urls received in http header by providing api for passing that url into the script being compiled.

source_map_url is intentionally not passed into CompilationCacheScript::Lookup. The cache is anyways disabled when debugger is on.

[1] https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit

LOG=Y
BUG=chromium:462572

Review URL: https://codereview.chromium.org/983603003

Cr-Commit-Position: refs/heads/master@{#27017}
include/v8.h
src/api.cc
src/bootstrapper.cc
src/compiler.cc
src/compiler.h
src/debug.cc
test/cctest/compiler/test-linkage.cc
test/cctest/test-api.cc
test/cctest/test-compiler.cc
test/cctest/test-serialize.cc