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

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

Issue 265593002: Add v8::Message::GetScriptOrigin() with tests (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 6 years, 6 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/d8.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 4135 matching lines...) Expand 10 before | Expand all | Expand 10 after
4146 Get(v8_str("a"))->Equals(v8_str("b"))); 4146 Get(v8_str("a"))->Equals(v8_str("b")));
4147 } 4147 }
4148 4148
4149 4149
4150 bool message_received; 4150 bool message_received;
4151 4151
4152 4152
4153 static void check_message_0(v8::Handle<v8::Message> message, 4153 static void check_message_0(v8::Handle<v8::Message> message,
4154 v8::Handle<Value> data) { 4154 v8::Handle<Value> data) {
4155 CHECK_EQ(5.76, data->NumberValue()); 4155 CHECK_EQ(5.76, data->NumberValue());
4156 CHECK_EQ(6.75, message->GetScriptResourceName()->NumberValue()); 4156 CHECK_EQ(6.75, message->GetScriptOrigin().ResourceName()->NumberValue());
4157 CHECK(!message->IsSharedCrossOrigin()); 4157 CHECK(!message->IsSharedCrossOrigin());
4158 message_received = true; 4158 message_received = true;
4159 } 4159 }
4160 4160
4161 4161
4162 THREADED_TEST(MessageHandler0) { 4162 THREADED_TEST(MessageHandler0) {
4163 message_received = false; 4163 message_received = false;
4164 v8::HandleScope scope(CcTest::isolate()); 4164 v8::HandleScope scope(CcTest::isolate());
4165 CHECK(!message_received); 4165 CHECK(!message_received);
4166 LocalContext context; 4166 LocalContext context;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
4220 CompileRun("throw error;"); 4220 CompileRun("throw error;");
4221 CHECK(message_received); 4221 CHECK(message_received);
4222 // clear out the message listener 4222 // clear out the message listener
4223 v8::V8::RemoveMessageListeners(check_message_2); 4223 v8::V8::RemoveMessageListeners(check_message_2);
4224 } 4224 }
4225 4225
4226 4226
4227 static void check_message_3(v8::Handle<v8::Message> message, 4227 static void check_message_3(v8::Handle<v8::Message> message,
4228 v8::Handle<Value> data) { 4228 v8::Handle<Value> data) {
4229 CHECK(message->IsSharedCrossOrigin()); 4229 CHECK(message->IsSharedCrossOrigin());
4230 CHECK_EQ(6.75, message->GetScriptResourceName()->NumberValue()); 4230 CHECK_EQ(6.75, message->GetScriptOrigin().ResourceName()->NumberValue());
4231 message_received = true; 4231 message_received = true;
4232 } 4232 }
4233 4233
4234 4234
4235 TEST(MessageHandler3) { 4235 TEST(MessageHandler3) {
4236 message_received = false; 4236 message_received = false;
4237 v8::Isolate* isolate = CcTest::isolate(); 4237 v8::Isolate* isolate = CcTest::isolate();
4238 v8::HandleScope scope(isolate); 4238 v8::HandleScope scope(isolate);
4239 CHECK(!message_received); 4239 CHECK(!message_received);
4240 v8::V8::AddMessageListener(check_message_3); 4240 v8::V8::AddMessageListener(check_message_3);
4241 LocalContext context; 4241 LocalContext context;
4242 v8::ScriptOrigin origin = 4242 v8::ScriptOrigin origin =
4243 v8::ScriptOrigin(v8_str("6.75"), 4243 v8::ScriptOrigin(v8_str("6.75"),
4244 v8::Integer::New(isolate, 1), 4244 v8::Integer::New(isolate, 1),
4245 v8::Integer::New(isolate, 2), 4245 v8::Integer::New(isolate, 2),
4246 v8::True(isolate)); 4246 v8::True(isolate));
4247 v8::Handle<v8::Script> script = Script::Compile(v8_str("throw 'error'"), 4247 v8::Handle<v8::Script> script = Script::Compile(v8_str("throw 'error'"),
4248 &origin); 4248 &origin);
4249 script->Run(); 4249 script->Run();
4250 CHECK(message_received); 4250 CHECK(message_received);
4251 // clear out the message listener 4251 // clear out the message listener
4252 v8::V8::RemoveMessageListeners(check_message_3); 4252 v8::V8::RemoveMessageListeners(check_message_3);
4253 } 4253 }
4254 4254
4255 4255
4256 static void check_message_4(v8::Handle<v8::Message> message, 4256 static void check_message_4(v8::Handle<v8::Message> message,
4257 v8::Handle<Value> data) { 4257 v8::Handle<Value> data) {
4258 CHECK(!message->IsSharedCrossOrigin()); 4258 CHECK(!message->IsSharedCrossOrigin());
4259 CHECK_EQ(6.75, message->GetScriptResourceName()->NumberValue()); 4259 CHECK_EQ(6.75, message->GetScriptOrigin().ResourceName()->NumberValue());
4260 message_received = true; 4260 message_received = true;
4261 } 4261 }
4262 4262
4263 4263
4264 TEST(MessageHandler4) { 4264 TEST(MessageHandler4) {
4265 message_received = false; 4265 message_received = false;
4266 v8::Isolate* isolate = CcTest::isolate(); 4266 v8::Isolate* isolate = CcTest::isolate();
4267 v8::HandleScope scope(isolate); 4267 v8::HandleScope scope(isolate);
4268 CHECK(!message_received); 4268 CHECK(!message_received);
4269 v8::V8::AddMessageListener(check_message_4); 4269 v8::V8::AddMessageListener(check_message_4);
4270 LocalContext context; 4270 LocalContext context;
4271 v8::ScriptOrigin origin = 4271 v8::ScriptOrigin origin =
4272 v8::ScriptOrigin(v8_str("6.75"), 4272 v8::ScriptOrigin(v8_str("6.75"),
4273 v8::Integer::New(isolate, 1), 4273 v8::Integer::New(isolate, 1),
4274 v8::Integer::New(isolate, 2), 4274 v8::Integer::New(isolate, 2),
4275 v8::False(isolate)); 4275 v8::False(isolate));
4276 v8::Handle<v8::Script> script = Script::Compile(v8_str("throw 'error'"), 4276 v8::Handle<v8::Script> script = Script::Compile(v8_str("throw 'error'"),
4277 &origin); 4277 &origin);
4278 script->Run(); 4278 script->Run();
4279 CHECK(message_received); 4279 CHECK(message_received);
4280 // clear out the message listener 4280 // clear out the message listener
4281 v8::V8::RemoveMessageListeners(check_message_4); 4281 v8::V8::RemoveMessageListeners(check_message_4);
4282 } 4282 }
4283 4283
4284 4284
4285 static void check_message_5a(v8::Handle<v8::Message> message, 4285 static void check_message_5a(v8::Handle<v8::Message> message,
4286 v8::Handle<Value> data) { 4286 v8::Handle<Value> data) {
4287 CHECK(message->IsSharedCrossOrigin()); 4287 CHECK(message->IsSharedCrossOrigin());
4288 CHECK_EQ(6.75, message->GetScriptResourceName()->NumberValue()); 4288 CHECK_EQ(6.75, message->GetScriptOrigin().ResourceName()->NumberValue());
4289 message_received = true; 4289 message_received = true;
4290 } 4290 }
4291 4291
4292 4292
4293 static void check_message_5b(v8::Handle<v8::Message> message, 4293 static void check_message_5b(v8::Handle<v8::Message> message,
4294 v8::Handle<Value> data) { 4294 v8::Handle<Value> data) {
4295 CHECK(!message->IsSharedCrossOrigin()); 4295 CHECK(!message->IsSharedCrossOrigin());
4296 CHECK_EQ(6.75, message->GetScriptResourceName()->NumberValue()); 4296 CHECK_EQ(6.75, message->GetScriptOrigin().ResourceName()->NumberValue());
4297 message_received = true; 4297 message_received = true;
4298 } 4298 }
4299 4299
4300 4300
4301 TEST(MessageHandler5) { 4301 TEST(MessageHandler5) {
4302 message_received = false; 4302 message_received = false;
4303 v8::Isolate* isolate = CcTest::isolate(); 4303 v8::Isolate* isolate = CcTest::isolate();
4304 v8::HandleScope scope(isolate); 4304 v8::HandleScope scope(isolate);
4305 CHECK(!message_received); 4305 CHECK(!message_received);
4306 v8::V8::AddMessageListener(check_message_5a); 4306 v8::V8::AddMessageListener(check_message_5a);
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
5332 v8::TryCatch try_catch; 5332 v8::TryCatch try_catch;
5333 TryCatchNestedHelper(5); 5333 TryCatchNestedHelper(5);
5334 CHECK(try_catch.HasCaught()); 5334 CHECK(try_catch.HasCaught());
5335 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(try_catch.Exception()), "back")); 5335 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(try_catch.Exception()), "back"));
5336 } 5336 }
5337 5337
5338 5338
5339 void TryCatchMixedNestingCheck(v8::TryCatch* try_catch) { 5339 void TryCatchMixedNestingCheck(v8::TryCatch* try_catch) {
5340 CHECK(try_catch->HasCaught()); 5340 CHECK(try_catch->HasCaught());
5341 Handle<Message> message = try_catch->Message(); 5341 Handle<Message> message = try_catch->Message();
5342 Handle<Value> resource = message->GetScriptResourceName(); 5342 Handle<Value> resource = message->GetScriptOrigin().ResourceName();
5343 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(resource), "inner")); 5343 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(resource), "inner"));
5344 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(message->Get()), 5344 CHECK_EQ(0, strcmp(*v8::String::Utf8Value(message->Get()),
5345 "Uncaught Error: a")); 5345 "Uncaught Error: a"));
5346 CHECK_EQ(1, message->GetLineNumber()); 5346 CHECK_EQ(1, message->GetLineNumber());
5347 CHECK_EQ(6, message->GetStartColumn()); 5347 CHECK_EQ(6, message->GetStartColumn());
5348 } 5348 }
5349 5349
5350 5350
5351 void TryCatchMixedNestingHelper( 5351 void TryCatchMixedNestingHelper(
5352 const v8::FunctionCallbackInfo<v8::Value>& args) { 5352 const v8::FunctionCallbackInfo<v8::Value>& args) {
(...skipping 1750 matching lines...) Expand 10 before | Expand all | Expand 10 after
7103 v8::ExtensionConfiguration config(1, bDeps); 7103 v8::ExtensionConfiguration config(1, bDeps);
7104 v8::Handle<Context> context = 7104 v8::Handle<Context> context =
7105 Context::New(CcTest::isolate(), &config); 7105 Context::New(CcTest::isolate(), &config);
7106 CHECK(context.IsEmpty()); 7106 CHECK(context.IsEmpty());
7107 CHECK_NE(last_location, NULL); 7107 CHECK_NE(last_location, NULL);
7108 } 7108 }
7109 7109
7110 7110
7111 static void MissingScriptInfoMessageListener(v8::Handle<v8::Message> message, 7111 static void MissingScriptInfoMessageListener(v8::Handle<v8::Message> message,
7112 v8::Handle<Value> data) { 7112 v8::Handle<Value> data) {
7113 CHECK(message->GetScriptResourceName()->IsUndefined()); 7113 CHECK(message->GetScriptOrigin().ResourceName()->IsUndefined());
7114 CHECK_EQ(v8::Undefined(CcTest::isolate()), message->GetScriptResourceName()); 7114 CHECK_EQ(v8::Undefined(CcTest::isolate()),
7115 message->GetScriptOrigin().ResourceName());
7115 message->GetLineNumber(); 7116 message->GetLineNumber();
7116 message->GetSourceLine(); 7117 message->GetSourceLine();
7117 } 7118 }
7118 7119
7119 7120
7120 THREADED_TEST(ErrorWithMissingScriptInfo) { 7121 THREADED_TEST(ErrorWithMissingScriptInfo) {
7121 LocalContext context; 7122 LocalContext context;
7122 v8::HandleScope scope(context->GetIsolate()); 7123 v8::HandleScope scope(context->GetIsolate());
7123 v8::V8::AddMessageListener(MissingScriptInfoMessageListener); 7124 v8::V8::AddMessageListener(MissingScriptInfoMessageListener);
7124 CompileRun("throw Error()"); 7125 CompileRun("throw Error()");
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
8289 Local<Value> trouble_caller = global->Get(v8_str("trouble_caller")); 8290 Local<Value> trouble_caller = global->Get(v8_str("trouble_caller"));
8290 CHECK(trouble_caller->IsFunction()); 8291 CHECK(trouble_caller->IsFunction());
8291 Function::Cast(*trouble_caller)->Call(global, 0, NULL); 8292 Function::Cast(*trouble_caller)->Call(global, 0, NULL);
8292 CHECK_EQ(1, report_count); 8293 CHECK_EQ(1, report_count);
8293 v8::V8::RemoveMessageListeners(ApiUncaughtExceptionTestListener); 8294 v8::V8::RemoveMessageListeners(ApiUncaughtExceptionTestListener);
8294 } 8295 }
8295 8296
8296 static const char* script_resource_name = "ExceptionInNativeScript.js"; 8297 static const char* script_resource_name = "ExceptionInNativeScript.js";
8297 static void ExceptionInNativeScriptTestListener(v8::Handle<v8::Message> message, 8298 static void ExceptionInNativeScriptTestListener(v8::Handle<v8::Message> message,
8298 v8::Handle<Value>) { 8299 v8::Handle<Value>) {
8299 v8::Handle<v8::Value> name_val = message->GetScriptResourceName(); 8300 v8::Handle<v8::Value> name_val = message->GetScriptOrigin().ResourceName();
8300 CHECK(!name_val.IsEmpty() && name_val->IsString()); 8301 CHECK(!name_val.IsEmpty() && name_val->IsString());
8301 v8::String::Utf8Value name(message->GetScriptResourceName()); 8302 v8::String::Utf8Value name(message->GetScriptOrigin().ResourceName());
8302 CHECK_EQ(script_resource_name, *name); 8303 CHECK_EQ(script_resource_name, *name);
8303 CHECK_EQ(3, message->GetLineNumber()); 8304 CHECK_EQ(3, message->GetLineNumber());
8304 v8::String::Utf8Value source_line(message->GetSourceLine()); 8305 v8::String::Utf8Value source_line(message->GetSourceLine());
8305 CHECK_EQ(" new o.foo();", *source_line); 8306 CHECK_EQ(" new o.foo();", *source_line);
8306 } 8307 }
8307 8308
8308 8309
8309 TEST(ExceptionInNativeScript) { 8310 TEST(ExceptionInNativeScript) {
8310 LocalContext env; 8311 LocalContext env;
8311 v8::Isolate* isolate = env->GetIsolate(); 8312 v8::Isolate* isolate = env->GetIsolate();
(...skipping 4674 matching lines...) Expand 10 before | Expand all | Expand 10 after
12986 12987
12987 static void ThrowViaApi(Handle<Message> message, Handle<Value> data) { 12988 static void ThrowViaApi(Handle<Message> message, Handle<Value> data) {
12988 if (--call_depth) CcTest::isolate()->ThrowException(v8_str("ThrowViaApi")); 12989 if (--call_depth) CcTest::isolate()->ThrowException(v8_str("ThrowViaApi"));
12989 } 12990 }
12990 12991
12991 12992
12992 static void WebKitLike(Handle<Message> message, Handle<Value> data) { 12993 static void WebKitLike(Handle<Message> message, Handle<Value> data) {
12993 Handle<String> errorMessageString = message->Get(); 12994 Handle<String> errorMessageString = message->Get();
12994 CHECK(!errorMessageString.IsEmpty()); 12995 CHECK(!errorMessageString.IsEmpty());
12995 message->GetStackTrace(); 12996 message->GetStackTrace();
12996 message->GetScriptResourceName(); 12997 message->GetScriptOrigin().ResourceName();
12997 } 12998 }
12998 12999
12999 13000
13000 THREADED_TEST(ExceptionsDoNotPropagatePastTryCatch) { 13001 THREADED_TEST(ExceptionsDoNotPropagatePastTryCatch) {
13001 LocalContext context; 13002 LocalContext context;
13002 v8::Isolate* isolate = context->GetIsolate(); 13003 v8::Isolate* isolate = context->GetIsolate();
13003 HandleScope scope(isolate); 13004 HandleScope scope(isolate);
13004 13005
13005 Local<Function> func = 13006 Local<Function> func =
13006 FunctionTemplate::New(isolate, 13007 FunctionTemplate::New(isolate,
(...skipping 1375 matching lines...) Expand 10 before | Expand all | Expand 10 after
14382 CHECK(try_catch.HasCaught()); 14383 CHECK(try_catch.HasCaught());
14383 v8::Handle<v8::Message> message = try_catch.Message(); 14384 v8::Handle<v8::Message> message = try_catch.Message();
14384 CHECK(!message.IsEmpty()); 14385 CHECK(!message.IsEmpty());
14385 CHECK_EQ(10 + line_offset, message->GetLineNumber()); 14386 CHECK_EQ(10 + line_offset, message->GetLineNumber());
14386 CHECK_EQ(91, message->GetStartPosition()); 14387 CHECK_EQ(91, message->GetStartPosition());
14387 CHECK_EQ(92, message->GetEndPosition()); 14388 CHECK_EQ(92, message->GetEndPosition());
14388 CHECK_EQ(2, message->GetStartColumn()); 14389 CHECK_EQ(2, message->GetStartColumn());
14389 CHECK_EQ(3, message->GetEndColumn()); 14390 CHECK_EQ(3, message->GetEndColumn());
14390 v8::String::Utf8Value line(message->GetSourceLine()); 14391 v8::String::Utf8Value line(message->GetSourceLine());
14391 CHECK_EQ(" throw 'nirk';", *line); 14392 CHECK_EQ(" throw 'nirk';", *line);
14392 v8::String::Utf8Value name(message->GetScriptResourceName()); 14393 v8::String::Utf8Value name(message->GetScriptOrigin().ResourceName());
14393 CHECK_EQ(resource_name, *name); 14394 CHECK_EQ(resource_name, *name);
14394 } 14395 }
14395 14396
14396 14397
14397 THREADED_TEST(TryCatchSourceInfo) { 14398 THREADED_TEST(TryCatchSourceInfo) {
14398 LocalContext context; 14399 LocalContext context;
14399 v8::HandleScope scope(context->GetIsolate()); 14400 v8::HandleScope scope(context->GetIsolate());
14400 v8::Local<v8::String> source = v8_str( 14401 v8::Local<v8::String> source = v8_str(
14401 "function Foo() {\n" 14402 "function Foo() {\n"
14402 " return Bar();\n" 14403 " return Bar();\n"
(...skipping 3255 matching lines...) Expand 10 before | Expand all | Expand 10 after
17658 i::ScopedVector<char> code(1024); 17659 i::ScopedVector<char> code(1024);
17659 i::OS::SNPrintF(code, source, "//# sourceURL=source_url"); 17660 i::OS::SNPrintF(code, source, "//# sourceURL=source_url");
17660 v8::TryCatch try_catch; 17661 v8::TryCatch try_catch;
17661 CompileRunWithOrigin(code.start(), "", 0, 0); 17662 CompileRunWithOrigin(code.start(), "", 0, 0);
17662 CHECK(try_catch.HasCaught()); 17663 CHECK(try_catch.HasCaught());
17663 v8::String::Utf8Value stack(try_catch.StackTrace()); 17664 v8::String::Utf8Value stack(try_catch.StackTrace());
17664 CHECK(strstr(*stack, "at foo (source_url:3:5)") != NULL); 17665 CHECK(strstr(*stack, "at foo (source_url:3:5)") != NULL);
17665 } 17666 }
17666 17667
17667 17668
17669 TEST(EvalWithSourceURLInMessageScriptResourceNameOrSourceURL) {
17670 LocalContext context;
17671 v8::HandleScope scope(context->GetIsolate());
17672
17673 const char *source =
17674 "function outer() {\n"
17675 " var scriptContents = \"function foo() { FAIL.FAIL; }\\\n"
17676 " //# sourceURL=source_url\";\n"
17677 " eval(scriptContents);\n"
17678 " foo(); }\n"
17679 "outer();\n"
17680 "//# sourceURL=outer_url";
17681
17682 v8::TryCatch try_catch;
17683 CompileRun(source);
17684 CHECK(try_catch.HasCaught());
17685
17686 Local<v8::Message> message = try_catch.Message();
17687 Handle<Value> sourceURL =
17688 message->GetScriptOrigin().ResourceName();
17689 CHECK_EQ(*v8::String::Utf8Value(sourceURL), "source_url");
17690 }
17691
17692
17693 TEST(RecursionWithSourceURLInMessageScriptResourceNameOrSourceURL) {
17694 LocalContext context;
17695 v8::HandleScope scope(context->GetIsolate());
17696
17697 const char *source =
17698 "function outer() {\n"
17699 " var scriptContents = \"function boo(){ boo(); }\\\n"
17700 " //# sourceURL=source_url\";\n"
17701 " eval(scriptContents);\n"
17702 " boo(); }\n"
17703 "outer();\n"
17704 "//# sourceURL=outer_url";
17705
17706 v8::TryCatch try_catch;
17707 CompileRun(source);
17708 CHECK(try_catch.HasCaught());
17709
17710 Local<v8::Message> message = try_catch.Message();
17711 Handle<Value> sourceURL =
17712 message->GetScriptOrigin().ResourceName();
17713 CHECK_EQ(*v8::String::Utf8Value(sourceURL), "source_url");
17714 }
17715
17716
17668 static void CreateGarbageInOldSpace() { 17717 static void CreateGarbageInOldSpace() {
17669 i::Factory* factory = CcTest::i_isolate()->factory(); 17718 i::Factory* factory = CcTest::i_isolate()->factory();
17670 v8::HandleScope scope(CcTest::isolate()); 17719 v8::HandleScope scope(CcTest::isolate());
17671 i::AlwaysAllocateScope always_allocate(CcTest::i_isolate()); 17720 i::AlwaysAllocateScope always_allocate(CcTest::i_isolate());
17672 for (int i = 0; i < 1000; i++) { 17721 for (int i = 0; i < 1000; i++) {
17673 factory->NewFixedArray(1000, i::TENURED); 17722 factory->NewFixedArray(1000, i::TENURED);
17674 } 17723 }
17675 } 17724 }
17676 17725
17677 17726
(...skipping 4994 matching lines...) Expand 10 before | Expand all | Expand 10 after
22672 Local<Script> script = v8::ScriptCompiler::Compile( 22721 Local<Script> script = v8::ScriptCompiler::Compile(
22673 isolate, &script_source); 22722 isolate, &script_source);
22674 Local<Value> script_name = script->GetUnboundScript()->GetScriptName(); 22723 Local<Value> script_name = script->GetUnboundScript()->GetScriptName();
22675 CHECK(!script_name.IsEmpty()); 22724 CHECK(!script_name.IsEmpty());
22676 CHECK(script_name->IsString()); 22725 CHECK(script_name->IsString());
22677 String::Utf8Value utf8_name(script_name); 22726 String::Utf8Value utf8_name(script_name);
22678 CHECK_EQ(url, *utf8_name); 22727 CHECK_EQ(url, *utf8_name);
22679 int line_number = script->GetUnboundScript()->GetLineNumber(0); 22728 int line_number = script->GetUnboundScript()->GetLineNumber(0);
22680 CHECK_EQ(13, line_number); 22729 CHECK_EQ(13, line_number);
22681 } 22730 }
OLDNEW
« no previous file with comments | « src/d8.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698