Chromium Code Reviews| Index: test/cctest/test-serialize.cc |
| diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc |
| index dd0a101bbc044e947ba1de78c82ae64fae5ffdf7..5983bfcc14fb080ae26ceec64b2ccd9c58f91287 100644 |
| --- a/test/cctest/test-serialize.cc |
| +++ b/test/cctest/test-serialize.cc |
| @@ -609,16 +609,11 @@ UNINITIALIZED_TEST(PartialSerializerCustomContext) { |
| v8_isolate->Dispose(); |
| } |
| -TEST(CustomSnapshotDataBlob) { |
| +TEST(CustomSnapshotDataBlob1) { |
| DisableTurbofan(); |
|
Jakob Kummerow
2016/11/03 13:28:40
As discussed offline, it seems scary that these te
Yang
2016/11/04 08:39:41
Will address this in a follow-up.
|
| const char* source1 = "function f() { return 42; }"; |
| - const char* source2 = |
| - "function f() { return g() * 2; }" |
| - "function g() { return 43; }" |
| - "/./.test('a')"; |
| v8::StartupData data1 = v8::V8::CreateSnapshotDataBlob(source1); |
| - v8::StartupData data2 = v8::V8::CreateSnapshotDataBlob(source2); |
| v8::Isolate::CreateParams params1; |
| params1.snapshot_blob = &data1; |
| @@ -637,6 +632,16 @@ TEST(CustomSnapshotDataBlob) { |
| CHECK(CompileRun("this.g")->IsUndefined()); |
| } |
| isolate1->Dispose(); |
| +} |
| + |
| +TEST(CustomSnapshotDataBlob2) { |
| + DisableTurbofan(); |
| + const char* source2 = |
| + "function f() { return g() * 2; }" |
| + "function g() { return 43; }" |
| + "/./.test('a')"; |
| + |
| + v8::StartupData data2 = v8::V8::CreateSnapshotDataBlob(source2); |
| v8::Isolate::CreateParams params2; |
| params2.snapshot_blob = &data2; |
| @@ -657,7 +662,6 @@ TEST(CustomSnapshotDataBlob) { |
| isolate2->Dispose(); |
| } |
| - |
| static void SerializationFunctionTemplate( |
| const v8::FunctionCallbackInfo<v8::Value>& args) { |
| args.GetReturnValue().Set(args[0]); |
| @@ -1070,9 +1074,9 @@ TEST(CodeSerializerLargeCodeObject) { |
| FLAG_always_opt = false; |
| Vector<const uint8_t> source = |
| - ConstructSource(STATIC_CHAR_VECTOR("var j=1; if (!j) {"), |
| + ConstructSource(STATIC_CHAR_VECTOR("var j=1; if (j == 0) {"), |
| STATIC_CHAR_VECTOR("for (let i of Object.prototype);"), |
| - STATIC_CHAR_VECTOR("} j=7; j"), 2000); |
| + STATIC_CHAR_VECTOR("} j=7; j"), 1000); |
| Handle<String> source_str = |
| isolate->factory()->NewStringFromOneByte(source).ToHandleChecked(); |