Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: test/cctest/test-api.cc

Issue 1116233004: Revert of [V8] Use previous token location as EOS token location (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/scanner.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 12535 matching lines...) Expand 10 before | Expand all | Expand 10 after
12546 12546
12547 resource_name = "test2.js"; 12547 resource_name = "test2.js";
12548 v8::ScriptOrigin origin2( 12548 v8::ScriptOrigin origin2(
12549 v8::String::NewFromUtf8(context->GetIsolate(), resource_name), 12549 v8::String::NewFromUtf8(context->GetIsolate(), resource_name),
12550 v8::Integer::New(context->GetIsolate(), 7)); 12550 v8::Integer::New(context->GetIsolate(), 7));
12551 script = v8::Script::Compile(source, &origin2); 12551 script = v8::Script::Compile(source, &origin2);
12552 CheckTryCatchSourceInfo(script, resource_name, 7); 12552 CheckTryCatchSourceInfo(script, resource_name, 7);
12553 } 12553 }
12554 12554
12555 12555
12556 THREADED_TEST(TryCatchSourceInfoForEOSError) {
12557 LocalContext context;
12558 v8::HandleScope scope(context->GetIsolate());
12559 v8::TryCatch try_catch;
12560 v8::Script::Compile(v8_str("!\n"));
12561 CHECK(try_catch.HasCaught());
12562 v8::Handle<v8::Message> message = try_catch.Message();
12563 CHECK_EQ(1, message->GetLineNumber());
12564 CHECK_EQ(0, message->GetStartColumn());
12565 }
12566
12567
12568 THREADED_TEST(CompilationCache) { 12556 THREADED_TEST(CompilationCache) {
12569 LocalContext context; 12557 LocalContext context;
12570 v8::HandleScope scope(context->GetIsolate()); 12558 v8::HandleScope scope(context->GetIsolate());
12571 v8::Handle<v8::String> source0 = 12559 v8::Handle<v8::String> source0 =
12572 v8::String::NewFromUtf8(context->GetIsolate(), "1234"); 12560 v8::String::NewFromUtf8(context->GetIsolate(), "1234");
12573 v8::Handle<v8::String> source1 = 12561 v8::Handle<v8::String> source1 =
12574 v8::String::NewFromUtf8(context->GetIsolate(), "1234"); 12562 v8::String::NewFromUtf8(context->GetIsolate(), "1234");
12575 v8::Handle<v8::Script> script0 = CompileWithOrigin(source0, "test.js"); 12563 v8::Handle<v8::Script> script0 = CompileWithOrigin(source0, "test.js");
12576 v8::Handle<v8::Script> script1 = CompileWithOrigin(source1, "test.js"); 12564 v8::Handle<v8::Script> script1 = CompileWithOrigin(source1, "test.js");
12577 v8::Handle<v8::Script> script2 = 12565 v8::Handle<v8::Script> script2 =
(...skipping 8406 matching lines...) Expand 10 before | Expand all | Expand 10 after
20984 20972
20985 { 20973 {
20986 v8::HandleScope handle_scope(isolate); 20974 v8::HandleScope handle_scope(isolate);
20987 20975
20988 // Should work 20976 // Should work
20989 v8::Local<v8::Object> obj = v8::Object::New(isolate); 20977 v8::Local<v8::Object> obj = v8::Object::New(isolate);
20990 20978
20991 USE(obj); 20979 USE(obj);
20992 } 20980 }
20993 } 20981 }
OLDNEW
« no previous file with comments | « src/scanner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698