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

Side by Side Diff: patch

Issue 2104143004: Remove accidentally added files. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | « buffer ('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
(Empty)
1 diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
2 index 5624e3f..81936c1 100644
3 --- a/test/cctest/test-api.cc
4 +++ b/test/cctest/test-api.cc
5 @@ -17049,6 +17049,43 @@ TEST(CaptureStackTraceForUncaughtExceptionAndSetters) {
6 }
7
8
9 +static void StackTraceFunctionNameListenerForEval(v8::Local<v8::Message> messag e,
10 + v8::Local<Value>) {
11 + v8::Local<v8::StackTrace> stack_trace = message->GetStackTrace();
12 + for (int i = 0; i < stack_trace->GetFrameCount(); i++) {
13 + v8::Local<v8::StackFrame> frame = stack_trace->GetFrame(i);
14 + v8::String::Utf8Value func_name(frame->GetFunctionName());
15 + v8::String::Utf8Value script_name(frame->GetScriptName());
16 + printf("%s:%s, %d,%d\n", *script_name, *func_name, frame->GetLineNumber(), frame->GetColumn());
17 + }
18 +
19 +
20 + CHECK_EQ(5, stack_trace->GetFrameCount());
21 + checkStackFrame("origin", "foo:0", 4, 7, false, false,
22 + stack_trace->GetFrame(0));
23 + checkStackFrame("origin", "foo:1", 5, 27, false, false,
24 + stack_trace->GetFrame(1));
25 + checkStackFrame("origin", "foo", 5, 27, false, false,
26 + stack_trace->GetFrame(2));
27 + checkStackFrame("origin", "foo", 5, 27, false, false,
28 + stack_trace->GetFrame(3));
29 + checkStackFrame("origin", "", 1, 14, false, false, stack_trace->GetFrame(4));
30 +}
31 +
32 +
33 +TEST(CaptureStackTraceForUncaughtExceptionInEval) {
34 + LocalContext env;
35 + v8::Isolate* isolate = env->GetIsolate();
36 + v8::HandleScope scope(isolate);
37 + isolate->SetCaptureStackTraceForUncaughtExceptions(true, 1024,
38 + v8::StackTrace::kDetailed) ;
39 + isolate->AddMessageListener(StackTraceFunctionNameListenerForEval);
40 +
41 + CompileRun("eval('throw new Error()');");
42 + isolate->SetCaptureStackTraceForUncaughtExceptions(false);
43 +}
44 +
45 +
46 static void StackTraceFunctionNameListener(v8::Local<v8::Message> message,
47 v8::Local<Value>) {
48 v8::Local<v8::StackTrace> stack_trace = message->GetStackTrace();
OLDNEW
« no previous file with comments | « buffer ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698