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

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

Issue 2037001: Use Int32Value() instead of ToNumber()->Value() in test-api.cc.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2007-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 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 9596 matching lines...) Expand 10 before | Expand all | Expand 10 after
9607 9607
9608 9608
9609 v8::Handle<Value> AnalyzeStackInNativeCode(const v8::Arguments& args) { 9609 v8::Handle<Value> AnalyzeStackInNativeCode(const v8::Arguments& args) {
9610 v8::HandleScope scope; 9610 v8::HandleScope scope;
9611 const char* origin = "capture-stack-trace-test"; 9611 const char* origin = "capture-stack-trace-test";
9612 const int kOverviewTest = 1; 9612 const int kOverviewTest = 1;
9613 const int kDetailedTest = 2; 9613 const int kDetailedTest = 2;
9614 9614
9615 ASSERT(args.Length() == 1); 9615 ASSERT(args.Length() == 1);
9616 9616
9617 int testGroup = args[0]->ToNumber()->Value(); 9617 int testGroup = args[0]->Int32Value();
9618 if (testGroup == kOverviewTest) { 9618 if (testGroup == kOverviewTest) {
9619 v8::Handle<v8::StackTrace> stackTrace = 9619 v8::Handle<v8::StackTrace> stackTrace =
9620 v8::StackTrace::CurrentStackTrace(10, v8::StackTrace::kOverview); 9620 v8::StackTrace::CurrentStackTrace(10, v8::StackTrace::kOverview);
9621 CHECK_EQ(4, stackTrace->GetFrameCount()); 9621 CHECK_EQ(4, stackTrace->GetFrameCount());
9622 checkStackFrame(origin, "bar", 2, 10, false, false, 9622 checkStackFrame(origin, "bar", 2, 10, false, false,
9623 stackTrace->GetFrame(0)); 9623 stackTrace->GetFrame(0));
9624 checkStackFrame(origin, "foo", 6, 3, false, false, 9624 checkStackFrame(origin, "foo", 6, 3, false, false,
9625 stackTrace->GetFrame(1)); 9625 stackTrace->GetFrame(1));
9626 checkStackFrame(NULL, "", 1, 1, false, false, 9626 checkStackFrame(NULL, "", 1, 1, false, false,
9627 stackTrace->GetFrame(2)); 9627 stackTrace->GetFrame(2));
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
10257 CHECK_EQ(2, prologue_call_count_second); 10257 CHECK_EQ(2, prologue_call_count_second);
10258 CHECK_EQ(2, epilogue_call_count_second); 10258 CHECK_EQ(2, epilogue_call_count_second);
10259 v8::V8::RemoveGCPrologueCallback(PrologueCallbackSecond); 10259 v8::V8::RemoveGCPrologueCallback(PrologueCallbackSecond);
10260 v8::V8::RemoveGCEpilogueCallback(EpilogueCallbackSecond); 10260 v8::V8::RemoveGCEpilogueCallback(EpilogueCallbackSecond);
10261 i::Heap::CollectAllGarbage(false); 10261 i::Heap::CollectAllGarbage(false);
10262 CHECK_EQ(2, prologue_call_count); 10262 CHECK_EQ(2, prologue_call_count);
10263 CHECK_EQ(2, epilogue_call_count); 10263 CHECK_EQ(2, epilogue_call_count);
10264 CHECK_EQ(2, prologue_call_count_second); 10264 CHECK_EQ(2, prologue_call_count_second);
10265 CHECK_EQ(2, epilogue_call_count_second); 10265 CHECK_EQ(2, epilogue_call_count_second);
10266 } 10266 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698