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

Unified Diff: test/cctest/test-parsing.cc

Issue 14793004: deprecate Context::New which returns Persistent (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: use Reset instead of operator= Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-log.cc ('k') | test/cctest/test-profile-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index f74c0799b4f52ae5680e301eae61baa0aee0a884..05fea0bbb617ba0a9b06f140f8a144df122fd712 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -176,9 +176,10 @@ class ScriptResource : public v8::String::ExternalAsciiStringResource {
TEST(Preparsing) {
- v8::HandleScope handles(v8::Isolate::GetCurrent());
- v8::Persistent<v8::Context> context = v8::Context::New();
- v8::Context::Scope context_scope(v8::Isolate::GetCurrent(), context);
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ v8::HandleScope handles(isolate);
+ v8::Local<v8::Context> context = v8::Context::New(isolate);
+ v8::Context::Scope context_scope(context);
int marker;
i::Isolate::Current()->stack_guard()->SetStackLimit(
reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
@@ -542,9 +543,10 @@ void TestCharacterStream(const char* ascii_source,
TEST(CharacterStreams) {
- v8::HandleScope handles(v8::Isolate::GetCurrent());
- v8::Persistent<v8::Context> context = v8::Context::New();
- v8::Context::Scope context_scope(v8::Isolate::GetCurrent(), context);
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ v8::HandleScope handles(isolate);
+ v8::Local<v8::Context> context = v8::Context::New(isolate);
+ v8::Context::Scope context_scope(context);
TestCharacterStream("abc\0\n\r\x7f", 7);
static const unsigned kBigStringSize = 4096;
« no previous file with comments | « test/cctest/test-log.cc ('k') | test/cctest/test-profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698