[V8] Reland https://codereview.chromium.org/1100993003/
Chromium tests were prepared in https://codereview.chromium.org/1118743003/ Blink tests in https://codereview.chromium.org/1115193002/ LOG=Y BUG=chromium:480652 R=yangguo@chromium.org Review URL: https://codereview.chromium.org/1121833003 Cr-Commit-Position: refs/heads/master@{#28229}
This commit is contained in:
parent
367d14d467
commit
19b62e211d
@ -225,6 +225,10 @@ static const byte one_char_tokens[] = {
|
||||
|
||||
|
||||
Token::Value Scanner::Next() {
|
||||
if (next_.token == Token::EOS) {
|
||||
next_.location.beg_pos = current_.location.beg_pos;
|
||||
next_.location.end_pos = current_.location.end_pos;
|
||||
}
|
||||
current_ = next_;
|
||||
has_line_terminator_before_next_ = false;
|
||||
has_multiline_comment_before_next_ = false;
|
||||
|
@ -12565,6 +12565,18 @@ THREADED_TEST(TryCatchSourceInfo) {
|
||||
}
|
||||
|
||||
|
||||
THREADED_TEST(TryCatchSourceInfoForEOSError) {
|
||||
LocalContext context;
|
||||
v8::HandleScope scope(context->GetIsolate());
|
||||
v8::TryCatch try_catch;
|
||||
v8::Script::Compile(v8_str("!\n"));
|
||||
CHECK(try_catch.HasCaught());
|
||||
v8::Handle<v8::Message> message = try_catch.Message();
|
||||
CHECK_EQ(1, message->GetLineNumber());
|
||||
CHECK_EQ(0, message->GetStartColumn());
|
||||
}
|
||||
|
||||
|
||||
THREADED_TEST(CompilationCache) {
|
||||
LocalContext context;
|
||||
v8::HandleScope scope(context->GetIsolate());
|
||||
|
Loading…
Reference in New Issue
Block a user