| OLD | NEW | 
|---|
| 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 12552 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 12563 | 12563 | 
| 12564   resource_name = "test2.js"; | 12564   resource_name = "test2.js"; | 
| 12565   v8::ScriptOrigin origin2( | 12565   v8::ScriptOrigin origin2( | 
| 12566       v8::String::NewFromUtf8(context->GetIsolate(), resource_name), | 12566       v8::String::NewFromUtf8(context->GetIsolate(), resource_name), | 
| 12567       v8::Integer::New(context->GetIsolate(), 7)); | 12567       v8::Integer::New(context->GetIsolate(), 7)); | 
| 12568   script = v8::Script::Compile(source, &origin2); | 12568   script = v8::Script::Compile(source, &origin2); | 
| 12569   CheckTryCatchSourceInfo(script, resource_name, 7); | 12569   CheckTryCatchSourceInfo(script, resource_name, 7); | 
| 12570 } | 12570 } | 
| 12571 | 12571 | 
| 12572 | 12572 | 
|  | 12573 THREADED_TEST(TryCatchSourceInfoForEOSError) { | 
|  | 12574   LocalContext context; | 
|  | 12575   v8::HandleScope scope(context->GetIsolate()); | 
|  | 12576   v8::TryCatch try_catch; | 
|  | 12577   v8::Script::Compile(v8_str("!\n")); | 
|  | 12578   CHECK(try_catch.HasCaught()); | 
|  | 12579   v8::Handle<v8::Message> message = try_catch.Message(); | 
|  | 12580   CHECK_EQ(1, message->GetLineNumber()); | 
|  | 12581   CHECK_EQ(0, message->GetStartColumn()); | 
|  | 12582 } | 
|  | 12583 | 
|  | 12584 | 
| 12573 THREADED_TEST(CompilationCache) { | 12585 THREADED_TEST(CompilationCache) { | 
| 12574   LocalContext context; | 12586   LocalContext context; | 
| 12575   v8::HandleScope scope(context->GetIsolate()); | 12587   v8::HandleScope scope(context->GetIsolate()); | 
| 12576   v8::Handle<v8::String> source0 = | 12588   v8::Handle<v8::String> source0 = | 
| 12577       v8::String::NewFromUtf8(context->GetIsolate(), "1234"); | 12589       v8::String::NewFromUtf8(context->GetIsolate(), "1234"); | 
| 12578   v8::Handle<v8::String> source1 = | 12590   v8::Handle<v8::String> source1 = | 
| 12579       v8::String::NewFromUtf8(context->GetIsolate(), "1234"); | 12591       v8::String::NewFromUtf8(context->GetIsolate(), "1234"); | 
| 12580   v8::Handle<v8::Script> script0 = CompileWithOrigin(source0, "test.js"); | 12592   v8::Handle<v8::Script> script0 = CompileWithOrigin(source0, "test.js"); | 
| 12581   v8::Handle<v8::Script> script1 = CompileWithOrigin(source1, "test.js"); | 12593   v8::Handle<v8::Script> script1 = CompileWithOrigin(source1, "test.js"); | 
| 12582   v8::Handle<v8::Script> script2 = | 12594   v8::Handle<v8::Script> script2 = | 
| (...skipping 8427 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 21010 | 21022 | 
| 21011   { | 21023   { | 
| 21012     v8::HandleScope handle_scope(isolate); | 21024     v8::HandleScope handle_scope(isolate); | 
| 21013 | 21025 | 
| 21014     // Should work | 21026     // Should work | 
| 21015     v8::Local<v8::Object> obj = v8::Object::New(isolate); | 21027     v8::Local<v8::Object> obj = v8::Object::New(isolate); | 
| 21016 | 21028 | 
| 21017     USE(obj); | 21029     USE(obj); | 
| 21018   } | 21030   } | 
| 21019 } | 21031 } | 
| OLD | NEW | 
|---|