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

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

Issue 186723005: New Compilation API, part 1 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: . Created 6 years, 9 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
« src/api.h ('K') | « test/cctest/test-log.cc ('k') | no next file » | 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 0a56bb5a81d2bf2563c57345eb25c6d4c8a16677..0cbae7c6caf165926fb07758a39dda4aae7fc34e 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -212,18 +212,25 @@ TEST(Preparsing) {
{
i::FLAG_lazy = true;
ScriptResource* resource = new ScriptResource(source, source_length);
- v8::Local<v8::String> script_source =
- v8::String::NewExternal(isolate, resource);
- v8::Script::Compile(script_source, NULL, preparse);
+ v8::ScriptCompiler::Source script_source(
+ v8::String::NewExternal(isolate, resource),
+ v8::ScriptCompiler::CachedData(
+ reinterpret_cast<const uint8_t*>(preparse->Data()),
+ preparse->Length()));
+ v8::ScriptCompiler::CompileContextBound(
+ isolate, v8::ScriptCompiler::Source(script_source));
}
{
i::FLAG_lazy = false;
ScriptResource* resource = new ScriptResource(source, source_length);
- v8::Local<v8::String> script_source =
- v8::String::NewExternal(isolate, resource);
- v8::Script::New(script_source, NULL, preparse);
+ v8::ScriptCompiler::Source script_source(
+ v8::String::NewExternal(isolate, resource),
+ v8::ScriptCompiler::CachedData(
+ reinterpret_cast<const uint8_t*>(preparse->Data()),
+ preparse->Length()));
+ v8::ScriptCompiler::CompileContextUnbound(isolate, script_source);
}
delete preparse;
i::FLAG_lazy = lazy_flag;
« src/api.h ('K') | « test/cctest/test-log.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698