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

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

Issue 724053004: Revert "Soft fail for invalid cache data." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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 | « test/cctest/test-parsing.cc ('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
1 // Copyright 2007-2010 the V8 project authors. All rights reserved. 1 // Copyright 2007-2010 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 1213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 1224
1225 v8::Local<v8::String> source_str = v8_str(source); 1225 v8::Local<v8::String> source_str = v8_str(source);
1226 v8::ScriptOrigin origin(v8_str("test")); 1226 v8::ScriptOrigin origin(v8_str("test"));
1227 v8::ScriptCompiler::Source source(source_str, origin, cache); 1227 v8::ScriptCompiler::Source source(source_str, origin, cache);
1228 v8::Local<v8::UnboundScript> script; 1228 v8::Local<v8::UnboundScript> script;
1229 { 1229 {
1230 DisallowCompilation no_compile(reinterpret_cast<Isolate*>(isolate2)); 1230 DisallowCompilation no_compile(reinterpret_cast<Isolate*>(isolate2));
1231 script = v8::ScriptCompiler::CompileUnbound( 1231 script = v8::ScriptCompiler::CompileUnbound(
1232 isolate2, &source, v8::ScriptCompiler::kConsumeCodeCache); 1232 isolate2, &source, v8::ScriptCompiler::kConsumeCodeCache);
1233 } 1233 }
1234 CHECK(!cache->rejected);
1235 v8::Local<v8::Value> result = script->BindToCurrentContext()->Run(); 1234 v8::Local<v8::Value> result = script->BindToCurrentContext()->Run();
1236 CHECK(result->ToString()->Equals(v8_str("abcdef"))); 1235 CHECK(result->ToString()->Equals(v8_str("abcdef")));
1237 } 1236 }
1238 DCHECK(toplevel_test_code_event_found); 1237 DCHECK(toplevel_test_code_event_found);
1239 isolate2->Dispose(); 1238 isolate2->Dispose();
1240 } 1239 }
1241 1240
1242 1241
1243 TEST(SerializeWithHarmonyScoping) { 1242 TEST(SerializeWithHarmonyScoping) {
1244 FLAG_serialize_toplevel = true; 1243 FLAG_serialize_toplevel = true;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 { 1295 {
1297 DisallowCompilation no_compile(reinterpret_cast<Isolate*>(isolate2)); 1296 DisallowCompilation no_compile(reinterpret_cast<Isolate*>(isolate2));
1298 script = v8::ScriptCompiler::CompileUnbound( 1297 script = v8::ScriptCompiler::CompileUnbound(
1299 isolate2, &source, v8::ScriptCompiler::kConsumeCodeCache); 1298 isolate2, &source, v8::ScriptCompiler::kConsumeCodeCache);
1300 } 1299 }
1301 v8::Local<v8::Value> result = script->BindToCurrentContext()->Run(); 1300 v8::Local<v8::Value> result = script->BindToCurrentContext()->Run();
1302 CHECK(result->ToString()->Equals(v8_str("XY"))); 1301 CHECK(result->ToString()->Equals(v8_str("XY")));
1303 } 1302 }
1304 isolate2->Dispose(); 1303 isolate2->Dispose();
1305 } 1304 }
OLDNEW
« no previous file with comments | « test/cctest/test-parsing.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698