Commit c1e5f005 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/1474543005

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