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

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

Issue 249103002: StringTable::LookupKey() and all callers handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review notes Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/parser.cc ('k') | test/cctest/test-heap.cc » ('j') | 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 17976 matching lines...) Expand 10 before | Expand all | Expand 10 after
17987 env->GetIsolate(), string, v8::String::kInternalizedString); 17987 env->GetIsolate(), string, v8::String::kInternalizedString);
17988 CHECK(string2->MakeExternal(resource[2])); 17988 CHECK(string2->MakeExternal(resource[2]));
17989 17989
17990 // Symbolized External. 17990 // Symbolized External.
17991 resource[3] = new TestResource(AsciiToTwoByteString("Some other string")); 17991 resource[3] = new TestResource(AsciiToTwoByteString("Some other string"));
17992 v8::Local<v8::String> string3 = 17992 v8::Local<v8::String> string3 =
17993 v8::String::NewExternal(env->GetIsolate(), resource[3]); 17993 v8::String::NewExternal(env->GetIsolate(), resource[3]);
17994 CcTest::heap()->CollectAllAvailableGarbage(); // Tenure string. 17994 CcTest::heap()->CollectAllAvailableGarbage(); // Tenure string.
17995 // Turn into a symbol. 17995 // Turn into a symbol.
17996 i::Handle<i::String> string3_i = v8::Utils::OpenHandle(*string3); 17996 i::Handle<i::String> string3_i = v8::Utils::OpenHandle(*string3);
17997 CHECK(!CcTest::heap()->InternalizeString(*string3_i)->IsFailure()); 17997 CHECK(!CcTest::i_isolate()->factory()->InternalizeString(
17998 string3_i).is_null());
17998 CHECK(string3_i->IsInternalizedString()); 17999 CHECK(string3_i->IsInternalizedString());
17999 18000
18000 // We need to add usages for string* to avoid warnings in GCC 4.7 18001 // We need to add usages for string* to avoid warnings in GCC 4.7
18001 CHECK(string0->IsExternal()); 18002 CHECK(string0->IsExternal());
18002 CHECK(string1->IsExternal()); 18003 CHECK(string1->IsExternal());
18003 CHECK(string2->IsExternal()); 18004 CHECK(string2->IsExternal());
18004 CHECK(string3->IsExternal()); 18005 CHECK(string3->IsExternal());
18005 18006
18006 VisitorImpl visitor(resource); 18007 VisitorImpl visitor(resource);
18007 v8::V8::VisitExternalResources(&visitor); 18008 v8::V8::VisitExternalResources(&visitor);
(...skipping 4484 matching lines...) Expand 10 before | Expand all | Expand 10 after
22492 v8::internal::FLAG_stack_size = 150; 22493 v8::internal::FLAG_stack_size = 150;
22493 LocalContext current; 22494 LocalContext current;
22494 v8::Isolate* isolate = current->GetIsolate(); 22495 v8::Isolate* isolate = current->GetIsolate();
22495 v8::HandleScope scope(isolate); 22496 v8::HandleScope scope(isolate);
22496 V8::SetCaptureStackTraceForUncaughtExceptions( 22497 V8::SetCaptureStackTraceForUncaughtExceptions(
22497 true, 10, v8::StackTrace::kDetailed); 22498 true, 10, v8::StackTrace::kDetailed);
22498 v8::TryCatch try_catch; 22499 v8::TryCatch try_catch;
22499 CompileRun("(function f(x) { f(x+1); })(0)"); 22500 CompileRun("(function f(x) { f(x+1); })(0)");
22500 CHECK(try_catch.HasCaught()); 22501 CHECK(try_catch.HasCaught());
22501 } 22502 }
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698