Commit cab2512a authored by kozyatinskiy's avatar kozyatinskiy Committed by Commit bot

Removed support deprecated (//@|/*@) source(URL|MappingURL)=

LOG=Y
BUG=chromium:558998
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#32528}
parent a6ed24d6
......@@ -1604,8 +1604,7 @@ class V8_EXPORT StackFrame {
/**
* Returns the name of the resource that contains the script for the
* function for this StackFrame or sourceURL value if the script name
* is undefined and its source ends with //# sourceURL=... string or
* deprecated //@ sourceURL=... string.
* is undefined and its source ends with //# sourceURL=... string.
*/
Local<String> GetScriptNameOrSourceURL() const;
......
......@@ -448,11 +448,10 @@ function ScriptLineEnd(n) {
* If sourceURL comment is available returns sourceURL comment contents.
* Otherwise, script name is returned. See
* http://fbug.googlecode.com/svn/branches/firebug1.1/docs/ReleaseNotes_1.1.txt
* and Source Map Revision 3 proposal for details on using //# sourceURL and
* deprecated //@ sourceURL comment to identify scripts that don't have name.
* and Source Map Revision 3 proposal for details on using //# sourceURL
* comment to identify scripts that don't have name.
*
* @return {?string} script name if present, value for //# sourceURL or
* deprecated //@ sourceURL comment otherwise.
* @return {?string} script name if present, value for //# sourceURL comment.
*/
function ScriptNameOrSourceURL() {
if (this.source_url) return this.source_url;
......
......@@ -356,7 +356,7 @@ Token::Value Scanner::SkipSourceURLComment() {
void Scanner::TryToParseSourceURLComment() {
// Magic comments are of the form: //[#@]\s<name>=\s*<value>\s*.* and this
// Magic comments are of the form: //[#]\s<name>=\s*<value>\s*.* and this
// function will just return if it cannot parse a magic comment.
if (c0_ < 0 || !unicode_cache_->IsWhiteSpace(c0_)) return;
Advance();
......@@ -574,7 +574,7 @@ void Scanner::Scan() {
Advance();
if (c0_ == '/') {
Advance();
if (c0_ == '@' || c0_ == '#') {
if (c0_ == '#') {
Advance();
token = SkipSourceURLComment();
} else {
......
......@@ -16794,8 +16794,6 @@ TEST(SourceURLInStackTrace) {
i::ScopedVector<char> code(1024);
i::SNPrintF(code, source, "//# sourceURL=eval_url");
CHECK(CompileRun(code.start())->IsUndefined());
i::SNPrintF(code, source, "//@ sourceURL=eval_url");
CHECK(CompileRun(code.start())->IsUndefined());
}
......@@ -16876,8 +16874,6 @@ TEST(InlineScriptWithSourceURLInStackTrace) {
i::ScopedVector<char> code(1024);
i::SNPrintF(code, source, "//# sourceURL=source_url");
CHECK(CompileRunWithOrigin(code.start(), "url", 0, 1)->IsUndefined());
i::SNPrintF(code, source, "//@ sourceURL=source_url");
CHECK(CompileRunWithOrigin(code.start(), "url", 0, 1)->IsUndefined());
}
......@@ -16922,8 +16918,6 @@ TEST(DynamicWithSourceURLInStackTrace) {
i::ScopedVector<char> code(1024);
i::SNPrintF(code, source, "//# sourceURL=source_url");
CHECK(CompileRunWithOrigin(code.start(), "url", 0, 0)->IsUndefined());
i::SNPrintF(code, source, "//@ sourceURL=source_url");
CHECK(CompileRunWithOrigin(code.start(), "url", 0, 0)->IsUndefined());
}
......
......@@ -86,9 +86,9 @@ test(test1, 58);
test(test2, 65);
test(test3, 72);
eval(test1.toString() + "//@ sourceUrl=foo");
eval(test2.toString() + "//@ sourceUrl=foo");
eval(test3.toString() + "//@ sourceUrl=foo");
eval(test1.toString() + "//# sourceUrl=foo");
eval(test2.toString() + "//# sourceUrl=foo");
eval(test3.toString() + "//# sourceUrl=foo");
test(test1, 2);
test(test2, 3);
......
......@@ -15,20 +15,20 @@ function test(expectation, f) {
/*
(function() {
1 + reference_error //@ sourceURL=evaltest
1 + reference_error //# sourceURL=evaltest
})
*/
test("2:5", new Function(
'1 + reference_error //@ sourceURL=evaltest'));
'1 + reference_error //# sourceURL=evaltest'));
/*
(function(x
/\**\/) {
1 + reference_error //@ sourceURL=evaltest
1 + reference_error //# sourceURL=evaltest
})
*/
test("4:6", new Function(
'x', '\n 1 + reference_error //@ sourceURL=evaltest'));
'x', '\n 1 + reference_error //# sourceURL=evaltest'));
/*
(function(x
......@@ -36,24 +36,24 @@ test("4:6", new Function(
,y
/\**\/) {
1 + reference_error //@ sourceURL=evaltest
1 + reference_error //# sourceURL=evaltest
})
*/
test("7:6", new Function(
'x\n\n', "z//\n", "y", '\n 1 + reference_error //@ sourceURL=evaltest'));
'x\n\n', "z//\n", "y", '\n 1 + reference_error //# sourceURL=evaltest'));
/*
(function(x/\*,z//
,y*\/
/\**\/) {
1 + reference_error //@ sourceURL=evaltest
1 + reference_error //# sourceURL=evaltest
})
*/
test("4:5", new Function(
'x/*', "z//\n", "y*/", '1 + reference_error //@ sourceURL=evaltest'));
'x/*', "z//\n", "y*/", '1 + reference_error //# sourceURL=evaltest'));
/*
(function () {
1 + reference_error //@ sourceURL=evaltest5
1 + reference_error //# sourceURL=evaltest5
})
*/
test("2:6", eval(
'(function () {\n 1 + reference_error //@ sourceURL=evaltest\n})'));
'(function () {\n 1 + reference_error //# sourceURL=evaltest\n})'));
......@@ -29,7 +29,7 @@ function install() {
eval("this.dynamic = function dynamic() { \n" +
" print(\"> dynamic\"); // Break\n" +
"}\n" +
"//@ sourceURL=dynamicScript");
"//# sourceURL=dynamicScript");
}
install();
......@@ -53,4 +53,4 @@ Debug.setListener(null);
assertNull(exception);
assertEquals(2, break_count);
//@ sourceURL=staticScript
//# sourceURL=staticScript
......@@ -8,7 +8,7 @@ var source =
"var foo = function foo() {\n" +
" return 1;\n" +
"}\n" +
"//@ sourceURL=test";
"//# sourceURL=test";
Debug = debug.Debug;
Debug.setListener(listener);
......
......@@ -69,7 +69,7 @@ function testEvalWithSourceURL() {
function testNestedEvalWithSourceURL() {
var x = "FAIL";
var innerEval = 'function Inner() { eval(x); }\n//@ sourceURL=res://inner-eval';
var innerEval = 'function Inner() { eval(x); }\n//# sourceURL=res://inner-eval';
eval("function Outer() { eval(innerEval); Inner(); }; Outer();\n//# sourceURL=res://outer-eval");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment