| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index d882c1e69d9ecff0c360bf38febc05bef241ce2c..3adb6d26cdc1b0e1c73b259dea8e6b9201f21184 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -895,6 +895,9 @@ FunctionLiteral* Parser::DoParseProgram(CompilationInfo* info,
|
| bool ok = true;
|
| int beg_pos = scanner()->location().beg_pos;
|
| ParseSourceElements(body, Token::EOS, info->is_eval(), true, &ok);
|
| +
|
| + HandleSourceURLComments();
|
| +
|
| if (ok && strict_mode() == STRICT) {
|
| CheckOctalLiteral(beg_pos, scanner()->location().end_pos, &ok);
|
| }
|
| @@ -3882,6 +3885,18 @@ void Parser::RegisterTargetUse(Label* target, Target* stop) {
|
| }
|
|
|
|
|
| +void Parser::HandleSourceURLComments() {
|
| + if (scanner_.source_url()->length() > 0) {
|
| + info_->script()->set_source_url(
|
| + *scanner_.source_url()->Internalize(isolate()));
|
| + }
|
| + if (scanner_.source_mapping_url()->length() > 0) {
|
| + info_->script()->set_source_mapping_url(
|
| + *scanner_.source_mapping_url()->Internalize(isolate()));
|
| + }
|
| +}
|
| +
|
| +
|
| void Parser::ThrowPendingError() {
|
| ASSERT(ast_value_factory_->IsInternalized());
|
| if (has_pending_error_) {
|
|
|