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

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

Issue 1044173002: [V8] Don't ignore sourceURL comment in inline scripts in .stack (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/messages.js ('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 15681 matching lines...) Expand 10 before | Expand all | Expand 10 after
15692 } 15692 }
15693 } 15693 }
15694 15694
15695 15695
15696 void AnalyzeStackOfInlineScriptWithSourceURL( 15696 void AnalyzeStackOfInlineScriptWithSourceURL(
15697 const v8::FunctionCallbackInfo<v8::Value>& args) { 15697 const v8::FunctionCallbackInfo<v8::Value>& args) {
15698 v8::HandleScope scope(args.GetIsolate()); 15698 v8::HandleScope scope(args.GetIsolate());
15699 v8::Handle<v8::StackTrace> stackTrace = v8::StackTrace::CurrentStackTrace( 15699 v8::Handle<v8::StackTrace> stackTrace = v8::StackTrace::CurrentStackTrace(
15700 args.GetIsolate(), 10, v8::StackTrace::kDetailed); 15700 args.GetIsolate(), 10, v8::StackTrace::kDetailed);
15701 CHECK_EQ(4, stackTrace->GetFrameCount()); 15701 CHECK_EQ(4, stackTrace->GetFrameCount());
15702 v8::Handle<v8::String> url = v8_str("url"); 15702 v8::Handle<v8::String> url = v8_str("source_url");
15703 for (int i = 0; i < 3; i++) { 15703 for (int i = 0; i < 3; i++) {
15704 v8::Handle<v8::String> name = 15704 v8::Handle<v8::String> name =
15705 stackTrace->GetFrame(i)->GetScriptNameOrSourceURL(); 15705 stackTrace->GetFrame(i)->GetScriptNameOrSourceURL();
15706 CHECK(!name.IsEmpty()); 15706 CHECK(!name.IsEmpty());
15707 CHECK(url->Equals(name)); 15707 CHECK(url->Equals(name));
15708 } 15708 }
15709 } 15709 }
15710 15710
15711 15711
15712 TEST(InlineScriptWithSourceURLInStackTrace) { 15712 TEST(InlineScriptWithSourceURLInStackTrace) {
(...skipping 6060 matching lines...) Expand 10 before | Expand all | Expand 10 after
21773 } 21773 }
21774 { 21774 {
21775 v8::TryCatch try_catch; 21775 v8::TryCatch try_catch;
21776 uint16_t* data = reinterpret_cast<uint16_t*>(buffer); 21776 uint16_t* data = reinterpret_cast<uint16_t*>(buffer);
21777 CHECK(v8::String::NewFromTwoByte(isolate, data, v8::String::kNormalString, 21777 CHECK(v8::String::NewFromTwoByte(isolate, data, v8::String::kNormalString,
21778 length).IsEmpty()); 21778 length).IsEmpty());
21779 CHECK(!try_catch.HasCaught()); 21779 CHECK(!try_catch.HasCaught());
21780 } 21780 }
21781 free(buffer); 21781 free(buffer);
21782 } 21782 }
OLDNEW
« no previous file with comments | « src/messages.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698